@arbocollab/arbo-plugin-item-table 0.0.36 → 1.0.35
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.
- package/lib/es/index.es.js +108 -113
- package/lib/umd/index.umd.js +15 -15
- package/package.json +1 -1
package/lib/umd/index.umd.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`],...pN(n))}),t}function pN({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",i=e.component?e.component.parent==null:!1,o=` at <${Pu(e.component,e.type,i)}`,s=">"+n;return e.props?[o,...gN(e.props),s]:[o+s]}function gN(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(i=>{t.push(...Y0(i,e[i]))}),n.length>3&&t.push(" ..."),t}function Y0(e,t,n){return sn(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Qt(t)?(t=Y0(e,St(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):yt(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=St(t),n?t:[`${e}=`,t])}function mN(e,t){M.env.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?Ne(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&Ne(`${t} is NaN - the duration expression might be incorrect.`))}const nv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Al(e,t,n,i){try{return i?e(...i):e()}catch(o){mu(o,t,n)}}function Mo(e,t,n,i){if(yt(e)){const o=Al(e,t,n,i);return o&&Hm(o)&&o.catch(s=>{mu(s,t,n)}),o}if(ht(e)){const o=[];for(let s=0;s<e.length;s++)o.push(Mo(e[s],t,n,i));return o}else M.env.NODE_ENV!=="production"&&Ne(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`)}function mu(e,t,n,i=!0){const o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Nt;if(t){let a=t.parent;const l=t.proxy,c=M.env.NODE_ENV!=="production"?nv[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}a=a.parent}if(s){Po(),Al(s,null,10,[e,l,c]),Io();return}}vN(e,n,o,i,r)}function vN(e,t,n,i=!0,o=!1){if(M.env.NODE_ENV!=="production"){const s=nv[t];if(n&&qh(n),Ne(`Unhandled error${s?` during execution of ${s}`:""}`),n&&Yh(),i)throw e;console.error(e)}else{if(o)throw e;console.error(e)}}const Ci=[];let is=-1;const kl=[];let xr=null,Ol=0;const Z0=Promise.resolve();let Zh=null;const yN=100;function qt(e){const t=Zh||Z0;return e?t.then(this?e.bind(this):e):t}function CN(e){let t=is+1,n=Ci.length;for(;t<n;){const i=t+n>>>1,o=Ci[i],s=vu(o);s<e||s===e&&o.flags&2?t=i+1:n=i}return t}function Xh(e){if(!(e.flags&1)){const t=vu(e),n=Ci[Ci.length-1];!n||!(e.flags&2)&&t>=vu(n)?Ci.push(e):Ci.splice(CN(t),0,e),e.flags|=1,X0()}}function X0(){Zh||(Zh=Z0.then(eE))}function iv(e){ht(e)?kl.push(...e):xr&&e.id===-1?xr.splice(Ol+1,0,e):e.flags&1||(kl.push(e),e.flags|=1),X0()}function J0(e,t,n=is+1){for(M.env.NODE_ENV!=="production"&&(t=t||new Map);n<Ci.length;n++){const i=Ci[n];if(i&&i.flags&2){if(e&&i.id!==e.uid||M.env.NODE_ENV!=="production"&&ov(t,i))continue;Ci.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Q0(e){if(kl.length){const t=[...new Set(kl)].sort((n,i)=>vu(n)-vu(i));if(kl.length=0,xr){xr.push(...t);return}for(xr=t,M.env.NODE_ENV!=="production"&&(e=e||new Map),Ol=0;Ol<xr.length;Ol++){const n=xr[Ol];M.env.NODE_ENV!=="production"&&ov(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}xr=null,Ol=0}}const vu=e=>e.id==null?e.flags&2?-1:1/0:e.id;function eE(e){M.env.NODE_ENV!=="production"&&(e=e||new Map);const t=M.env.NODE_ENV!=="production"?n=>ov(e,n):Bn;try{for(is=0;is<Ci.length;is++){const n=Ci[is];if(n&&!(n.flags&8)){if(M.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Al(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;is<Ci.length;is++){const n=Ci[is];n&&(n.flags&=-2)}is=-1,Ci.length=0,Q0(e),Zh=null,(Ci.length||kl.length)&&eE(e)}}function ov(e,t){const n=e.get(t)||0;if(n>yN){const i=t.i,o=i&&Av(i.type);return mu(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}let os=!1;const Jh=new Map;M.env.NODE_ENV!=="production"&&(uu().__VUE_HMR_RUNTIME__={createRecord:sv(tE),rerender:sv(SN),reload:sv(EN)});const Ea=new Map;function wN(e){const t=e.type.__hmrId;let n=Ea.get(t);n||(tE(t,e.type),n=Ea.get(t)),n.instances.add(e)}function bN(e){Ea.get(e.type.__hmrId).instances.delete(e)}function tE(e,t){return Ea.has(e)?!1:(Ea.set(e,{initialDef:Qh(t),instances:new Set}),!0)}function Qh(e){return tR(e)?e.__vccOpts:e}function SN(e,t){const n=Ea.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(i=>{t&&(i.render=t,Qh(i.type).render=t),i.renderCache=[],os=!0,i.job.flags&8||i.update(),os=!1}))}function EN(e,t){const n=Ea.get(e);if(!n)return;t=Qh(t),nE(n.initialDef,t);const i=[...n.instances];for(let o=0;o<i.length;o++){const s=i[o],r=Qh(s.type);let a=Jh.get(r);a||(r!==n.initialDef&&nE(r,t),Jh.set(r,a=new Set)),a.add(s),s.appContext.propsCache.delete(s.type),s.appContext.emitsCache.delete(s.type),s.appContext.optionsCache.delete(s.type),s.ceReload?(a.add(s),s.ceReload(t.styles),a.delete(s)):s.parent?Xh(()=>{s.job.flags&8||(os=!0,s.parent.update(),os=!1,a.delete(s))}):s.appContext.reload?s.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),s.root.ce&&s!==s.root&&s.root.ce._removeChildStyle(r)}iv(()=>{Jh.clear()})}function nE(e,t){dn(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function sv(e){return(t,n)=>{try{return e(t,n)}catch(i){console.error(i),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Lo,yu=[],rv=!1;function Cu(e,...t){Lo?Lo.emit(e,...t):rv||yu.push({event:e,args:t})}function av(e,t){var n,i;Lo=e,Lo?(Lo.enabled=!0,yu.forEach(({event:o,args:s})=>Lo.emit(o,...s)),yu=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{av(s,t)}),setTimeout(()=>{Lo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,rv=!0,yu=[])},3e3)):(rv=!0,yu=[])}function RN(e,t){Cu("app:init",e,t,{Fragment:kt,Text:Bl,Comment:bi,Static:Du})}function DN(e){Cu("app:unmount",e)}const _N=lv("component:added"),iE=lv("component:updated"),xN=lv("component:removed"),FN=e=>{Lo&&typeof Lo.cleanupBuffer=="function"&&!Lo.cleanupBuffer(e)&&xN(e)};function lv(e){return t=>{Cu(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const TN=oE("perf:start"),PN=oE("perf:end");function oE(e){return(t,n,i)=>{Cu(e,t.appContext.app,t.uid,t,n,i)}}function IN(e,t,n){Cu("component:emit",e.appContext.app,e,t,n)}let Hn=null,sE=null;function ef(e){const t=Hn;return Hn=e,sE=e&&e.type.__scopeId||null,t}function Se(e,t=Hn,n){if(!t||e._n)return e;const i=(...o)=>{i._d&&pf(-1);const s=ef(t);let r;try{r=e(...o)}finally{ef(s),i._d&&pf(1)}return M.env.NODE_ENV!=="production"&&iE(t),r};return i._n=!0,i._c=!0,i._d=!0,i}function rE(e){CL(e)&&Ne("Do not use built-in directive ids as custom directive id: "+e)}function nt(e,t){if(Hn===null)return M.env.NODE_ENV!=="production"&&Ne("withDirectives can only be used inside render functions."),e;const n=yf(Hn),i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[s,r,a,l=Nt]=t[o];s&&(yt(s)&&(s={mounted:s,updated:s}),s.deep&&Hs(r),i.push({dir:s,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return e}function Ra(e,t,n,i){const o=e.dirs,s=t&&t.dirs;for(let r=0;r<o.length;r++){const a=o[r];s&&(a.oldValue=s[r].value);let l=a.dir[i];l&&(Po(),Mo(l,n,8,[e.el,a,e,t]),Io())}}const AN=Symbol("_vte"),kN=e=>e.__isTeleport,Da=Symbol("_leaveCb"),tf=Symbol("_enterCb");function ON(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return vn(()=>{e.isMounted=!0}),Yn(()=>{e.isUnmounting=!0}),e}const so=[Function,Array],MN={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:so,onEnter:so,onAfterEnter:so,onEnterCancelled:so,onBeforeLeave:so,onLeave:so,onAfterLeave:so,onLeaveCancelled:so,onBeforeAppear:so,onAppear:so,onAfterAppear:so,onAppearCancelled:so};function LN(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function cv(e,t,n,i,o){const{appear:s,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:b,onAfterAppear:S,onAppearCancelled:F}=t,C=String(e.key),R=LN(n,e),E=(O,k)=>{O&&Mo(O,i,9,k)},_=(O,k)=>{const x=k[1];E(O,k),ht(O)?O.every(P=>P.length<=1)&&x():O.length<=1&&x()},I={mode:r,persisted:a,beforeEnter(O){let k=l;if(!n.isMounted)if(s)k=y||l;else return;O[Da]&&O[Da](!0);const x=R[C];x&&Hl(e,x)&&x.el[Da]&&x.el[Da](),E(k,[O])},enter(O){let k=c,x=u,P=d;if(!n.isMounted)if(s)k=b||c,x=S||u,P=F||d;else return;let N=!1;const G=O[tf]=ie=>{N||(N=!0,ie?E(P,[O]):E(x,[O]),I.delayedLeave&&I.delayedLeave(),O[tf]=void 0)};k?_(k,[O,G]):G()},leave(O,k){const x=String(e.key);if(O[tf]&&O[tf](!0),n.isUnmounting)return k();E(h,[O]);let P=!1;const N=O[Da]=G=>{P||(P=!0,k(),G?E(m,[O]):E(g,[O]),O[Da]=void 0,R[x]===e&&delete R[x])};R[x]=e,f?_(f,[O,N]):N()},clone(O){return cv(O,t,n,i)}};return I}function wu(e,t){e.shapeFlag&6&&e.component?(e.transition=t,wu(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function aE(e,t=!1,n){let i=[],o=0;for(let s=0;s<e.length;s++){let r=e[s];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:s);r.type===kt?(r.patchFlag&128&&o++,i=i.concat(aE(r.children,t,a))):(t||r.type!==bi)&&i.push(a!=null?Ws(r,{key:a}):r)}if(o>1)for(let s=0;s<i.length;s++)i[s].patchFlag=-2;return i}function lt(e,t){return yt(e)?dn({name:e.name},t,{setup:e}):e}function lE(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const uv=new WeakSet;function cE(e){const t=Si(),n=U0(null);if(t){const o=t.refs===Nt?t.refs={}:t.refs;let s;M.env.NODE_ENV!=="production"&&(s=Object.getOwnPropertyDescriptor(o,e))&&!s.configurable?Ne(`useTemplateRef('${e}') already exists.`):Object.defineProperty(o,e,{enumerable:!0,get:()=>n.value,set:r=>n.value=r})}else M.env.NODE_ENV!=="production"&&Ne("useTemplateRef() is called when there is no active component instance to be associated with.");const i=M.env.NODE_ENV!=="production"?zh(n):n;return M.env.NODE_ENV!=="production"&&uv.add(i),i}const nf=new WeakMap;function bu(e,t,n,i,o=!1){if(ht(e)){e.forEach((m,y)=>bu(m,t&&(ht(t)?t[y]:t),n,i,o));return}if(Ml(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&bu(e,t,n,i.component.subTree);return}const s=i.shapeFlag&4?yf(i.component):i.el,r=o?null:s,{i:a,r:l}=e;if(M.env.NODE_ENV!=="production"&&!a){Ne("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const c=t&&t.r,u=a.refs===Nt?a.refs={}:a.refs,d=a.setupState,h=St(d),f=d===Nt?g0:m=>M.env.NODE_ENV!=="production"&&($t(h,m)&&!Qt(h[m])&&Ne(`Template ref "${m}" used on a non-ref value. It will not work in the production build.`),uv.has(h[m]))?!1:$t(h,m),g=m=>M.env.NODE_ENV==="production"||!uv.has(m);if(c!=null&&c!==l){if(uE(t),sn(c))u[c]=null,f(c)&&(d[c]=null);else if(Qt(c)){g(c)&&(c.value=null);const m=t;m.k&&(u[m.k]=null)}}if(yt(l))Al(l,a,12,[r,u]);else{const m=sn(l),y=Qt(l);if(m||y){const b=()=>{if(e.f){const S=m?f(l)?d[l]:u[l]:g(l)||!e.k?l.value:u[e.k];if(o)ht(S)&&Bm(S,s);else if(ht(S))S.includes(s)||S.push(s);else if(m)u[l]=[s],f(l)&&(d[l]=u[l]);else{const F=[s];g(l)&&(l.value=F),e.k&&(u[e.k]=F)}}else m?(u[l]=r,f(l)&&(d[l]=r)):y?(g(l)&&(l.value=r),e.k&&(u[e.k]=r)):M.env.NODE_ENV!=="production"&&Ne("Invalid template ref type:",l,`(${typeof l})`)};if(r){const S=()=>{b(),nf.delete(e)};S.id=-1,nf.set(e,S),Gi(S,n)}else uE(e),b()}else M.env.NODE_ENV!=="production"&&Ne("Invalid template ref type:",l,`(${typeof l})`)}}function uE(e){const t=nf.get(e);t&&(t.flags|=8,nf.delete(e))}uu().requestIdleCallback,uu().cancelIdleCallback;const Ml=e=>!!e.type.__asyncLoader,dv=e=>e.type.__isKeepAlive;function NN(e,t){dE(e,"a",t)}function VN(e,t){dE(e,"da",t)}function dE(e,t,n=Gn){const i=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(of(t,i,n),n){let o=n.parent;for(;o&&o.parent;)dv(o.parent.vnode)&&BN(i,t,n,o),o=o.parent}}function BN(e,t,n,i){const o=of(t,e,i,!0);Ll(()=>{Bm(i[t],o)},n)}function of(e,t,n=Gn,i=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{Po();const a=Fu(n),l=Mo(t,n,e,r);return a(),Io(),l});return i?o.unshift(s):o.push(s),s}else if(M.env.NODE_ENV!=="production"){const o=ya(nv[e].replace(/ hook$/,""));Ne(`${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Gs=e=>(t,n=Gn)=>{(!Tu||e==="sp")&&of(e,(...i)=>t(...i),n)},hv=Gs("bm"),vn=Gs("m"),hE=Gs("bu"),sf=Gs("u"),Yn=Gs("bum"),Ll=Gs("um"),HN=Gs("sp"),GN=Gs("rtg"),$N=Gs("rtc");function WN(e,t=Gn){of("ec",e,t)}const rf="components",zN="directives";function UN(e,t){return fv(rf,e,!0,t)||e}const fE=Symbol.for("v-ndc");function jN(e){return sn(e)?fv(rf,e,!1)||e:e||fE}function af(e){return fv(zN,e)}function fv(e,t,n=!0,i=!1){const o=Hn||Gn;if(o){const s=o.type;if(e===rf){const a=Av(s,!1);if(a&&(a===t||a===ri(t)||a===va(ri(t))))return s}const r=pE(o[e]||s[e],t)||pE(o.appContext[e],t);if(!r&&i)return s;if(M.env.NODE_ENV!=="production"&&n&&!r){const a=e===rf?`
|
|
17
17
|
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";Ne(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return r}else M.env.NODE_ENV!=="production"&&Ne(`resolve${va(e.slice(0,-1))} can only be used in render() or setup().`)}function pE(e,t){return e&&(e[t]||e[ri(t)]||e[va(ri(t))])}function Un(e,t,n,i){let o;const s=n,r=ht(e);if(r||sn(e)){const a=r&&oo(e);let l=!1,c=!1;a&&(l=!li(e),c=ko(e),e=Hh(e)),o=new Array(e.length);for(let u=0,d=e.length;u<d;u++)o[u]=t(l?c?Il(Oo(e[u])):Oo(e[u]):e[u],u,void 0,s)}else if(typeof e=="number"){M.env.NODE_ENV!=="production"&&!Number.isInteger(e)&&Ne(`The v-for range expect an integer value but got ${e}.`),o=new Array(e);for(let a=0;a<e;a++)o[a]=t(a+1,a,void 0,s)}else if(Ut(e))if(e[Symbol.iterator])o=Array.from(e,(a,l)=>t(a,l,void 0,s));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];o[l]=t(e[u],u,l,s)}}else o=[];return o}function Su(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(ht(i))for(let o=0;o<i.length;o++)e[i[o].name]=i[o].fn;else i&&(e[i.name]=i.key?(...o)=>{const s=i.fn(...o);return s&&(s.key=i.key),s}:i.fn)}return e}function _t(e,t,n={},i,o){if(Hn.ce||Hn.parent&&Ml(Hn.parent)&&Hn.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),K(),Xe(kt,null,[ye("slot",n,i&&i())],c?-2:64)}let s=e[t];M.env.NODE_ENV!=="production"&&s&&s.length>1&&(Ne("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),s=()=>[]),s&&s._c&&(s._d=!1),K();const r=s&&gE(s(n)),a=n.key||r&&r.key,l=Xe(kt,{key:(a&&!Vs(a)?a:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function gE(e){return e.some(t=>Pa(t)?!(t.type===bi||t.type===kt&&!gE(t.children)):!0)?e:null}const pv=e=>e?ZE(e)?yf(e):pv(e.parent):null,_a=dn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>M.env.NODE_ENV!=="production"?ns(e.props):e.props,$attrs:e=>M.env.NODE_ENV!=="production"?ns(e.attrs):e.attrs,$slots:e=>M.env.NODE_ENV!=="production"?ns(e.slots):e.slots,$refs:e=>M.env.NODE_ENV!=="production"?ns(e.refs):e.refs,$parent:e=>pv(e.parent),$root:e=>pv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wE(e),$forceUpdate:e=>e.f||(e.f=()=>{Xh(e.update)}),$nextTick:e=>e.n||(e.n=qt.bind(e.proxy)),$watch:e=>lV.bind(e)}),gv=e=>e==="_"||e==="$",mv=(e,t)=>e!==Nt&&!e.__isScriptSetup&&$t(e,t),mE={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:s,accessCache:r,type:a,appContext:l}=e;if(M.env.NODE_ENV!=="production"&&t==="__isVue")return!0;if(t[0]!=="$"){const h=r[t];if(h!==void 0)switch(h){case 1:return i[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(mv(i,t))return r[t]=1,i[t];if(o!==Nt&&$t(o,t))return r[t]=2,o[t];if($t(s,t))return r[t]=3,s[t];if(n!==Nt&&$t(n,t))return r[t]=4,n[t];yv&&(r[t]=0)}}const c=_a[t];let u,d;if(c)return t==="$attrs"?(zn(e.attrs,"get",""),M.env.NODE_ENV!=="production"&&df()):M.env.NODE_ENV!=="production"&&t==="$slots"&&zn(e,"get",t),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Nt&&$t(n,t))return r[t]=4,n[t];if(d=l.config.globalProperties,$t(d,t))return d[t];M.env.NODE_ENV!=="production"&&Hn&&(!sn(t)||t.indexOf("__v")!==0)&&(o!==Nt&&gv(t[0])&&$t(o,t)?Ne(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Hn&&Ne(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:i,setupState:o,ctx:s}=e;return mv(o,t)?(o[t]=n,!0):M.env.NODE_ENV!=="production"&&o.__isScriptSetup&&$t(o,t)?(Ne(`Cannot mutate <script setup> binding "${t}" from Options API.`),!1):i!==Nt&&$t(i,t)?(i[t]=n,!0):$t(e.props,t)?(M.env.NODE_ENV!=="production"&&Ne(`Attempting to mutate prop "${t}". Props are readonly.`),!1):t[0]==="$"&&t.slice(1)in e?(M.env.NODE_ENV!=="production"&&Ne(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`),!1):(M.env.NODE_ENV!=="production"&&t in e.appContext.config.globalProperties?Object.defineProperty(s,t,{enumerable:!0,configurable:!0,value:n}):s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:o,props:s,type:r}},a){let l;return!!(n[a]||e!==Nt&&a[0]!=="$"&&$t(e,a)||mv(t,a)||$t(s,a)||$t(i,a)||$t(_a,a)||$t(o.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:$t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};M.env.NODE_ENV!=="production"&&(mE.ownKeys=e=>(Ne("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));function KN(e){const t={};return Object.defineProperty(t,"_",{configurable:!0,enumerable:!1,get:()=>e}),Object.keys(_a).forEach(n=>{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:()=>_a[n](e),set:Bn})}),t}function qN(e){const{ctx:t,propsOptions:[n]}=e;n&&Object.keys(n).forEach(i=>{Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>e.props[i],set:Bn})})}function YN(e){const{ctx:t,setupState:n}=e;Object.keys(St(n)).forEach(i=>{if(!n.__isScriptSetup){if(gv(i[0])){Ne(`setup() return property ${JSON.stringify(i)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>n[i],set:Bn})}})}function vv(){return ZN("useSlots").slots}function ZN(e){const t=Si();return M.env.NODE_ENV!=="production"&&!t&&Ne(`${e}() called without active instance.`),t.setupContext||(t.setupContext=eR(t))}function lf(e){return ht(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function vE(e,t){return!e||!t?e||t:ht(e)&&ht(t)?e.concat(t):dn({},lf(e),lf(t))}function XN(){const e=Object.create(null);return(t,n)=>{e[n]?Ne(`${t} property "${n}" is already defined in ${e[n]}.`):e[n]=t}}let yv=!0;function JN(e){const t=wE(e),n=e.proxy,i=e.ctx;yv=!1,t.beforeCreate&&yE(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:g,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:F,unmounted:C,render:R,renderTracked:E,renderTriggered:_,errorCaptured:I,serverPrefetch:O,expose:k,inheritAttrs:x,components:P,directives:N,filters:G}=t,ie=M.env.NODE_ENV!=="production"?XN():null;if(M.env.NODE_ENV!=="production"){const[H]=e.propsOptions;if(H)for(const X in H)ie("Props",X)}if(c&&QN(c,i,ie),r)for(const H in r){const X=r[H];yt(X)?(M.env.NODE_ENV!=="production"?Object.defineProperty(i,H,{value:X.bind(n),configurable:!0,enumerable:!0,writable:!0}):i[H]=X.bind(n),M.env.NODE_ENV!=="production"&&ie("Methods",H)):M.env.NODE_ENV!=="production"&&Ne(`Method "${H}" has type "${typeof X}" in the component definition. Did you reference the function correctly?`)}if(o){M.env.NODE_ENV!=="production"&&!yt(o)&&Ne("The data option must be a function. Plain object usage is no longer supported.");const H=o.call(n,n);if(M.env.NODE_ENV!=="production"&&Hm(H)&&Ne("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Ut(H))M.env.NODE_ENV!=="production"&&Ne("data() should return an object.");else if(e.data=Ao(H),M.env.NODE_ENV!=="production")for(const X in H)ie("Data",X),gv(X[0])||Object.defineProperty(i,X,{configurable:!0,enumerable:!0,get:()=>H[X],set:Bn})}if(yv=!0,s)for(const H in s){const X=s[H],$=yt(X)?X.bind(n,n):yt(X.get)?X.get.bind(n,n):Bn;M.env.NODE_ENV!=="production"&&$===Bn&&Ne(`Computed property "${H}" has no getter.`);const ce=!yt(X)&&yt(X.set)?X.set.bind(n):M.env.NODE_ENV!=="production"?()=>{Ne(`Write operation failed: computed property "${H}" is readonly.`)}:Bn,ue=j({get:$,set:ce});Object.defineProperty(i,H,{enumerable:!0,configurable:!0,get:()=>ue.value,set:De=>ue.value=De}),M.env.NODE_ENV!=="production"&&ie("Computed",H)}if(a)for(const H in a)CE(a[H],i,n,H);if(l){const H=yt(l)?l.call(n):l;Reflect.ownKeys(H).forEach(X=>{Fa(X,H[X])})}u&&yE(u,e,"c");function B(H,X){ht(X)?X.forEach($=>H($.bind(n))):X&&H(X.bind(n))}if(B(hv,d),B(vn,h),B(hE,f),B(sf,g),B(NN,m),B(VN,y),B(WN,I),B($N,E),B(GN,_),B(Yn,S),B(Ll,C),B(HN,O),ht(k))if(k.length){const H=e.exposed||(e.exposed={});k.forEach(X=>{Object.defineProperty(H,X,{get:()=>n[X],set:$=>n[X]=$,enumerable:!0})})}else e.exposed||(e.exposed={});R&&e.render===Bn&&(e.render=R),x!=null&&(e.inheritAttrs=x),P&&(e.components=P),N&&(e.directives=N),O&&lE(e)}function QN(e,t,n=Bn){ht(e)&&(e=Cv(e));for(const i in e){const o=e[i];let s;Ut(o)?"default"in o?s=Hi(o.from||i,o.default,!0):s=Hi(o.from||i):s=Hi(o),Qt(s)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[i]=s,M.env.NODE_ENV!=="production"&&n("Inject",i)}}function yE(e,t,n){Mo(ht(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function CE(e,t,n,i){let o=i.includes(".")?RE(n,i):()=>n[i];if(sn(e)){const s=t[e];yt(s)?ct(o,s):M.env.NODE_ENV!=="production"&&Ne(`Invalid watch handler specified by key "${e}"`,s)}else if(yt(e))ct(o,e.bind(n));else if(Ut(e))if(ht(e))e.forEach(s=>CE(s,t,n,i));else{const s=yt(e.handler)?e.handler.bind(n):t[e.handler];yt(s)?ct(o,s,e):M.env.NODE_ENV!=="production"&&Ne(`Invalid watch handler specified by key "${e.handler}"`,s)}else M.env.NODE_ENV!=="production"&&Ne(`Invalid watch option: "${i}"`,e)}function wE(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!i?l=t:(l={},o.length&&o.forEach(c=>cf(l,c,r,!0)),cf(l,t,r)),Ut(t)&&s.set(t,l),l}function cf(e,t,n,i=!1){const{mixins:o,extends:s}=t;s&&cf(e,s,n,!0),o&&o.forEach(r=>cf(e,r,n,!0));for(const r in t)if(i&&r==="expose")M.env.NODE_ENV!=="production"&&Ne('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=eV[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const eV={data:bE,props:SE,emits:SE,methods:Eu,computed:Eu,beforeCreate:wi,created:wi,beforeMount:wi,mounted:wi,beforeUpdate:wi,updated:wi,beforeDestroy:wi,beforeUnmount:wi,destroyed:wi,unmounted:wi,activated:wi,deactivated:wi,errorCaptured:wi,serverPrefetch:wi,components:Eu,directives:Eu,watch:nV,provide:bE,inject:tV};function bE(e,t){return t?e?function(){return dn(yt(e)?e.call(this,this):e,yt(t)?t.call(this,this):t)}:t:e}function tV(e,t){return Eu(Cv(e),Cv(t))}function Cv(e){if(ht(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function wi(e,t){return e?[...new Set([].concat(e,t))]:t}function Eu(e,t){return e?dn(Object.create(null),e,t):t}function SE(e,t){return e?ht(e)&&ht(t)?[...new Set([...e,...t])]:dn(Object.create(null),lf(e),lf(t??{})):t}function nV(e,t){if(!e)return t;if(!t)return e;const n=dn(Object.create(null),e);for(const i in t)n[i]=wi(e[i],t[i]);return n}function EE(){return{app:null,config:{isNativeTag:g0,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let iV=0;function oV(e,t){return function(i,o=null){yt(i)||(i=dn({},i)),o!=null&&!Ut(o)&&(M.env.NODE_ENV!=="production"&&Ne("root props passed to app.mount() must be an object."),o=null);const s=EE(),r=new WeakSet,a=[];let l=!1;const c=s.app={_uid:iV++,_component:i,_props:o,_container:null,_context:s,_instance:null,version:nR,get config(){return s.config},set config(u){M.env.NODE_ENV!=="production"&&Ne("app.config cannot be replaced. Modify individual options instead.")},use(u,...d){return r.has(u)?M.env.NODE_ENV!=="production"&&Ne("Plugin has already been applied to target app."):u&&yt(u.install)?(r.add(u),u.install(c,...d)):yt(u)?(r.add(u),u(c,...d)):M.env.NODE_ENV!=="production"&&Ne('A plugin must either be a function or an object with an "install" function.'),c},mixin(u){return s.mixins.includes(u)?M.env.NODE_ENV!=="production"&&Ne("Mixin has already been applied to target app"+(u.name?`: ${u.name}`:"")):s.mixins.push(u),c},component(u,d){return M.env.NODE_ENV!=="production"&&Iv(u,s.config),d?(M.env.NODE_ENV!=="production"&&s.components[u]&&Ne(`Component "${u}" has already been registered in target app.`),s.components[u]=d,c):s.components[u]},directive(u,d){return M.env.NODE_ENV!=="production"&&rE(u),d?(M.env.NODE_ENV!=="production"&&s.directives[u]&&Ne(`Directive "${u}" has already been registered in target app.`),s.directives[u]=d,c):s.directives[u]},mount(u,d,h){if(l)M.env.NODE_ENV!=="production"&&Ne("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{M.env.NODE_ENV!=="production"&&u.__vue_app__&&Ne("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const f=c._ceVNode||ye(i,o);return f.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),M.env.NODE_ENV!=="production"&&(s.reload=()=>{const g=Ws(f);g.el=null,e(g,u,h)}),e(f,u,h),l=!0,c._container=u,u.__vue_app__=c,M.env.NODE_ENV!=="production"&&(c._instance=f.component,RN(c,nR)),yf(f.component)}},onUnmount(u){M.env.NODE_ENV!=="production"&&typeof u!="function"&&Ne(`Expected function as first argument to app.onUnmount(), but got ${typeof u}`),a.push(u)},unmount(){l?(Mo(a,c._instance,16),e(null,c._container),M.env.NODE_ENV!=="production"&&(c._instance=null,DN(c)),delete c._container.__vue_app__):M.env.NODE_ENV!=="production"&&Ne("Cannot unmount an app that is not mounted.")},provide(u,d){return M.env.NODE_ENV!=="production"&&u in s.provides&&($t(s.provides,u)?Ne(`App already provides property with key "${String(u)}". It will be overwritten with the new value.`):Ne(`App already provides property with key "${String(u)}" inherited from its parent element. It will be overwritten with the new value.`)),s.provides[u]=d,c},runWithContext(u){const d=xa;xa=c;try{return u()}finally{xa=d}}};return c}}let xa=null;function Fa(e,t){if(M.env.NODE_ENV!=="production"&&(!Gn||Gn.isMounted)&&Ne("provide() can only be used inside setup()."),Gn){let n=Gn.provides;const i=Gn.parent&&Gn.parent.provides;i===n&&(n=Gn.provides=Object.create(i)),n[e]=t}}function Hi(e,t,n=!1){const i=Si();if(i||xa){let o=xa?xa._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&yt(t)?t.call(i&&i.proxy):t;M.env.NODE_ENV!=="production"&&Ne(`injection "${String(e)}" not found.`)}else M.env.NODE_ENV!=="production"&&Ne("inject() can only be used inside setup() or functional components.")}function wv(){return!!(Si()||xa)}const sV=Symbol.for("v-scx"),rV=()=>{{const e=Hi(sV);return e||M.env.NODE_ENV!=="production"&&Ne("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function aV(e,t){return bv(e,null,M.env.NODE_ENV!=="production"?dn({},t,{flush:"sync"}):{flush:"sync"})}function ct(e,t,n){return M.env.NODE_ENV!=="production"&&!yt(t)&&Ne("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),bv(e,t,n)}function bv(e,t,n=Nt){const{immediate:i,deep:o,flush:s,once:r}=n;M.env.NODE_ENV!=="production"&&!t&&(i!==void 0&&Ne('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&Ne('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),r!==void 0&&Ne('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=dn({},n);M.env.NODE_ENV!=="production"&&(a.onWarn=Ne);const l=t&&i||!t&&s!=="post";let c;if(Tu){if(s==="sync"){const f=rV();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Bn,f.resume=Bn,f.pause=Bn,f}}const u=Gn;a.call=(f,g,m)=>Mo(f,u,g,m);let d=!1;s==="post"?a.scheduler=f=>{Gi(f,u&&u.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(f,g)=>{g?f():Xh(f)}),a.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=dN(e,t,a);return Tu&&(c?c.push(h):l&&h()),h}function lV(e,t,n){const i=this.proxy,o=sn(e)?e.includes(".")?RE(i,e):()=>i[e]:e.bind(i,i);let s;yt(t)?s=t:(s=t.handler,n=t);const r=Fu(this),a=bv(o,s.bind(i),n);return r(),a}function RE(e,t){const n=t.split(".");return()=>{let i=e;for(let o=0;o<n.length&&i;o++)i=i[n[o]];return i}}function cV(e,t,n=Nt){const i=Si();if(M.env.NODE_ENV!=="production"&&!i)return Ne("useModel() called without active instance."),Z();const o=ri(t);if(M.env.NODE_ENV!=="production"&&!i.propsOptions[0][o])return Ne(`useModel() called with prop "${t}" which is not declared.`),Z();const s=es(t),r=DE(e,o),a=sN((l,c)=>{let u,d=Nt,h;return aV(()=>{const f=e[o];Ti(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const g=n.set?n.set(f):f;if(!Ti(g,u)&&!(d!==Nt&&Ti(f,d)))return;const m=i.vnode.props;m&&(t in m||o in m||s in m)&&(`onUpdate:${t}`in m||`onUpdate:${o}`in m||`onUpdate:${s}`in m)||(u=f,c()),i.emit(`update:${t}`,g),Ti(f,g)&&Ti(f,d)&&!Ti(g,h)&&c(),d=f,h=g}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||Nt:a,done:!1}:{done:!0}}}},a}const DE=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ri(t)}Modifiers`]||e[`${es(t)}Modifiers`];function uV(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Nt;if(M.env.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[d]}=e;if(u)if(!(t in u))(!d||!(ya(ri(t))in d))&&Ne(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${ya(ri(t))}" prop.`);else{const h=u[t];yt(h)&&(h(...n)||Ne(`Invalid event arguments: event validation failed for event "${t}".`))}}let o=n;const s=t.startsWith("update:"),r=s&&DE(i,t.slice(7));if(r&&(r.trim&&(o=n.map(u=>sn(u)?u.trim():u)),r.number&&(o=n.map($m))),M.env.NODE_ENV!=="production"&&IN(e,t,o),M.env.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&i[ya(u)]&&Ne(`Event "${u}" is emitted in component ${Pu(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${es(t)}" instead of "${t}".`)}let a,l=i[a=ya(t)]||i[a=ya(ri(t))];!l&&s&&(l=i[a=ya(es(t))]),l&&Mo(l,e,6,o);const c=i[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Mo(c,e,6,o)}}const dV=new WeakMap;function _E(e,t,n=!1){const i=n?dV:t.emitsCache,o=i.get(e);if(o!==void 0)return o;const s=e.emits;let r={},a=!1;if(!yt(e)){const l=c=>{const u=_E(c,t,!0);u&&(a=!0,dn(r,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ut(e)&&i.set(e,null),null):(ht(s)?s.forEach(l=>r[l]=null):dn(r,s),Ut(e)&&i.set(e,r),r)}function uf(e,t){return!e||!lu(t)?!1:(t=t.slice(2).replace(/Once$/,""),$t(e,t[0].toLowerCase()+t.slice(1))||$t(e,es(t))||$t(e,t))}let Sv=!1;function df(){Sv=!0}function xE(e){const{type:t,vnode:n,proxy:i,withProxy:o,propsOptions:[s],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:g,inheritAttrs:m}=e,y=ef(e);let b,S;M.env.NODE_ENV!=="production"&&(Sv=!1);try{if(n.shapeFlag&4){const R=o||i,E=M.env.NODE_ENV!=="production"&&f.__isScriptSetup?new Proxy(R,{get(_,I,O){return Ne(`Property '${String(I)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(_,I,O)}}):R;b=No(c.call(E,R,u,M.env.NODE_ENV!=="production"?ns(d):d,f,h,g)),S=a}else{const R=t;M.env.NODE_ENV!=="production"&&a===d&&df(),b=No(R.length>1?R(M.env.NODE_ENV!=="production"?ns(d):d,M.env.NODE_ENV!=="production"?{get attrs(){return df(),ns(a)},slots:r,emit:l}:{attrs:a,slots:r,emit:l}):R(M.env.NODE_ENV!=="production"?ns(d):d,null)),S=t.props?a:hV(a)}}catch(R){_u.length=0,mu(R,e,1),b=ye(bi)}let F=b,C;if(M.env.NODE_ENV!=="production"&&b.patchFlag>0&&b.patchFlag&2048&&([F,C]=FE(b)),S&&m!==!1){const R=Object.keys(S),{shapeFlag:E}=F;if(R.length){if(E&7)s&&R.some(kh)&&(S=fV(S,s)),F=Ws(F,S,!1,!0);else if(M.env.NODE_ENV!=="production"&&!Sv&&F.type!==bi){const _=Object.keys(a),I=[],O=[];for(let k=0,x=_.length;k<x;k++){const P=_[k];lu(P)?kh(P)||I.push(P[2].toLowerCase()+P.slice(3)):O.push(P)}O.length&&Ne(`Extraneous non-props attributes (${O.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),I.length&&Ne(`Extraneous non-emits event listeners (${I.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(M.env.NODE_ENV!=="production"&&!TE(F)&&Ne("Runtime directive used on component with non-element root node. The directives will not function as intended."),F=Ws(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&(M.env.NODE_ENV!=="production"&&!TE(F)&&Ne("Component inside <Transition> renders non-element root node that cannot be animated."),wu(F,n.transition)),M.env.NODE_ENV!=="production"&&C?C(F):b=F,ef(y),b}const FE=e=>{const t=e.children,n=e.dynamicChildren,i=Ev(t,!1);if(i){if(M.env.NODE_ENV!=="production"&&i.patchFlag>0&&i.patchFlag&2048)return FE(i)}else return[e,void 0];const o=t.indexOf(i),s=n?n.indexOf(i):-1,r=a=>{t[o]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[No(i),r]};function Ev(e,t=!0){let n;for(let i=0;i<e.length;i++){const o=e[i];if(Pa(o)){if(o.type!==bi||o.children==="v-if"){if(n)return;if(n=o,M.env.NODE_ENV!=="production"&&t&&n.patchFlag>0&&n.patchFlag&2048)return Ev(n.children)}}else return}return n}const hV=e=>{let t;for(const n in e)(n==="class"||n==="style"||lu(n))&&((t||(t={}))[n]=e[n]);return t},fV=(e,t)=>{const n={};for(const i in e)(!kh(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n},TE=e=>e.shapeFlag&7||e.type===bi;function pV(e,t,n){const{props:i,children:o,component:s}=e,{props:r,children:a,patchFlag:l}=t,c=s.emitsOptions;if(M.env.NODE_ENV!=="production"&&(o||a)&&os||t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?PE(i,r,c):!!r;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(r[h]!==i[h]&&!uf(c,h))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?PE(i,r,c):!0:!!r;return!1}function PE(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let o=0;o<i.length;o++){const s=i[o];if(t[s]!==e[s]&&!uf(n,s))return!0}return!1}function gV({vnode:e,parent:t},n){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.el=e.el),i===e)(e=t.vnode).el=n,t=t.parent;else break}}const IE={},AE=()=>Object.create(IE),kE=e=>Object.getPrototypeOf(e)===IE;function mV(e,t,n,i=!1){const o={},s=AE();e.propsDefaults=Object.create(null),OE(e,t,o,s);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);M.env.NODE_ENV!=="production"&&NE(t||{},o,e),n?e.props=i?o:tN(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function vV(e){for(;e;){if(e.type.__hmrId)return!0;e=e.parent}}function yV(e,t,n,i){const{props:o,attrs:s,vnode:{patchFlag:r}}=e,a=St(o),[l]=e.propsOptions;let c=!1;if(!(M.env.NODE_ENV!=="production"&&vV(e))&&(i||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(uf(e.emitsOptions,h))continue;const f=t[h];if(l)if($t(s,h))f!==s[h]&&(s[h]=f,c=!0);else{const g=ri(h);o[g]=Rv(l,a,g,f,e,!1)}else f!==s[h]&&(s[h]=f,c=!0)}}}else{OE(e,t,o,s)&&(c=!0);let u;for(const d in a)(!t||!$t(t,d)&&((u=es(d))===d||!$t(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Rv(l,a,d,void 0,e,!0)):delete o[d]);if(s!==a)for(const d in s)(!t||!$t(t,d))&&(delete s[d],c=!0)}c&&ts(e.attrs,"set",""),M.env.NODE_ENV!=="production"&&NE(t||{},o,e)}function OE(e,t,n,i){const[o,s]=e.propsOptions;let r=!1,a;if(t)for(let l in t){if(cu(l))continue;const c=t[l];let u;o&&$t(o,u=ri(l))?!s||!s.includes(u)?n[u]=c:(a||(a={}))[u]=c:uf(e.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,r=!0)}if(s){const l=St(n),c=a||Nt;for(let u=0;u<s.length;u++){const d=s[u];n[d]=Rv(o,l,d,c[d],e,!$t(c,d))}}return r}function Rv(e,t,n,i,o,s){const r=e[n];if(r!=null){const a=$t(r,"default");if(a&&i===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&yt(l)){const{propsDefaults:c}=o;if(n in c)i=c[n];else{const u=Fu(o);i=c[n]=l.call(null,t),u()}}else i=l;o.ce&&o.ce._setProp(n,i)}r[0]&&(s&&!a?i=!1:r[1]&&(i===""||i===es(n))&&(i=!0))}return i}const CV=new WeakMap;function ME(e,t,n=!1){const i=n?CV:t.propsCache,o=i.get(e);if(o)return o;const s=e.props,r={},a=[];let l=!1;if(!yt(e)){const u=d=>{l=!0;const[h,f]=ME(d,t,!0);dn(r,h),f&&a.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!l)return Ut(e)&&i.set(e,xl),xl;if(ht(s))for(let u=0;u<s.length;u++){M.env.NODE_ENV!=="production"&&!sn(s[u])&&Ne("props must be strings when using array syntax.",s[u]);const d=ri(s[u]);LE(d)&&(r[d]=Nt)}else if(s){M.env.NODE_ENV!=="production"&&!Ut(s)&&Ne("invalid props options",s);for(const u in s){const d=ri(u);if(LE(d)){const h=s[u],f=r[d]=ht(h)||yt(h)?{type:h}:dn({},h),g=f.type;let m=!1,y=!0;if(ht(g))for(let b=0;b<g.length;++b){const S=g[b],F=yt(S)&&S.name;if(F==="Boolean"){m=!0;break}else F==="String"&&(y=!1)}else m=yt(g)&&g.name==="Boolean";f[0]=m,f[1]=y,(m||$t(f,"default"))&&a.push(d)}}}const c=[r,a];return Ut(e)&&i.set(e,c),c}function LE(e){return e[0]!=="$"&&!cu(e)?!0:(M.env.NODE_ENV!=="production"&&Ne(`Invalid prop name: "${e}" is a reserved property.`),!1)}function wV(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function NE(e,t,n){const i=St(t),o=n.propsOptions[0],s=Object.keys(e).map(r=>ri(r));for(const r in o){let a=o[r];a!=null&&bV(r,i[r],a,M.env.NODE_ENV!=="production"?ns(i):i,!s.includes(r))}}function bV(e,t,n,i,o){const{type:s,required:r,validator:a,skipCheck:l}=n;if(r&&o){Ne('Missing required prop: "'+e+'"');return}if(!(t==null&&!r)){if(s!=null&&s!==!0&&!l){let c=!1;const u=ht(s)?s:[s],d=[];for(let h=0;h<u.length&&!c;h++){const{valid:f,expectedType:g}=EV(t,u[h]);d.push(g||""),c=f}if(!c){Ne(RV(e,t,d));return}}a&&!a(t,i)&&Ne('Invalid prop: custom validator check failed for prop "'+e+'".')}}const SV=Fi("String,Number,Boolean,Function,Symbol,BigInt");function EV(e,t){let n;const i=wV(t);if(i==="null")n=e===null;else if(SV(i)){const o=typeof e;n=o===i.toLowerCase(),!n&&o==="object"&&(n=e instanceof t)}else i==="Object"?n=Ut(e):i==="Array"?n=ht(e):n=e instanceof t;return{valid:n,expectedType:i}}function RV(e,t,n){if(n.length===0)return`Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;let i=`Invalid prop: type check failed for prop "${e}". Expected ${n.map(va).join(" | ")}`;const o=n[0],s=Gm(t),r=VE(t,o),a=VE(t,s);return n.length===1&&BE(o)&&!DV(o,s)&&(i+=` with value ${r}`),i+=`, got ${s} `,BE(s)&&(i+=`with value ${a}.`),i}function VE(e,t){return t==="String"?`"${e}"`:t==="Number"?`${Number(e)}`:`${e}`}function BE(e){return["string","number","boolean"].some(n=>e.toLowerCase()===n)}function DV(...e){return e.some(t=>t.toLowerCase()==="boolean")}const Dv=e=>e==="_"||e==="_ctx"||e==="$stable",_v=e=>ht(e)?e.map(No):[No(e)],_V=(e,t,n)=>{if(t._n)return t;const i=Se((...o)=>(M.env.NODE_ENV!=="production"&&Gn&&!(n===null&&Hn)&&!(n&&n.root!==Gn.root)&&Ne(`Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),_v(t(...o))),n);return i._c=!1,i},HE=(e,t,n)=>{const i=e._ctx;for(const o in e){if(Dv(o))continue;const s=e[o];if(yt(s))t[o]=_V(o,s,i);else if(s!=null){M.env.NODE_ENV!=="production"&&Ne(`Non-function value encountered for slot "${o}". Prefer function slots for better performance.`);const r=_v(s);t[o]=()=>r}}},GE=(e,t)=>{M.env.NODE_ENV!=="production"&&!dv(e.vnode)&&Ne("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=_v(t);e.slots.default=()=>n},xv=(e,t,n)=>{for(const i in t)(n||!Dv(i))&&(e[i]=t[i])},xV=(e,t,n)=>{const i=e.slots=AE();if(e.vnode.shapeFlag&32){const o=t._;o?(xv(i,t,n),n&&Nh(i,"_",o,!0)):HE(t,i)}else t&&GE(e,t)},FV=(e,t,n)=>{const{vnode:i,slots:o}=e;let s=!0,r=Nt;if(i.shapeFlag&32){const a=t._;a?M.env.NODE_ENV!=="production"&&os?(xv(o,t,n),ts(e,"set","$slots")):n&&a===1?s=!1:xv(o,t,n):(s=!t.$stable,HE(t,o)),r=t}else t&&(GE(e,t),r={default:1});if(s)for(const a in o)!Dv(a)&&r[a]==null&&delete o[a]};let Ru,$s;function Nl(e,t){e.appContext.config.performance&&hf()&&$s.mark(`vue-${t}-${e.uid}`),M.env.NODE_ENV!=="production"&&TN(e,t,hf()?$s.now():Date.now())}function Vl(e,t){if(e.appContext.config.performance&&hf()){const n=`vue-${t}-${e.uid}`,i=n+":end",o=`<${Pu(e,e.type)}> ${t}`;$s.mark(i),$s.measure(o,n,i),$s.clearMeasures(o),$s.clearMarks(n),$s.clearMarks(i)}M.env.NODE_ENV!=="production"&&PN(e,t,hf()?$s.now():Date.now())}function hf(){return Ru!==void 0||(typeof window<"u"&&window.performance?(Ru=!0,$s=window.performance):Ru=!1),Ru}function TV(){const e=[];if(M.env.NODE_ENV!=="production"&&e.length){const t=e.length>1;console.warn(`Feature flag${t?"s":""} ${e.join(", ")} ${t?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
18
18
|
|
|
19
|
-
For more details, see https://link.vuejs.org/feature-flags.`)}}const Gi=OV;function PV(e){return IV(e)}function IV(e,t){TV();const n=uu();n.__VUE__=!0,M.env.NODE_ENV!=="production"&&av(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:i,remove:o,patchProp:s,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Bn,insertStaticContent:g}=e,m=(V,Y,pe,Te=null,Ee=null,_e=null,Ve=void 0,Ae=null,Pe=M.env.NODE_ENV!=="production"&&os?!1:!!Y.dynamicChildren)=>{if(V===Y)return;V&&!Hl(V,Y)&&(Te=Mt(V),ae(V,Ee,_e,!0),V=null),Y.patchFlag===-2&&(Pe=!1,Y.dynamicChildren=null);const{type:xe,ref:it,shapeFlag:We}=Y;switch(xe){case Bl:y(V,Y,pe,Te);break;case bi:b(V,Y,pe,Te);break;case Du:V==null?S(Y,pe,Te,Ve):M.env.NODE_ENV!=="production"&&F(V,Y,pe,Ve);break;case kt:N(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe);break;default:We&1?E(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe):We&6?G(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe):We&64||We&128?xe.process(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe,nn):M.env.NODE_ENV!=="production"&&Ne("Invalid VNode type:",xe,`(${typeof xe})`)}it!=null&&Ee?bu(it,V&&V.ref,_e,Y||V,!Y):it==null&&V&&V.ref!=null&&bu(V.ref,null,_e,V,!0)},y=(V,Y,pe,Te)=>{if(V==null)i(Y.el=a(Y.children),pe,Te);else{const Ee=Y.el=V.el;Y.children!==V.children&&c(Ee,Y.children)}},b=(V,Y,pe,Te)=>{V==null?i(Y.el=l(Y.children||""),pe,Te):Y.el=V.el},S=(V,Y,pe,Te)=>{[V.el,V.anchor]=g(V.children,Y,pe,Te,V.el,V.anchor)},F=(V,Y,pe,Te)=>{if(Y.children!==V.children){const Ee=h(V.anchor);R(V),[Y.el,Y.anchor]=g(Y.children,pe,Ee,Te)}else Y.el=V.el,Y.anchor=V.anchor},C=({el:V,anchor:Y},pe,Te)=>{let Ee;for(;V&&V!==Y;)Ee=h(V),i(V,pe,Te),V=Ee;i(Y,pe,Te)},R=({el:V,anchor:Y})=>{let pe;for(;V&&V!==Y;)pe=h(V),o(V),V=pe;o(Y)},E=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{if(Y.type==="svg"?Ve="svg":Y.type==="math"&&(Ve="mathml"),V==null)_(Y,pe,Te,Ee,_e,Ve,Ae,Pe);else{const xe=V.el&&V.el._isVueCE?V.el:null;try{xe&&xe._beginPatch(),k(V,Y,Ee,_e,Ve,Ae,Pe)}finally{xe&&xe._endPatch()}}},_=(V,Y,pe,Te,Ee,_e,Ve,Ae)=>{let Pe,xe;const{props:it,shapeFlag:We,transition:at,dirs:dt}=V;if(Pe=V.el=r(V.type,_e,it&&it.is,it),We&8?u(Pe,V.children):We&16&&O(V.children,Pe,null,Te,Ee,Fv(V,_e),Ve,Ae),dt&&Ra(V,null,Te,"created"),I(Pe,V,V.scopeId,Ve,Te),it){for(const Lt in it)Lt!=="value"&&!cu(Lt)&&s(Pe,Lt,null,it[Lt],_e,Te);"value"in it&&s(Pe,"value",null,it.value,_e),(xe=it.onVnodeBeforeMount)&&ss(xe,Te,V)}M.env.NODE_ENV!=="production"&&(Nh(Pe,"__vnode",V,!0),Nh(Pe,"__vueParentComponent",Te,!0)),dt&&Ra(V,null,Te,"beforeMount");const xt=AV(Ee,at);xt&&at.beforeEnter(Pe),i(Pe,Y,pe),((xe=it&&it.onVnodeMounted)||xt||dt)&&Gi(()=>{xe&&ss(xe,Te,V),xt&&at.enter(Pe),dt&&Ra(V,null,Te,"mounted")},Ee)},I=(V,Y,pe,Te,Ee)=>{if(pe&&f(V,pe),Te)for(let _e=0;_e<Te.length;_e++)f(V,Te[_e]);if(Ee){let _e=Ee.subTree;if(M.env.NODE_ENV!=="production"&&_e.patchFlag>0&&_e.patchFlag&2048&&(_e=Ev(_e.children)||_e),Y===_e||zE(_e.type)&&(_e.ssContent===Y||_e.ssFallback===Y)){const Ve=Ee.vnode;I(V,Ve,Ve.scopeId,Ve.slotScopeIds,Ee.parent)}}},O=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe=0)=>{for(let xe=Pe;xe<V.length;xe++){const it=V[xe]=Ae?Fr(V[xe]):No(V[xe]);m(null,it,Y,pe,Te,Ee,_e,Ve,Ae)}},k=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=Y.el=V.el;M.env.NODE_ENV!=="production"&&(Ae.__vnode=Y);let{patchFlag:Pe,dynamicChildren:xe,dirs:it}=Y;Pe|=V.patchFlag&16;const We=V.props||Nt,at=Y.props||Nt;let dt;if(pe&&Ta(pe,!1),(dt=at.onVnodeBeforeUpdate)&&ss(dt,pe,Y,V),it&&Ra(Y,V,pe,"beforeUpdate"),pe&&Ta(pe,!0),M.env.NODE_ENV!=="production"&&os&&(Pe=0,Ve=!1,xe=null),(We.innerHTML&&at.innerHTML==null||We.textContent&&at.textContent==null)&&u(Ae,""),xe?(x(V.dynamicChildren,xe,Ae,pe,Te,Fv(Y,Ee),_e),M.env.NODE_ENV!=="production"&&ff(V,Y)):Ve||$(V,Y,Ae,null,pe,Te,Fv(Y,Ee),_e,!1),Pe>0){if(Pe&16)P(Ae,We,at,pe,Ee);else if(Pe&2&&We.class!==at.class&&s(Ae,"class",null,at.class,Ee),Pe&4&&s(Ae,"style",We.style,at.style,Ee),Pe&8){const xt=Y.dynamicProps;for(let Lt=0;Lt<xt.length;Lt++){const Ht=xt[Lt],Dn=We[Ht],cn=at[Ht];(cn!==Dn||Ht==="value")&&s(Ae,Ht,Dn,cn,Ee,pe)}}Pe&1&&V.children!==Y.children&&u(Ae,Y.children)}else!Ve&&xe==null&&P(Ae,We,at,pe,Ee);((dt=at.onVnodeUpdated)||it)&&Gi(()=>{dt&&ss(dt,pe,Y,V),it&&Ra(Y,V,pe,"updated")},Te)},x=(V,Y,pe,Te,Ee,_e,Ve)=>{for(let Ae=0;Ae<Y.length;Ae++){const Pe=V[Ae],xe=Y[Ae],it=Pe.el&&(Pe.type===kt||!Hl(Pe,xe)||Pe.shapeFlag&198)?d(Pe.el):pe;m(Pe,xe,it,null,Te,Ee,_e,Ve,!0)}},P=(V,Y,pe,Te,Ee)=>{if(Y!==pe){if(Y!==Nt)for(const _e in Y)!cu(_e)&&!(_e in pe)&&s(V,_e,Y[_e],null,Ee,Te);for(const _e in pe){if(cu(_e))continue;const Ve=pe[_e],Ae=Y[_e];Ve!==Ae&&_e!=="value"&&s(V,_e,Ae,Ve,Ee,Te)}"value"in pe&&s(V,"value",Y.value,pe.value,Ee)}},N=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{const xe=Y.el=V?V.el:a(""),it=Y.anchor=V?V.anchor:a("");let{patchFlag:We,dynamicChildren:at,slotScopeIds:dt}=Y;M.env.NODE_ENV!=="production"&&(os||We&2048)&&(We=0,Pe=!1,at=null),dt&&(Ae=Ae?Ae.concat(dt):dt),V==null?(i(xe,pe,Te),i(it,pe,Te),O(Y.children||[],pe,it,Ee,_e,Ve,Ae,Pe)):We>0&&We&64&&at&&V.dynamicChildren?(x(V.dynamicChildren,at,pe,Ee,_e,Ve,Ae),M.env.NODE_ENV!=="production"?ff(V,Y):(Y.key!=null||Ee&&Y===Ee.subTree)&&ff(V,Y,!0)):$(V,Y,pe,it,Ee,_e,Ve,Ae,Pe)},G=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{Y.slotScopeIds=Ae,V==null?Y.shapeFlag&512?Ee.ctx.activate(Y,pe,Te,Ve,Pe):ie(Y,pe,Te,Ee,_e,Ve,Pe):B(V,Y,Pe)},ie=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=V.component=BV(V,Te,Ee);if(M.env.NODE_ENV!=="production"&&Ae.type.__hmrId&&wN(Ae),M.env.NODE_ENV!=="production"&&(qh(V),Nl(Ae,"mount")),dv(V)&&(Ae.ctx.renderer=nn),M.env.NODE_ENV!=="production"&&Nl(Ae,"init"),GV(Ae,!1,Ve),M.env.NODE_ENV!=="production"&&Vl(Ae,"init"),M.env.NODE_ENV!=="production"&&os&&(V.el=null),Ae.asyncDep){if(Ee&&Ee.registerDep(Ae,H,Ve),!V.el){const Pe=Ae.subTree=ye(bi);b(null,Pe,Y,pe),V.placeholder=Pe.el}}else H(Ae,V,Y,pe,Ee,_e,Ve);M.env.NODE_ENV!=="production"&&(Yh(),Vl(Ae,"mount"))},B=(V,Y,pe)=>{const Te=Y.component=V.component;if(pV(V,Y,pe))if(Te.asyncDep&&!Te.asyncResolved){M.env.NODE_ENV!=="production"&&qh(Y),X(Te,Y,pe),M.env.NODE_ENV!=="production"&&Yh();return}else Te.next=Y,Te.update();else Y.el=V.el,Te.vnode=Y},H=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=()=>{if(V.isMounted){let{next:We,bu:at,u:dt,parent:xt,vnode:Lt}=V;{const ke=$E(V);if(ke){We&&(We.el=Lt.el,X(V,We,Ve)),ke.asyncDep.then(()=>{V.isUnmounted||Ae()});return}}let Ht=We,Dn;M.env.NODE_ENV!=="production"&&qh(We||V.vnode),Ta(V,!1),We?(We.el=Lt.el,X(V,We,Ve)):We=Lt,at&&Fl(at),(Dn=We.props&&We.props.onVnodeBeforeUpdate)&&ss(Dn,xt,We,Lt),Ta(V,!0),M.env.NODE_ENV!=="production"&&Nl(V,"render");const cn=xE(V);M.env.NODE_ENV!=="production"&&Vl(V,"render");const qn=V.subTree;V.subTree=cn,M.env.NODE_ENV!=="production"&&Nl(V,"patch"),m(qn,cn,d(qn.el),Mt(qn),V,Ee,_e),M.env.NODE_ENV!=="production"&&Vl(V,"patch"),We.el=cn.el,Ht===null&&gV(V,cn.el),dt&&Gi(dt,Ee),(Dn=We.props&&We.props.onVnodeUpdated)&&Gi(()=>ss(Dn,xt,We,Lt),Ee),M.env.NODE_ENV!=="production"&&iE(V),M.env.NODE_ENV!=="production"&&Yh()}else{let We;const{el:at,props:dt}=Y,{bm:xt,m:Lt,parent:Ht,root:Dn,type:cn}=V,qn=Ml(Y);Ta(V,!1),xt&&Fl(xt),!qn&&(We=dt&&dt.onVnodeBeforeMount)&&ss(We,Ht,Y),Ta(V,!0);{Dn.ce&&Dn.ce._def.shadowRoot!==!1&&Dn.ce._injectChildStyle(cn),M.env.NODE_ENV!=="production"&&Nl(V,"render");const ke=V.subTree=xE(V);M.env.NODE_ENV!=="production"&&Vl(V,"render"),M.env.NODE_ENV!=="production"&&Nl(V,"patch"),m(null,ke,pe,Te,V,Ee,_e),M.env.NODE_ENV!=="production"&&Vl(V,"patch"),Y.el=ke.el}if(Lt&&Gi(Lt,Ee),!qn&&(We=dt&&dt.onVnodeMounted)){const ke=Y;Gi(()=>ss(We,Ht,ke),Ee)}(Y.shapeFlag&256||Ht&&Ml(Ht.vnode)&&Ht.vnode.shapeFlag&256)&&V.a&&Gi(V.a,Ee),V.isMounted=!0,M.env.NODE_ENV!=="production"&&_N(V),Y=pe=Te=null}};V.scope.on();const Pe=V.effect=new _0(Ae);V.scope.off();const xe=V.update=Pe.run.bind(Pe),it=V.job=Pe.runIfDirty.bind(Pe);it.i=V,it.id=V.uid,Pe.scheduler=()=>Xh(it),Ta(V,!0),M.env.NODE_ENV!=="production"&&(Pe.onTrack=V.rtc?We=>Fl(V.rtc,We):void 0,Pe.onTrigger=V.rtg?We=>Fl(V.rtg,We):void 0),xe()},X=(V,Y,pe)=>{Y.component=V;const Te=V.vnode.props;V.vnode=Y,V.next=null,yV(V,Y.props,Te,pe),FV(V,Y.children,pe),Po(),J0(V),Io()},$=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe=!1)=>{const xe=V&&V.children,it=V?V.shapeFlag:0,We=Y.children,{patchFlag:at,shapeFlag:dt}=Y;if(at>0){if(at&128){ue(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe);return}else if(at&256){ce(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe);return}}dt&8?(it&16&&ft(xe,Ee,_e),We!==xe&&u(pe,We)):it&16?dt&16?ue(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe):ft(xe,Ee,_e,!0):(it&8&&u(pe,""),dt&16&&O(We,pe,Te,Ee,_e,Ve,Ae,Pe))},ce=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{V=V||xl,Y=Y||xl;const xe=V.length,it=Y.length,We=Math.min(xe,it);let at;for(at=0;at<We;at++){const dt=Y[at]=Pe?Fr(Y[at]):No(Y[at]);m(V[at],dt,pe,null,Ee,_e,Ve,Ae,Pe)}xe>it?ft(V,Ee,_e,!0,!1,We):O(Y,pe,Te,Ee,_e,Ve,Ae,Pe,We)},ue=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{let xe=0;const it=Y.length;let We=V.length-1,at=it-1;for(;xe<=We&&xe<=at;){const dt=V[xe],xt=Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]);if(Hl(dt,xt))m(dt,xt,pe,null,Ee,_e,Ve,Ae,Pe);else break;xe++}for(;xe<=We&&xe<=at;){const dt=V[We],xt=Y[at]=Pe?Fr(Y[at]):No(Y[at]);if(Hl(dt,xt))m(dt,xt,pe,null,Ee,_e,Ve,Ae,Pe);else break;We--,at--}if(xe>We){if(xe<=at){const dt=at+1,xt=dt<it?Y[dt].el:Te;for(;xe<=at;)m(null,Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]),pe,xt,Ee,_e,Ve,Ae,Pe),xe++}}else if(xe>at)for(;xe<=We;)ae(V[xe],Ee,_e,!0),xe++;else{const dt=xe,xt=xe,Lt=new Map;for(xe=xt;xe<=at;xe++){const $e=Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]);$e.key!=null&&(M.env.NODE_ENV!=="production"&&Lt.has($e.key)&&Ne("Duplicate keys found during update:",JSON.stringify($e.key),"Make sure keys are unique."),Lt.set($e.key,xe))}let Ht,Dn=0;const cn=at-xt+1;let qn=!1,ke=0;const q=new Array(cn);for(xe=0;xe<cn;xe++)q[xe]=0;for(xe=dt;xe<=We;xe++){const $e=V[xe];if(Dn>=cn){ae($e,Ee,_e,!0);continue}let vt;if($e.key!=null)vt=Lt.get($e.key);else for(Ht=xt;Ht<=at;Ht++)if(q[Ht-xt]===0&&Hl($e,Y[Ht])){vt=Ht;break}vt===void 0?ae($e,Ee,_e,!0):(q[vt-xt]=xe+1,vt>=ke?ke=vt:qn=!0,m($e,Y[vt],pe,null,Ee,_e,Ve,Ae,Pe),Dn++)}const fe=qn?kV(q):xl;for(Ht=fe.length-1,xe=cn-1;xe>=0;xe--){const $e=xt+xe,vt=Y[$e],Ft=Y[$e+1],Le=$e+1<it?Ft.el||Ft.placeholder:Te;q[xe]===0?m(null,vt,pe,Le,Ee,_e,Ve,Ae,Pe):qn&&(Ht<0||xe!==fe[Ht]?De(vt,pe,Le,2):Ht--)}}},De=(V,Y,pe,Te,Ee=null)=>{const{el:_e,type:Ve,transition:Ae,children:Pe,shapeFlag:xe}=V;if(xe&6){De(V.component.subTree,Y,pe,Te);return}if(xe&128){V.suspense.move(Y,pe,Te);return}if(xe&64){Ve.move(V,Y,pe,nn);return}if(Ve===kt){i(_e,Y,pe);for(let We=0;We<Pe.length;We++)De(Pe[We],Y,pe,Te);i(V.anchor,Y,pe);return}if(Ve===Du){C(V,Y,pe);return}if(Te!==2&&xe&1&&Ae)if(Te===0)Ae.beforeEnter(_e),i(_e,Y,pe),Gi(()=>Ae.enter(_e),Ee);else{const{leave:We,delayLeave:at,afterLeave:dt}=Ae,xt=()=>{V.ctx.isUnmounted?o(_e):i(_e,Y,pe)},Lt=()=>{_e._isLeaving&&_e[Da](!0),We(_e,()=>{xt(),dt&&dt()})};at?at(_e,xt,Lt):Lt()}else i(_e,Y,pe)},ae=(V,Y,pe,Te=!1,Ee=!1)=>{const{type:_e,props:Ve,ref:Ae,children:Pe,dynamicChildren:xe,shapeFlag:it,patchFlag:We,dirs:at,cacheIndex:dt}=V;if(We===-2&&(Ee=!1),Ae!=null&&(Po(),bu(Ae,null,pe,V,!0),Io()),dt!=null&&(Y.renderCache[dt]=void 0),it&256){Y.ctx.deactivate(V);return}const xt=it&1&&at,Lt=!Ml(V);let Ht;if(Lt&&(Ht=Ve&&Ve.onVnodeBeforeUnmount)&&ss(Ht,Y,V),it&6)Je(V.component,pe,Te);else{if(it&128){V.suspense.unmount(pe,Te);return}xt&&Ra(V,null,Y,"beforeUnmount"),it&64?V.type.remove(V,Y,pe,nn,Te):xe&&!xe.hasOnce&&(_e!==kt||We>0&&We&64)?ft(xe,Y,pe,!1,!0):(_e===kt&&We&384||!Ee&&it&16)&&ft(Pe,Y,pe),Te&&Fe(V)}(Lt&&(Ht=Ve&&Ve.onVnodeUnmounted)||xt)&&Gi(()=>{Ht&&ss(Ht,Y,V),xt&&Ra(V,null,Y,"unmounted")},pe)},Fe=V=>{const{type:Y,el:pe,anchor:Te,transition:Ee}=V;if(Y===kt){M.env.NODE_ENV!=="production"&&V.patchFlag>0&&V.patchFlag&2048&&Ee&&!Ee.persisted?V.children.forEach(Ve=>{Ve.type===bi?o(Ve.el):Fe(Ve)}):Me(pe,Te);return}if(Y===Du){R(V);return}const _e=()=>{o(pe),Ee&&!Ee.persisted&&Ee.afterLeave&&Ee.afterLeave()};if(V.shapeFlag&1&&Ee&&!Ee.persisted){const{leave:Ve,delayLeave:Ae}=Ee,Pe=()=>Ve(pe,_e);Ae?Ae(V.el,_e,Pe):Pe()}else _e()},Me=(V,Y)=>{let pe;for(;V!==Y;)pe=h(V),o(V),V=pe;o(Y)},Je=(V,Y,pe)=>{M.env.NODE_ENV!=="production"&&V.type.__hmrId&&bN(V);const{bum:Te,scope:Ee,job:_e,subTree:Ve,um:Ae,m:Pe,a:xe}=V;WE(Pe),WE(xe),Te&&Fl(Te),Ee.stop(),_e&&(_e.flags|=8,ae(Ve,V,Y,pe)),Ae&&Gi(Ae,Y),Gi(()=>{V.isUnmounted=!0},Y),M.env.NODE_ENV!=="production"&&FN(V)},ft=(V,Y,pe,Te=!1,Ee=!1,_e=0)=>{for(let Ve=_e;Ve<V.length;Ve++)ae(V[Ve],Y,pe,Te,Ee)},Mt=V=>{if(V.shapeFlag&6)return Mt(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const Y=h(V.anchor||V.el),pe=Y&&Y[AN];return pe?h(pe):Y};let Be=!1;const jt=(V,Y,pe)=>{V==null?Y._vnode&&ae(Y._vnode,null,null,!0):m(Y._vnode||null,V,Y,null,null,null,pe),Y._vnode=V,Be||(Be=!0,J0(),Q0(),Be=!1)},nn={p:m,um:ae,m:De,r:Fe,mt:ie,mc:O,pc:$,pbc:x,n:Mt,o:e};return{render:jt,hydrate:void 0,createApp:oV(jt)}}function Fv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ta({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function AV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ff(e,t,n=!1){const i=e.children,o=t.children;if(ht(i)&&ht(o))for(let s=0;s<i.length;s++){const r=i[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Fr(o[s]),a.el=r.el),!n&&a.patchFlag!==-2&&ff(r,a)),a.type===Bl&&a.patchFlag!==-1&&(a.el=r.el),a.type===bi&&!a.el&&(a.el=r.el),M.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function kV(e){const t=e.slice(),n=[0];let i,o,s,r,a;const l=e.length;for(i=0;i<l;i++){const c=e[i];if(c!==0){if(o=n[n.length-1],e[o]<c){t[i]=o,n.push(i);continue}for(s=0,r=n.length-1;s<r;)a=s+r>>1,e[n[a]]<c?s=a+1:r=a;c<e[n[s]]&&(s>0&&(t[i]=n[s-1]),n[s]=i)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function $E(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$E(t)}function WE(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const zE=e=>e.__isSuspense;function OV(e,t){t&&t.pendingBranch?ht(e)?t.effects.push(...e):t.effects.push(e):iv(e)}const kt=Symbol.for("v-fgt"),Bl=Symbol.for("v-txt"),bi=Symbol.for("v-cmt"),Du=Symbol.for("v-stc"),_u=[];let $i=null;function K(e=!1){_u.push($i=e?null:[])}function MV(){_u.pop(),$i=_u[_u.length-1]||null}let xu=1;function pf(e,t=!1){xu+=e,e<0&&$i&&t&&($i.hasOnce=!0)}function UE(e){return e.dynamicChildren=xu>0?$i||xl:null,MV(),xu>0&&$i&&$i.push(e),e}function Ce(e,t,n,i,o,s){return UE(we(e,t,n,i,o,s,!0))}function Xe(e,t,n,i,o){return UE(ye(e,t,n,i,o,!0))}function Pa(e){return e?e.__v_isVNode===!0:!1}function Hl(e,t){if(M.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Jh.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const LV=(...e)=>KE(...e),jE=({key:e})=>e??null,gf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?sn(e)||Qt(e)||yt(e)?{i:Hn,r:e,k:t,f:!!n}:e:null);function we(e,t=null,n=null,i=0,o=null,s=e===kt?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&jE(t),ref:t&&gf(t),scopeId:sE,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Hn};return a?(Tv(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=sn(n)?8:16),M.env.NODE_ENV!=="production"&&l.key!==l.key&&Ne("VNode created with invalid key (NaN). VNode type:",l.type),xu>0&&!r&&$i&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&$i.push(l),l}const ye=M.env.NODE_ENV!=="production"?LV:KE;function KE(e,t=null,n=null,i=0,o=null,s=!1){if((!e||e===fE)&&(M.env.NODE_ENV!=="production"&&!e&&Ne(`Invalid vnode type when creating vnode: ${e}.`),e=bi),Pa(e)){const a=Ws(e,t,!0);return n&&Tv(a,n),xu>0&&!s&&$i&&(a.shapeFlag&6?$i[$i.indexOf(e)]=a:$i.push(a)),a.patchFlag=-2,a}if(tR(e)&&(e=e.__vccOpts),t){t=mf(t);let{class:a,style:l}=t;a&&!sn(a)&&(t.class=z(a)),Ut(l)&&(Pl(l)&&!ht(l)&&(l=dn({},l)),t.style=mn(l))}const r=sn(e)?1:zE(e)?128:kN(e)?64:Ut(e)?4:yt(e)?2:0;return M.env.NODE_ENV!=="production"&&r&4&&Pl(e)&&(e=St(e),Ne("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
19
|
+
For more details, see https://link.vuejs.org/feature-flags.`)}}const Gi=OV;function PV(e){return IV(e)}function IV(e,t){TV();const n=uu();n.__VUE__=!0,M.env.NODE_ENV!=="production"&&av(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:i,remove:o,patchProp:s,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Bn,insertStaticContent:g}=e,m=(V,Y,pe,Te=null,Ee=null,_e=null,Ve=void 0,Ae=null,Pe=M.env.NODE_ENV!=="production"&&os?!1:!!Y.dynamicChildren)=>{if(V===Y)return;V&&!Hl(V,Y)&&(Te=Mt(V),ae(V,Ee,_e,!0),V=null),Y.patchFlag===-2&&(Pe=!1,Y.dynamicChildren=null);const{type:xe,ref:it,shapeFlag:We}=Y;switch(xe){case Bl:y(V,Y,pe,Te);break;case bi:b(V,Y,pe,Te);break;case Du:V==null?S(Y,pe,Te,Ve):M.env.NODE_ENV!=="production"&&F(V,Y,pe,Ve);break;case kt:N(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe);break;default:We&1?E(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe):We&6?G(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe):We&64||We&128?xe.process(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe,nn):M.env.NODE_ENV!=="production"&&Ne("Invalid VNode type:",xe,`(${typeof xe})`)}it!=null&&Ee?bu(it,V&&V.ref,_e,Y||V,!Y):it==null&&V&&V.ref!=null&&bu(V.ref,null,_e,V,!0)},y=(V,Y,pe,Te)=>{if(V==null)i(Y.el=a(Y.children),pe,Te);else{const Ee=Y.el=V.el;Y.children!==V.children&&c(Ee,Y.children)}},b=(V,Y,pe,Te)=>{V==null?i(Y.el=l(Y.children||""),pe,Te):Y.el=V.el},S=(V,Y,pe,Te)=>{[V.el,V.anchor]=g(V.children,Y,pe,Te,V.el,V.anchor)},F=(V,Y,pe,Te)=>{if(Y.children!==V.children){const Ee=h(V.anchor);R(V),[Y.el,Y.anchor]=g(Y.children,pe,Ee,Te)}else Y.el=V.el,Y.anchor=V.anchor},C=({el:V,anchor:Y},pe,Te)=>{let Ee;for(;V&&V!==Y;)Ee=h(V),i(V,pe,Te),V=Ee;i(Y,pe,Te)},R=({el:V,anchor:Y})=>{let pe;for(;V&&V!==Y;)pe=h(V),o(V),V=pe;o(Y)},E=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{if(Y.type==="svg"?Ve="svg":Y.type==="math"&&(Ve="mathml"),V==null)_(Y,pe,Te,Ee,_e,Ve,Ae,Pe);else{const xe=V.el&&V.el._isVueCE?V.el:null;try{xe&&xe._beginPatch(),k(V,Y,Ee,_e,Ve,Ae,Pe)}finally{xe&&xe._endPatch()}}},_=(V,Y,pe,Te,Ee,_e,Ve,Ae)=>{let Pe,xe;const{props:it,shapeFlag:We,transition:at,dirs:dt}=V;if(Pe=V.el=r(V.type,_e,it&&it.is,it),We&8?u(Pe,V.children):We&16&&O(V.children,Pe,null,Te,Ee,Fv(V,_e),Ve,Ae),dt&&Ra(V,null,Te,"created"),I(Pe,V,V.scopeId,Ve,Te),it){for(const Lt in it)Lt!=="value"&&!cu(Lt)&&s(Pe,Lt,null,it[Lt],_e,Te);"value"in it&&s(Pe,"value",null,it.value,_e),(xe=it.onVnodeBeforeMount)&&ss(xe,Te,V)}M.env.NODE_ENV!=="production"&&(Nh(Pe,"__vnode",V,!0),Nh(Pe,"__vueParentComponent",Te,!0)),dt&&Ra(V,null,Te,"beforeMount");const xt=AV(Ee,at);xt&&at.beforeEnter(Pe),i(Pe,Y,pe),((xe=it&&it.onVnodeMounted)||xt||dt)&&Gi(()=>{xe&&ss(xe,Te,V),xt&&at.enter(Pe),dt&&Ra(V,null,Te,"mounted")},Ee)},I=(V,Y,pe,Te,Ee)=>{if(pe&&f(V,pe),Te)for(let _e=0;_e<Te.length;_e++)f(V,Te[_e]);if(Ee){let _e=Ee.subTree;if(M.env.NODE_ENV!=="production"&&_e.patchFlag>0&&_e.patchFlag&2048&&(_e=Ev(_e.children)||_e),Y===_e||zE(_e.type)&&(_e.ssContent===Y||_e.ssFallback===Y)){const Ve=Ee.vnode;I(V,Ve,Ve.scopeId,Ve.slotScopeIds,Ee.parent)}}},O=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe=0)=>{for(let xe=Pe;xe<V.length;xe++){const it=V[xe]=Ae?Fr(V[xe]):No(V[xe]);m(null,it,Y,pe,Te,Ee,_e,Ve,Ae)}},k=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=Y.el=V.el;M.env.NODE_ENV!=="production"&&(Ae.__vnode=Y);let{patchFlag:Pe,dynamicChildren:xe,dirs:it}=Y;Pe|=V.patchFlag&16;const We=V.props||Nt,at=Y.props||Nt;let dt;if(pe&&Ta(pe,!1),(dt=at.onVnodeBeforeUpdate)&&ss(dt,pe,Y,V),it&&Ra(Y,V,pe,"beforeUpdate"),pe&&Ta(pe,!0),M.env.NODE_ENV!=="production"&&os&&(Pe=0,Ve=!1,xe=null),(We.innerHTML&&at.innerHTML==null||We.textContent&&at.textContent==null)&&u(Ae,""),xe?(x(V.dynamicChildren,xe,Ae,pe,Te,Fv(Y,Ee),_e),M.env.NODE_ENV!=="production"&&ff(V,Y)):Ve||$(V,Y,Ae,null,pe,Te,Fv(Y,Ee),_e,!1),Pe>0){if(Pe&16)P(Ae,We,at,pe,Ee);else if(Pe&2&&We.class!==at.class&&s(Ae,"class",null,at.class,Ee),Pe&4&&s(Ae,"style",We.style,at.style,Ee),Pe&8){const xt=Y.dynamicProps;for(let Lt=0;Lt<xt.length;Lt++){const Ht=xt[Lt],Dn=We[Ht],cn=at[Ht];(cn!==Dn||Ht==="value")&&s(Ae,Ht,Dn,cn,Ee,pe)}}Pe&1&&V.children!==Y.children&&u(Ae,Y.children)}else!Ve&&xe==null&&P(Ae,We,at,pe,Ee);((dt=at.onVnodeUpdated)||it)&&Gi(()=>{dt&&ss(dt,pe,Y,V),it&&Ra(Y,V,pe,"updated")},Te)},x=(V,Y,pe,Te,Ee,_e,Ve)=>{for(let Ae=0;Ae<Y.length;Ae++){const Pe=V[Ae],xe=Y[Ae],it=Pe.el&&(Pe.type===kt||!Hl(Pe,xe)||Pe.shapeFlag&198)?d(Pe.el):pe;m(Pe,xe,it,null,Te,Ee,_e,Ve,!0)}},P=(V,Y,pe,Te,Ee)=>{if(Y!==pe){if(Y!==Nt)for(const _e in Y)!cu(_e)&&!(_e in pe)&&s(V,_e,Y[_e],null,Ee,Te);for(const _e in pe){if(cu(_e))continue;const Ve=pe[_e],Ae=Y[_e];Ve!==Ae&&_e!=="value"&&s(V,_e,Ae,Ve,Ee,Te)}"value"in pe&&s(V,"value",Y.value,pe.value,Ee)}},N=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{const xe=Y.el=V?V.el:a(""),it=Y.anchor=V?V.anchor:a("");let{patchFlag:We,dynamicChildren:at,slotScopeIds:dt}=Y;M.env.NODE_ENV!=="production"&&(os||We&2048)&&(We=0,Pe=!1,at=null),dt&&(Ae=Ae?Ae.concat(dt):dt),V==null?(i(xe,pe,Te),i(it,pe,Te),O(Y.children||[],pe,it,Ee,_e,Ve,Ae,Pe)):We>0&&We&64&&at&&V.dynamicChildren?(x(V.dynamicChildren,at,pe,Ee,_e,Ve,Ae),M.env.NODE_ENV!=="production"?ff(V,Y):(Y.key!=null||Ee&&Y===Ee.subTree)&&ff(V,Y,!0)):$(V,Y,pe,it,Ee,_e,Ve,Ae,Pe)},G=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{Y.slotScopeIds=Ae,V==null?Y.shapeFlag&512?Ee.ctx.activate(Y,pe,Te,Ve,Pe):ie(Y,pe,Te,Ee,_e,Ve,Pe):B(V,Y,Pe)},ie=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=V.component=BV(V,Te,Ee);if(M.env.NODE_ENV!=="production"&&Ae.type.__hmrId&&wN(Ae),M.env.NODE_ENV!=="production"&&(qh(V),Nl(Ae,"mount")),dv(V)&&(Ae.ctx.renderer=nn),M.env.NODE_ENV!=="production"&&Nl(Ae,"init"),GV(Ae,!1,Ve),M.env.NODE_ENV!=="production"&&Vl(Ae,"init"),M.env.NODE_ENV!=="production"&&os&&(V.el=null),Ae.asyncDep){if(Ee&&Ee.registerDep(Ae,H,Ve),!V.el){const Pe=Ae.subTree=ye(bi);b(null,Pe,Y,pe),V.placeholder=Pe.el}}else H(Ae,V,Y,pe,Ee,_e,Ve);M.env.NODE_ENV!=="production"&&(Yh(),Vl(Ae,"mount"))},B=(V,Y,pe)=>{const Te=Y.component=V.component;if(pV(V,Y,pe))if(Te.asyncDep&&!Te.asyncResolved){M.env.NODE_ENV!=="production"&&qh(Y),X(Te,Y,pe),M.env.NODE_ENV!=="production"&&Yh();return}else Te.next=Y,Te.update();else Y.el=V.el,Te.vnode=Y},H=(V,Y,pe,Te,Ee,_e,Ve)=>{const Ae=()=>{if(V.isMounted){let{next:We,bu:at,u:dt,parent:xt,vnode:Lt}=V;{const ke=$E(V);if(ke){We&&(We.el=Lt.el,X(V,We,Ve)),ke.asyncDep.then(()=>{V.isUnmounted||Ae()});return}}let Ht=We,Dn;M.env.NODE_ENV!=="production"&&qh(We||V.vnode),Ta(V,!1),We?(We.el=Lt.el,X(V,We,Ve)):We=Lt,at&&Fl(at),(Dn=We.props&&We.props.onVnodeBeforeUpdate)&&ss(Dn,xt,We,Lt),Ta(V,!0),M.env.NODE_ENV!=="production"&&Nl(V,"render");const cn=xE(V);M.env.NODE_ENV!=="production"&&Vl(V,"render");const qn=V.subTree;V.subTree=cn,M.env.NODE_ENV!=="production"&&Nl(V,"patch"),m(qn,cn,d(qn.el),Mt(qn),V,Ee,_e),M.env.NODE_ENV!=="production"&&Vl(V,"patch"),We.el=cn.el,Ht===null&&gV(V,cn.el),dt&&Gi(dt,Ee),(Dn=We.props&&We.props.onVnodeUpdated)&&Gi(()=>ss(Dn,xt,We,Lt),Ee),M.env.NODE_ENV!=="production"&&iE(V),M.env.NODE_ENV!=="production"&&Yh()}else{let We;const{el:at,props:dt}=Y,{bm:xt,m:Lt,parent:Ht,root:Dn,type:cn}=V,qn=Ml(Y);Ta(V,!1),xt&&Fl(xt),!qn&&(We=dt&&dt.onVnodeBeforeMount)&&ss(We,Ht,Y),Ta(V,!0);{Dn.ce&&Dn.ce._def.shadowRoot!==!1&&Dn.ce._injectChildStyle(cn),M.env.NODE_ENV!=="production"&&Nl(V,"render");const ke=V.subTree=xE(V);M.env.NODE_ENV!=="production"&&Vl(V,"render"),M.env.NODE_ENV!=="production"&&Nl(V,"patch"),m(null,ke,pe,Te,V,Ee,_e),M.env.NODE_ENV!=="production"&&Vl(V,"patch"),Y.el=ke.el}if(Lt&&Gi(Lt,Ee),!qn&&(We=dt&&dt.onVnodeMounted)){const ke=Y;Gi(()=>ss(We,Ht,ke),Ee)}(Y.shapeFlag&256||Ht&&Ml(Ht.vnode)&&Ht.vnode.shapeFlag&256)&&V.a&&Gi(V.a,Ee),V.isMounted=!0,M.env.NODE_ENV!=="production"&&_N(V),Y=pe=Te=null}};V.scope.on();const Pe=V.effect=new _0(Ae);V.scope.off();const xe=V.update=Pe.run.bind(Pe),it=V.job=Pe.runIfDirty.bind(Pe);it.i=V,it.id=V.uid,Pe.scheduler=()=>Xh(it),Ta(V,!0),M.env.NODE_ENV!=="production"&&(Pe.onTrack=V.rtc?We=>Fl(V.rtc,We):void 0,Pe.onTrigger=V.rtg?We=>Fl(V.rtg,We):void 0),xe()},X=(V,Y,pe)=>{Y.component=V;const Te=V.vnode.props;V.vnode=Y,V.next=null,yV(V,Y.props,Te,pe),FV(V,Y.children,pe),Po(),J0(V),Io()},$=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe=!1)=>{const xe=V&&V.children,it=V?V.shapeFlag:0,We=Y.children,{patchFlag:at,shapeFlag:dt}=Y;if(at>0){if(at&128){ue(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe);return}else if(at&256){ce(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe);return}}dt&8?(it&16&&pt(xe,Ee,_e),We!==xe&&u(pe,We)):it&16?dt&16?ue(xe,We,pe,Te,Ee,_e,Ve,Ae,Pe):pt(xe,Ee,_e,!0):(it&8&&u(pe,""),dt&16&&O(We,pe,Te,Ee,_e,Ve,Ae,Pe))},ce=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{V=V||xl,Y=Y||xl;const xe=V.length,it=Y.length,We=Math.min(xe,it);let at;for(at=0;at<We;at++){const dt=Y[at]=Pe?Fr(Y[at]):No(Y[at]);m(V[at],dt,pe,null,Ee,_e,Ve,Ae,Pe)}xe>it?pt(V,Ee,_e,!0,!1,We):O(Y,pe,Te,Ee,_e,Ve,Ae,Pe,We)},ue=(V,Y,pe,Te,Ee,_e,Ve,Ae,Pe)=>{let xe=0;const it=Y.length;let We=V.length-1,at=it-1;for(;xe<=We&&xe<=at;){const dt=V[xe],xt=Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]);if(Hl(dt,xt))m(dt,xt,pe,null,Ee,_e,Ve,Ae,Pe);else break;xe++}for(;xe<=We&&xe<=at;){const dt=V[We],xt=Y[at]=Pe?Fr(Y[at]):No(Y[at]);if(Hl(dt,xt))m(dt,xt,pe,null,Ee,_e,Ve,Ae,Pe);else break;We--,at--}if(xe>We){if(xe<=at){const dt=at+1,xt=dt<it?Y[dt].el:Te;for(;xe<=at;)m(null,Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]),pe,xt,Ee,_e,Ve,Ae,Pe),xe++}}else if(xe>at)for(;xe<=We;)ae(V[xe],Ee,_e,!0),xe++;else{const dt=xe,xt=xe,Lt=new Map;for(xe=xt;xe<=at;xe++){const $e=Y[xe]=Pe?Fr(Y[xe]):No(Y[xe]);$e.key!=null&&(M.env.NODE_ENV!=="production"&&Lt.has($e.key)&&Ne("Duplicate keys found during update:",JSON.stringify($e.key),"Make sure keys are unique."),Lt.set($e.key,xe))}let Ht,Dn=0;const cn=at-xt+1;let qn=!1,ke=0;const q=new Array(cn);for(xe=0;xe<cn;xe++)q[xe]=0;for(xe=dt;xe<=We;xe++){const $e=V[xe];if(Dn>=cn){ae($e,Ee,_e,!0);continue}let vt;if($e.key!=null)vt=Lt.get($e.key);else for(Ht=xt;Ht<=at;Ht++)if(q[Ht-xt]===0&&Hl($e,Y[Ht])){vt=Ht;break}vt===void 0?ae($e,Ee,_e,!0):(q[vt-xt]=xe+1,vt>=ke?ke=vt:qn=!0,m($e,Y[vt],pe,null,Ee,_e,Ve,Ae,Pe),Dn++)}const fe=qn?kV(q):xl;for(Ht=fe.length-1,xe=cn-1;xe>=0;xe--){const $e=xt+xe,vt=Y[$e],Ft=Y[$e+1],Le=$e+1<it?Ft.el||Ft.placeholder:Te;q[xe]===0?m(null,vt,pe,Le,Ee,_e,Ve,Ae,Pe):qn&&(Ht<0||xe!==fe[Ht]?De(vt,pe,Le,2):Ht--)}}},De=(V,Y,pe,Te,Ee=null)=>{const{el:_e,type:Ve,transition:Ae,children:Pe,shapeFlag:xe}=V;if(xe&6){De(V.component.subTree,Y,pe,Te);return}if(xe&128){V.suspense.move(Y,pe,Te);return}if(xe&64){Ve.move(V,Y,pe,nn);return}if(Ve===kt){i(_e,Y,pe);for(let We=0;We<Pe.length;We++)De(Pe[We],Y,pe,Te);i(V.anchor,Y,pe);return}if(Ve===Du){C(V,Y,pe);return}if(Te!==2&&xe&1&&Ae)if(Te===0)Ae.beforeEnter(_e),i(_e,Y,pe),Gi(()=>Ae.enter(_e),Ee);else{const{leave:We,delayLeave:at,afterLeave:dt}=Ae,xt=()=>{V.ctx.isUnmounted?o(_e):i(_e,Y,pe)},Lt=()=>{_e._isLeaving&&_e[Da](!0),We(_e,()=>{xt(),dt&&dt()})};at?at(_e,xt,Lt):Lt()}else i(_e,Y,pe)},ae=(V,Y,pe,Te=!1,Ee=!1)=>{const{type:_e,props:Ve,ref:Ae,children:Pe,dynamicChildren:xe,shapeFlag:it,patchFlag:We,dirs:at,cacheIndex:dt}=V;if(We===-2&&(Ee=!1),Ae!=null&&(Po(),bu(Ae,null,pe,V,!0),Io()),dt!=null&&(Y.renderCache[dt]=void 0),it&256){Y.ctx.deactivate(V);return}const xt=it&1&&at,Lt=!Ml(V);let Ht;if(Lt&&(Ht=Ve&&Ve.onVnodeBeforeUnmount)&&ss(Ht,Y,V),it&6)Je(V.component,pe,Te);else{if(it&128){V.suspense.unmount(pe,Te);return}xt&&Ra(V,null,Y,"beforeUnmount"),it&64?V.type.remove(V,Y,pe,nn,Te):xe&&!xe.hasOnce&&(_e!==kt||We>0&&We&64)?pt(xe,Y,pe,!1,!0):(_e===kt&&We&384||!Ee&&it&16)&&pt(Pe,Y,pe),Te&&Fe(V)}(Lt&&(Ht=Ve&&Ve.onVnodeUnmounted)||xt)&&Gi(()=>{Ht&&ss(Ht,Y,V),xt&&Ra(V,null,Y,"unmounted")},pe)},Fe=V=>{const{type:Y,el:pe,anchor:Te,transition:Ee}=V;if(Y===kt){M.env.NODE_ENV!=="production"&&V.patchFlag>0&&V.patchFlag&2048&&Ee&&!Ee.persisted?V.children.forEach(Ve=>{Ve.type===bi?o(Ve.el):Fe(Ve)}):Me(pe,Te);return}if(Y===Du){R(V);return}const _e=()=>{o(pe),Ee&&!Ee.persisted&&Ee.afterLeave&&Ee.afterLeave()};if(V.shapeFlag&1&&Ee&&!Ee.persisted){const{leave:Ve,delayLeave:Ae}=Ee,Pe=()=>Ve(pe,_e);Ae?Ae(V.el,_e,Pe):Pe()}else _e()},Me=(V,Y)=>{let pe;for(;V!==Y;)pe=h(V),o(V),V=pe;o(Y)},Je=(V,Y,pe)=>{M.env.NODE_ENV!=="production"&&V.type.__hmrId&&bN(V);const{bum:Te,scope:Ee,job:_e,subTree:Ve,um:Ae,m:Pe,a:xe}=V;WE(Pe),WE(xe),Te&&Fl(Te),Ee.stop(),_e&&(_e.flags|=8,ae(Ve,V,Y,pe)),Ae&&Gi(Ae,Y),Gi(()=>{V.isUnmounted=!0},Y),M.env.NODE_ENV!=="production"&&FN(V)},pt=(V,Y,pe,Te=!1,Ee=!1,_e=0)=>{for(let Ve=_e;Ve<V.length;Ve++)ae(V[Ve],Y,pe,Te,Ee)},Mt=V=>{if(V.shapeFlag&6)return Mt(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const Y=h(V.anchor||V.el),pe=Y&&Y[AN];return pe?h(pe):Y};let Be=!1;const jt=(V,Y,pe)=>{V==null?Y._vnode&&ae(Y._vnode,null,null,!0):m(Y._vnode||null,V,Y,null,null,null,pe),Y._vnode=V,Be||(Be=!0,J0(),Q0(),Be=!1)},nn={p:m,um:ae,m:De,r:Fe,mt:ie,mc:O,pc:$,pbc:x,n:Mt,o:e};return{render:jt,hydrate:void 0,createApp:oV(jt)}}function Fv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ta({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function AV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ff(e,t,n=!1){const i=e.children,o=t.children;if(ht(i)&&ht(o))for(let s=0;s<i.length;s++){const r=i[s];let a=o[s];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[s]=Fr(o[s]),a.el=r.el),!n&&a.patchFlag!==-2&&ff(r,a)),a.type===Bl&&a.patchFlag!==-1&&(a.el=r.el),a.type===bi&&!a.el&&(a.el=r.el),M.env.NODE_ENV!=="production"&&a.el&&(a.el.__vnode=a)}}function kV(e){const t=e.slice(),n=[0];let i,o,s,r,a;const l=e.length;for(i=0;i<l;i++){const c=e[i];if(c!==0){if(o=n[n.length-1],e[o]<c){t[i]=o,n.push(i);continue}for(s=0,r=n.length-1;s<r;)a=s+r>>1,e[n[a]]<c?s=a+1:r=a;c<e[n[s]]&&(s>0&&(t[i]=n[s-1]),n[s]=i)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function $E(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$E(t)}function WE(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const zE=e=>e.__isSuspense;function OV(e,t){t&&t.pendingBranch?ht(e)?t.effects.push(...e):t.effects.push(e):iv(e)}const kt=Symbol.for("v-fgt"),Bl=Symbol.for("v-txt"),bi=Symbol.for("v-cmt"),Du=Symbol.for("v-stc"),_u=[];let $i=null;function K(e=!1){_u.push($i=e?null:[])}function MV(){_u.pop(),$i=_u[_u.length-1]||null}let xu=1;function pf(e,t=!1){xu+=e,e<0&&$i&&t&&($i.hasOnce=!0)}function UE(e){return e.dynamicChildren=xu>0?$i||xl:null,MV(),xu>0&&$i&&$i.push(e),e}function Ce(e,t,n,i,o,s){return UE(we(e,t,n,i,o,s,!0))}function Xe(e,t,n,i,o){return UE(ye(e,t,n,i,o,!0))}function Pa(e){return e?e.__v_isVNode===!0:!1}function Hl(e,t){if(M.env.NODE_ENV!=="production"&&t.shapeFlag&6&&e.component){const n=Jh.get(t.type);if(n&&n.has(e.component))return e.shapeFlag&=-257,t.shapeFlag&=-513,!1}return e.type===t.type&&e.key===t.key}const LV=(...e)=>KE(...e),jE=({key:e})=>e??null,gf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?sn(e)||Qt(e)||yt(e)?{i:Hn,r:e,k:t,f:!!n}:e:null);function we(e,t=null,n=null,i=0,o=null,s=e===kt?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&jE(t),ref:t&&gf(t),scopeId:sE,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Hn};return a?(Tv(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=sn(n)?8:16),M.env.NODE_ENV!=="production"&&l.key!==l.key&&Ne("VNode created with invalid key (NaN). VNode type:",l.type),xu>0&&!r&&$i&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&$i.push(l),l}const ye=M.env.NODE_ENV!=="production"?LV:KE;function KE(e,t=null,n=null,i=0,o=null,s=!1){if((!e||e===fE)&&(M.env.NODE_ENV!=="production"&&!e&&Ne(`Invalid vnode type when creating vnode: ${e}.`),e=bi),Pa(e)){const a=Ws(e,t,!0);return n&&Tv(a,n),xu>0&&!s&&$i&&(a.shapeFlag&6?$i[$i.indexOf(e)]=a:$i.push(a)),a.patchFlag=-2,a}if(tR(e)&&(e=e.__vccOpts),t){t=mf(t);let{class:a,style:l}=t;a&&!sn(a)&&(t.class=z(a)),Ut(l)&&(Pl(l)&&!ht(l)&&(l=dn({},l)),t.style=mn(l))}const r=sn(e)?1:zE(e)?128:kN(e)?64:Ut(e)?4:yt(e)?2:0;return M.env.NODE_ENV!=="production"&&r&4&&Pl(e)&&(e=St(e),Ne("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
|
|
20
20
|
Component that was made reactive: `,e)),we(e,t,n,i,o,r,s,!0)}function mf(e){return e?Pl(e)||kE(e)?dn({},e):e:null}function Ws(e,t,n=!1,i=!1){const{props:o,ref:s,patchFlag:r,children:a,transition:l}=e,c=t?xn(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&jE(c),ref:t&&t.ref?n&&s?ht(s)?s.concat(gf(t)):[s,gf(t)]:gf(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:M.env.NODE_ENV!=="production"&&r===-1&&ht(a)?a.map(qE):a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==kt?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ws(e.ssContent),ssFallback:e.ssFallback&&Ws(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&i&&wu(u,l.clone(u)),u}function qE(e){const t=Ws(e);return ht(e.children)&&(t.children=e.children.map(qE)),t}function ut(e=" ",t=0){return ye(Bl,null,e,t)}function ot(e="",t=!1){return t?(K(),Xe(bi,null,e)):ye(bi,null,e)}function No(e){return e==null||typeof e=="boolean"?ye(bi):ht(e)?ye(kt,null,e.slice()):Pa(e)?Fr(e):ye(Bl,null,String(e))}function Fr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ws(e)}function Tv(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(ht(t))n=16;else if(typeof t=="object")if(i&65){const o=t.default;o&&(o._c&&(o._d=!1),Tv(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!kE(t)?t._ctx=Hn:o===3&&Hn&&(Hn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else yt(t)?(t={default:t,_ctx:Hn},n=32):(t=String(t),i&64?(n=16,t=[ut(t)]):n=8);e.children=t,e.shapeFlag|=n}function xn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const o in i)if(o==="class")t.class!==i.class&&(t.class=z([t.class,i.class]));else if(o==="style")t.style=mn([t.style,i.style]);else if(lu(o)){const s=t[o],r=i[o];r&&s!==r&&!(ht(s)&&s.includes(r))&&(t[o]=s?[].concat(s,r):r)}else o!==""&&(t[o]=i[o])}return t}function ss(e,t,n,i=null){Mo(e,t,7,[n,i])}const NV=EE();let VV=0;function BV(e,t,n){const i=e.type,o=(t?t.appContext:e.appContext)||NV,s={uid:VV++,vnode:e,type:i,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new E0(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ME(i,o),emitsOptions:_E(i,o),emit:null,emitted:null,propsDefaults:Nt,inheritAttrs:i.inheritAttrs,ctx:Nt,data:Nt,props:Nt,attrs:Nt,slots:Nt,refs:Nt,setupState:Nt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return M.env.NODE_ENV!=="production"?s.ctx=KN(s):s.ctx={_:s},s.root=t?t.root:s,s.emit=uV.bind(null,s),e.ce&&e.ce(s),s}let Gn=null;const Si=()=>Gn||Hn;let vf,Pv;{const e=uu(),t=(n,i)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(i),s=>{o.length>1?o.forEach(r=>r(s)):o[0](s)}};vf=t("__VUE_INSTANCE_SETTERS__",n=>Gn=n),Pv=t("__VUE_SSR_SETTERS__",n=>Tu=n)}const Fu=e=>{const t=Gn;return vf(e),e.scope.on(),()=>{e.scope.off(),vf(t)}},YE=()=>{Gn&&Gn.scope.off(),vf(null)},HV=Fi("slot,component");function Iv(e,{isNativeTag:t}){(HV(e)||t(e))&&Ne("Do not use built-in or reserved HTML elements as component id: "+e)}function ZE(e){return e.vnode.shapeFlag&4}let Tu=!1;function GV(e,t=!1,n=!1){t&&Pv(t);const{props:i,children:o}=e.vnode,s=ZE(e);mV(e,i,s,t),xV(e,o,n||t);const r=s?$V(e,t):void 0;return t&&Pv(!1),r}function $V(e,t){const n=e.type;if(M.env.NODE_ENV!=="production"){if(n.name&&Iv(n.name,e.appContext.config),n.components){const o=Object.keys(n.components);for(let s=0;s<o.length;s++)Iv(o[s],e.appContext.config)}if(n.directives){const o=Object.keys(n.directives);for(let s=0;s<o.length;s++)rE(o[s])}n.compilerOptions&&WV()&&Ne('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,mE),M.env.NODE_ENV!=="production"&&qN(e);const{setup:i}=n;if(i){Po();const o=e.setupContext=i.length>1?eR(e):null,s=Fu(e),r=Al(i,e,0,[M.env.NODE_ENV!=="production"?ns(e.props):e.props,o]),a=Hm(r);if(Io(),s(),(a||e.sp)&&!Ml(e)&&lE(e),a){if(r.then(YE,YE),t)return r.then(l=>{XE(e,l,t)}).catch(l=>{mu(l,e,0)});if(e.asyncDep=r,M.env.NODE_ENV!=="production"&&!e.suspense){const l=Pu(e,n);Ne(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else XE(e,r,t)}else JE(e,t)}function XE(e,t,n){yt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ut(t)?(M.env.NODE_ENV!=="production"&&Pa(t)&&Ne("setup() should not return VNodes directly - return a render function instead."),M.env.NODE_ENV!=="production"&&(e.devtoolsRawSetupState=t),e.setupState=K0(t),M.env.NODE_ENV!=="production"&&YN(e)):M.env.NODE_ENV!=="production"&&t!==void 0&&Ne(`setup() should return an object. Received: ${t===null?"null":typeof t}`),JE(e,n)}const WV=()=>!0;function JE(e,t,n){const i=e.type;e.render||(e.render=i.render||Bn);{const o=Fu(e);Po();try{JN(e)}finally{Io(),o()}}M.env.NODE_ENV!=="production"&&!i.render&&e.render===Bn&&!t&&(i.template?Ne('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):Ne("Component is missing template or render function: ",i))}const QE=M.env.NODE_ENV!=="production"?{get(e,t){return df(),zn(e,"get",""),e[t]},set(){return Ne("setupContext.attrs is readonly."),!1},deleteProperty(){return Ne("setupContext.attrs is readonly."),!1}}:{get(e,t){return zn(e,"get",""),e[t]}};function zV(e){return new Proxy(e.slots,{get(t,n){return zn(e,"get","$slots"),t[n]}})}function eR(e){const t=n=>{if(M.env.NODE_ENV!=="production"&&(e.exposed&&Ne("expose() should be called only once per setup()."),n!=null)){let i=typeof n;i==="object"&&(ht(n)?i="array":Qt(n)&&(i="ref")),i!=="object"&&Ne(`expose() should be passed a plain object, received ${i}.`)}e.exposed=n||{}};if(M.env.NODE_ENV!=="production"){let n,i;return Object.freeze({get attrs(){return n||(n=new Proxy(e.attrs,QE))},get slots(){return i||(i=zV(e))},get emit(){return(o,...s)=>e.emit(o,...s)},expose:t})}else return{attrs:new Proxy(e.attrs,QE),slots:e.slots,emit:e.emit,expose:t}}function yf(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(K0(Dr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in _a)return _a[n](e)},has(t,n){return n in t||n in _a}})):e.proxy}const UV=/(?:^|[-_])\w/g,jV=e=>e.replace(UV,t=>t.toUpperCase()).replace(/[-_]/g,"");function Av(e,t=!0){return yt(e)?e.displayName||e.name:e.name||t&&e.__name}function Pu(e,t,n=!1){let i=Av(t);if(!i&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(i=o[1])}if(!i&&e){const o=s=>{for(const r in s)if(s[r]===t)return r};i=o(e.components)||e.parent&&o(e.parent.type.components)||o(e.appContext.components)}return i?jV(i):n?"App":"Anonymous"}function tR(e){return yt(e)&&"__vccOpts"in e}const j=(e,t)=>{const n=cN(e,t,Tu);if(M.env.NODE_ENV!=="production"){const i=Si();i&&i.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function kv(e,t,n){try{pf(-1);const i=arguments.length;return i===2?Ut(t)&&!ht(t)?Pa(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Pa(n)&&(n=[n]),ye(e,t,n))}finally{pf(1)}}function KV(){if(M.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},i={style:"color:#eb2f96"},o={__vue_custom_formatter:!0,header(d){if(!Ut(d))return null;if(d.__isVue)return["div",e,"VueInstance"];if(Qt(d)){Po();const h=d.value;return Io(),["div",{},["span",e,u(d)],"<",a(h),">"]}else{if(oo(d))return["div",{},["span",e,li(d)?"ShallowReactive":"Reactive"],"<",a(d),`>${ko(d)?" (readonly)":""}`];if(ko(d))return["div",{},["span",e,li(d)?"ShallowReadonly":"Readonly"],"<",a(d),">"]}return null},hasBody(d){return d&&d.__isVue},body(d){if(d&&d.__isVue)return["div",{},...s(d.$)]}};function s(d){const h=[];d.type.props&&d.props&&h.push(r("props",St(d.props))),d.setupState!==Nt&&h.push(r("setup",d.setupState)),d.data!==Nt&&h.push(r("data",St(d.data)));const f=l(d,"computed");f&&h.push(r("computed",f));const g=l(d,"inject");return g&&h.push(r("injected",g)),h.push(["div",{},["span",{style:i.style+";opacity:0.66"},"$ (internal): "],["object",{object:d}]]),h}function r(d,h){return h=dn({},h),Object.keys(h).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},d],["div",{style:"padding-left:1.25em"},...Object.keys(h).map(f=>["div",{},["span",i,f+": "],a(h[f],!1)])]]:["span",{}]}function a(d,h=!0){return typeof d=="number"?["span",t,d]:typeof d=="string"?["span",n,JSON.stringify(d)]:typeof d=="boolean"?["span",i,d]:Ut(d)?["object",{object:h?St(d):d}]:["span",n,String(d)]}function l(d,h){const f=d.type;if(yt(f))return;const g={};for(const m in d.ctx)c(f,m,h)&&(g[m]=d.ctx[m]);return g}function c(d,h,f){const g=d[f];if(ht(g)&&g.includes(h)||Ut(g)&&h in g||d.extends&&c(d.extends,h,f)||d.mixins&&d.mixins.some(m=>c(m,h,f)))return!0}function u(d){return li(d)?"ShallowRef":d.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(o):window.devtoolsFormatters=[o]}const nR="3.5.25",Pi=M.env.NODE_ENV!=="production"?Ne:Bn;M.env.NODE_ENV,M.env.NODE_ENV;/**
|
|
21
21
|
* @vue/runtime-dom v3.5.25
|
|
22
22
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -26,7 +26,7 @@ Expected function or array of functions, received type ${typeof e}.`),Bn)}functi
|
|
|
26
26
|
* vue v3.5.25
|
|
27
27
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
28
28
|
* @license MIT
|
|
29
|
-
**/function PB(){KV()}M.env.NODE_ENV!=="production"&&PB();function LR(e){if(!e||typeof e!="string")return null;const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);return t?{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:t[4]!==void 0?parseFloat(t[4]):1}:null}function Gv(e){const t=[e.r,e.g,e.b].map(n=>(n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)));return t[0]*.2126+t[1]*.7152+t[2]*.0722}function IB(e,t){const n=Gv(e),i=Gv(t),o=Math.max(n,i),s=Math.min(n,i);return(o+.05)/(s+.05)}function AB(e){return Gv(e)>.5?"#000000":"#FFFFFF"}const NR=e=>{const n=window.getComputedStyle(e),i=n.backgroundColor,o=n.color,s=LR(i),r=LR(o);if(!s||!r||s.a===0)return;IB(s,r)<4.5&&(e.style.color=AB(s))},kB={mounted(e){qt(()=>{NR(e)})},updated(e){qt(()=>{NR(e)})}},VR=(e,t)=>{const n=e;n&&(n.classList.add("skeleton-loading-wrapper"),requestAnimationFrame(()=>{n.style.setProperty("--loading-overlay-width",t.fullwidth?"100%":`${Math.max(50,Math.round(Math.random()*100))}%`),n.style.setProperty("--loading","block")}))},BR=e=>{const t=e;t&&requestAnimationFrame(()=>{t.style.setProperty("--loading","none")})},$v=e=>typeof e=="boolean"?{isLoading:e}:e,ls={mounted(e,t){const n=$v(t.value);e.classList.add("skeleton-loading-wrapper"),n.isLoading&&VR(e,n)},updated(e,t){if(t.value===t.oldValue)return;const n=$v(t.value),i=$v(t.oldValue??!1);n.isLoading!==i.isLoading&&(n.isLoading?VR(e,n):BR(e))},beforeUnmount(e){BR(e)}};var Ii="top",ro="bottom",ao="right",Ai="left",Wv="auto",ku=[Ii,ro,ao,Ai],Wl="start",Ou="end",OB="clippingParents",HR="viewport",Mu="popper",MB="reference",GR=ku.reduce(function(e,t){return e.concat([t+"-"+Wl,t+"-"+Ou])},[]),$R=[].concat(ku,[Wv]).reduce(function(e,t){return e.concat([t,t+"-"+Wl,t+"-"+Ou])},[]),LB="beforeRead",NB="read",VB="afterRead",BB="beforeMain",HB="main",GB="afterMain",$B="beforeWrite",WB="write",zB="afterWrite",UB=[LB,NB,VB,BB,HB,GB,$B,WB,zB];function cs(e){return e?(e.nodeName||"").toLowerCase():null}function Wi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Aa(e){var t=Wi(e).Element;return e instanceof t||e instanceof Element}function lo(e){var t=Wi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zv(e){if(typeof ShadowRoot>"u")return!1;var t=Wi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jB(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!lo(s)||!cs(s)||(Object.assign(s.style,i),Object.keys(o).forEach(function(r){var a=o[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function KB(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],s=t.attributes[i]||{},r=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),a=r.reduce(function(l,c){return l[c]="",l},{});!lo(o)||!cs(o)||(Object.assign(o.style,a),Object.keys(s).forEach(function(l){o.removeAttribute(l)}))})}}const WR={name:"applyStyles",enabled:!0,phase:"write",fn:jB,effect:KB,requires:["computeStyles"]};function us(e){return e.split("-")[0]}var ka=Math.max,Rf=Math.min,zl=Math.round;function Uv(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zR(){return!/^((?!chrome|android).)*safari/i.test(Uv())}function Ul(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),o=1,s=1;t&&lo(e)&&(o=e.offsetWidth>0&&zl(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&zl(i.height)/e.offsetHeight||1);var r=Aa(e)?Wi(e):window,a=r.visualViewport,l=!zR()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/o,u=(i.top+(l&&a?a.offsetTop:0))/s,d=i.width/o,h=i.height/s;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function jv(e){var t=Ul(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function UR(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zv(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Us(e){return Wi(e).getComputedStyle(e)}function qB(e){return["table","td","th"].indexOf(cs(e))>=0}function Ir(e){return((Aa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Df(e){return cs(e)==="html"?e:e.assignedSlot||e.parentNode||(zv(e)?e.host:null)||Ir(e)}function jR(e){return!lo(e)||Us(e).position==="fixed"?null:e.offsetParent}function YB(e){var t=/firefox/i.test(Uv()),n=/Trident/i.test(Uv());if(n&&lo(e)){var i=Us(e);if(i.position==="fixed")return null}var o=Df(e);for(zv(o)&&(o=o.host);lo(o)&&["html","body"].indexOf(cs(o))<0;){var s=Us(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Lu(e){for(var t=Wi(e),n=jR(e);n&&qB(n)&&Us(n).position==="static";)n=jR(n);return n&&(cs(n)==="html"||cs(n)==="body"&&Us(n).position==="static")?t:n||YB(e)||t}function Kv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nu(e,t,n){return ka(e,Rf(t,n))}function ZB(e,t,n){var i=Nu(e,t,n);return i>n?n:i}function KR(){return{top:0,right:0,bottom:0,left:0}}function qR(e){return Object.assign({},KR(),e)}function YR(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var XB=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,qR(typeof t!="number"?t:YR(t,ku))};function JB(e){var t,n=e.state,i=e.name,o=e.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=us(n.placement),l=Kv(a),c=[Ai,ao].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!r)){var d=XB(o.padding,n),h=jv(s),f=l==="y"?Ii:Ai,g=l==="y"?ro:ao,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],y=r[l]-n.rects.reference[l],b=Lu(s),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,F=m/2-y/2,C=d[f],R=S-h[u]-d[g],E=S/2-h[u]/2+F,_=Nu(C,E,R),I=l;n.modifiersData[i]=(t={},t[I]=_,t.centerOffset=_-E,t)}}function QB(e){var t=e.state,n=e.options,i=n.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||UR(t.elements.popper,o)&&(t.elements.arrow=o))}const e2={name:"arrow",enabled:!0,phase:"main",fn:JB,effect:QB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function jl(e){return e.split("-")[1]}var t2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n2(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:zl(n*o)/o||0,y:zl(i*o)/o||0}}function ZR(e){var t,n=e.popper,i=e.popperRect,o=e.placement,s=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=r.x,f=h===void 0?0:h,g=r.y,m=g===void 0?0:g,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var b=r.hasOwnProperty("x"),S=r.hasOwnProperty("y"),F=Ai,C=Ii,R=window;if(c){var E=Lu(n),_="clientHeight",I="clientWidth";if(E===Wi(n)&&(E=Ir(n),Us(E).position!=="static"&&a==="absolute"&&(_="scrollHeight",I="scrollWidth")),E=E,o===Ii||(o===Ai||o===ao)&&s===Ou){C=ro;var O=d&&E===R&&R.visualViewport?R.visualViewport.height:E[_];m-=O-i.height,m*=l?1:-1}if(o===Ai||(o===Ii||o===ro)&&s===Ou){F=ao;var k=d&&E===R&&R.visualViewport?R.visualViewport.width:E[I];f-=k-i.width,f*=l?1:-1}}var x=Object.assign({position:a},c&&t2),P=u===!0?n2({x:f,y:m},Wi(n)):{x:f,y:m};if(f=P.x,m=P.y,l){var N;return Object.assign({},x,(N={},N[C]=S?"0":"",N[F]=b?"0":"",N.transform=(R.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",N))}return Object.assign({},x,(t={},t[C]=S?m+"px":"",t[F]=b?f+"px":"",t.transform="",t))}function i2(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=i===void 0?!0:i,s=n.adaptive,r=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:us(t.placement),variation:jl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ZR(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ZR(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const o2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:i2,data:{}};var _f={passive:!0};function s2(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,s=o===void 0?!0:o,r=i.resize,a=r===void 0?!0:r,l=Wi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,_f)}),a&&l.addEventListener("resize",n.update,_f),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,_f)}),a&&l.removeEventListener("resize",n.update,_f)}}const r2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:s2,data:{}};var a2={left:"right",right:"left",bottom:"top",top:"bottom"};function xf(e){return e.replace(/left|right|bottom|top/g,function(t){return a2[t]})}var l2={start:"end",end:"start"};function XR(e){return e.replace(/start|end/g,function(t){return l2[t]})}function qv(e){var t=Wi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Yv(e){return Ul(Ir(e)).left+qv(e).scrollLeft}function c2(e,t){var n=Wi(e),i=Ir(e),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var c=zR();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+Yv(e),y:l}}function u2(e){var t,n=Ir(e),i=qv(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ka(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=ka(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+Yv(e),l=-i.scrollTop;return Us(o||n).direction==="rtl"&&(a+=ka(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Zv(e){var t=Us(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function JR(e){return["html","body","#document"].indexOf(cs(e))>=0?e.ownerDocument.body:lo(e)&&Zv(e)?e:JR(Df(e))}function Vu(e,t){var n;t===void 0&&(t=[]);var i=JR(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=Wi(i),r=o?[s].concat(s.visualViewport||[],Zv(i)?i:[]):i,a=t.concat(r);return o?a:a.concat(Vu(Df(r)))}function Xv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function d2(e,t){var n=Ul(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function QR(e,t,n){return t===HR?Xv(c2(e,n)):Aa(t)?d2(t,n):Xv(u2(Ir(e)))}function h2(e){var t=Vu(Df(e)),n=["absolute","fixed"].indexOf(Us(e).position)>=0,i=n&&lo(e)?Lu(e):e;return Aa(i)?t.filter(function(o){return Aa(o)&&UR(o,i)&&cs(o)!=="body"}):[]}function f2(e,t,n,i){var o=t==="clippingParents"?h2(e):[].concat(t),s=[].concat(o,[n]),r=s[0],a=s.reduce(function(l,c){var u=QR(e,c,i);return l.top=ka(u.top,l.top),l.right=Rf(u.right,l.right),l.bottom=Rf(u.bottom,l.bottom),l.left=ka(u.left,l.left),l},QR(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function eD(e){var t=e.reference,n=e.element,i=e.placement,o=i?us(i):null,s=i?jl(i):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case Ii:l={x:r,y:t.y-n.height};break;case ro:l={x:r,y:t.y+t.height};break;case ao:l={x:t.x+t.width,y:a};break;case Ai:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?Kv(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Wl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ou:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Bu(e,t){t===void 0&&(t={});var n=t,i=n.placement,o=i===void 0?e.placement:i,s=n.strategy,r=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?OB:a,c=n.rootBoundary,u=c===void 0?HR:c,d=n.elementContext,h=d===void 0?Mu:d,f=n.altBoundary,g=f===void 0?!1:f,m=n.padding,y=m===void 0?0:m,b=qR(typeof y!="number"?y:YR(y,ku)),S=h===Mu?MB:Mu,F=e.rects.popper,C=e.elements[g?S:h],R=f2(Aa(C)?C:C.contextElement||Ir(e.elements.popper),l,u,r),E=Ul(e.elements.reference),_=eD({reference:E,element:F,placement:o}),I=Xv(Object.assign({},F,_)),O=h===Mu?I:E,k={top:R.top-O.top+b.top,bottom:O.bottom-R.bottom+b.bottom,left:R.left-O.left+b.left,right:O.right-R.right+b.right},x=e.modifiersData.offset;if(h===Mu&&x){var P=x[o];Object.keys(k).forEach(function(N){var G=[ao,ro].indexOf(N)>=0?1:-1,ie=[Ii,ro].indexOf(N)>=0?"y":"x";k[N]+=P[ie]*G})}return k}function p2(e,t){t===void 0&&(t={});var n=t,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?$R:l,u=jl(i),d=u?a?GR:GR.filter(function(g){return jl(g)===u}):ku,h=d.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=d);var f=h.reduce(function(g,m){return g[m]=Bu(e,{placement:m,boundary:o,rootBoundary:s,padding:r})[us(m)],g},{});return Object.keys(f).sort(function(g,m){return f[g]-f[m]})}function g2(e){if(us(e)===Wv)return[];var t=xf(e);return[XR(e),t,XR(t)]}function m2(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,g=f===void 0?!0:f,m=n.allowedAutoPlacements,y=t.options.placement,b=us(y),S=b===y,F=l||(S||!g?[xf(y)]:g2(y)),C=[y].concat(F).reduce(function(Fe,Me){return Fe.concat(us(Me)===Wv?p2(t,{placement:Me,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):Me)},[]),R=t.rects.reference,E=t.rects.popper,_=new Map,I=!0,O=C[0],k=0;k<C.length;k++){var x=C[k],P=us(x),N=jl(x)===Wl,G=[Ii,ro].indexOf(P)>=0,ie=G?"width":"height",B=Bu(t,{placement:x,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),H=G?N?ao:Ai:N?ro:Ii;R[ie]>E[ie]&&(H=xf(H));var X=xf(H),$=[];if(s&&$.push(B[P]<=0),a&&$.push(B[H]<=0,B[X]<=0),$.every(function(Fe){return Fe})){O=x,I=!1;break}_.set(x,$)}if(I)for(var ce=g?3:1,ue=function(Me){var Je=C.find(function(ft){var Mt=_.get(ft);if(Mt)return Mt.slice(0,Me).every(function(Be){return Be})});if(Je)return O=Je,"break"},De=ce;De>0;De--){var ae=ue(De);if(ae==="break")break}t.placement!==O&&(t.modifiersData[i]._skip=!0,t.placement=O,t.reset=!0)}}const v2={name:"flip",enabled:!0,phase:"main",fn:m2,requiresIfExists:["offset"],data:{_skip:!1}};function tD(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function nD(e){return[Ii,ao,ro,Ai].some(function(t){return e[t]>=0})}function y2(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,r=Bu(t,{elementContext:"reference"}),a=Bu(t,{altBoundary:!0}),l=tD(r,i),c=tD(a,o,s),u=nD(l),d=nD(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const C2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:y2};function w2(e,t,n){var i=us(e),o=[Ai,Ii].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[Ai,ao].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function b2(e){var t=e.state,n=e.options,i=e.name,o=n.offset,s=o===void 0?[0,0]:o,r=$R.reduce(function(u,d){return u[d]=w2(d,t.rects,s),u},{}),a=r[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=r}const S2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b2};function E2(e){var t=e.state,n=e.name;t.modifiersData[n]=eD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const R2={name:"popperOffsets",enabled:!0,phase:"read",fn:E2,data:{}};function D2(e){return e==="x"?"y":"x"}function _2(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,s=o===void 0?!0:o,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,g=n.tetherOffset,m=g===void 0?0:g,y=Bu(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=us(t.placement),S=jl(t.placement),F=!S,C=Kv(b),R=D2(C),E=t.modifiersData.popperOffsets,_=t.rects.reference,I=t.rects.popper,O=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,k=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(s){var N,G=C==="y"?Ii:Ai,ie=C==="y"?ro:ao,B=C==="y"?"height":"width",H=E[C],X=H+y[G],$=H-y[ie],ce=f?-I[B]/2:0,ue=S===Wl?_[B]:I[B],De=S===Wl?-I[B]:-_[B],ae=t.elements.arrow,Fe=f&&ae?jv(ae):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:KR(),Je=Me[G],ft=Me[ie],Mt=Nu(0,_[B],Fe[B]),Be=F?_[B]/2-ce-Mt-Je-k.mainAxis:ue-Mt-Je-k.mainAxis,jt=F?-_[B]/2+ce+Mt+ft+k.mainAxis:De+Mt+ft+k.mainAxis,nn=t.elements.arrow&&Lu(t.elements.arrow),Ot=nn?C==="y"?nn.clientTop||0:nn.clientLeft||0:0,V=(N=x==null?void 0:x[C])!=null?N:0,Y=H+Be-V-Ot,pe=H+jt-V,Te=Nu(f?Rf(X,Y):X,H,f?ka($,pe):$);E[C]=Te,P[C]=Te-H}if(a){var Ee,_e=C==="x"?Ii:Ai,Ve=C==="x"?ro:ao,Ae=E[R],Pe=R==="y"?"height":"width",xe=Ae+y[_e],it=Ae-y[Ve],We=[Ii,Ai].indexOf(b)!==-1,at=(Ee=x==null?void 0:x[R])!=null?Ee:0,dt=We?xe:Ae-_[Pe]-I[Pe]-at+k.altAxis,xt=We?Ae+_[Pe]+I[Pe]-at-k.altAxis:it,Lt=f&&We?ZB(dt,Ae,xt):Nu(f?dt:xe,Ae,f?xt:it);E[R]=Lt,P[R]=Lt-Ae}t.modifiersData[i]=P}}const x2={name:"preventOverflow",enabled:!0,phase:"main",fn:_2,requiresIfExists:["offset"]};function F2(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function T2(e){return e===Wi(e)||!lo(e)?qv(e):F2(e)}function P2(e){var t=e.getBoundingClientRect(),n=zl(t.width)/e.offsetWidth||1,i=zl(t.height)/e.offsetHeight||1;return n!==1||i!==1}function I2(e,t,n){n===void 0&&(n=!1);var i=lo(t),o=lo(t)&&P2(t),s=Ir(t),r=Ul(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((cs(t)!=="body"||Zv(s))&&(a=T2(t)),lo(t)?(l=Ul(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=Yv(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function A2(e){var t=new Map,n=new Set,i=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),i.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),i}function k2(e){var t=A2(e);return UB.reduce(function(n,i){return n.concat(t.filter(function(o){return o.phase===i}))},[])}function O2(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function M2(e){var t=e.reduce(function(n,i){var o=n[i.name];return n[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var iD={placement:"bottom",modifiers:[],strategy:"absolute"};function oD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function L2(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?iD:o;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},iD,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,f={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;m(),u.options=Object.assign({},s,u.options,S),u.scrollParents={reference:Aa(a)?Vu(a):a.contextElement?Vu(a.contextElement):[],popper:Vu(l)};var F=k2(M2([].concat(i,u.options.modifiers)));return u.orderedModifiers=F.filter(function(C){return C.enabled}),g(),f.update()},forceUpdate:function(){if(!h){var b=u.elements,S=b.reference,F=b.popper;if(oD(S,F)){u.rects={reference:I2(S,Lu(F),u.options.strategy==="fixed"),popper:jv(F)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(k){return u.modifiersData[k.name]=Object.assign({},k.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var R=u.orderedModifiers[C],E=R.fn,_=R.options,I=_===void 0?{}:_,O=R.name;typeof E=="function"&&(u=E({state:u,options:I,name:O,instance:f})||u)}}}},update:O2(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){m(),h=!0}};if(!oD(a,l))return f;f.setOptions(c).then(function(y){!h&&c.onFirstUpdate&&c.onFirstUpdate(y)});function g(){u.orderedModifiers.forEach(function(y){var b=y.name,S=y.options,F=S===void 0?{}:S,C=y.effect;if(typeof C=="function"){var R=C({state:u,name:b,instance:f,options:F}),E=function(){};d.push(R||E)}})}function m(){d.forEach(function(y){return y()}),d=[]}return f}}var N2=[r2,R2,o2,WR,S2,v2,x2,e2,C2],V2=L2({defaultModifiers:N2}),B2="tippy-box",sD="tippy-content",H2="tippy-backdrop",rD="tippy-arrow",aD="tippy-svg-arrow",Oa={passive:!0,capture:!0},lD=function(){return document.body};function G2(e,t){return{}.hasOwnProperty.call(e,t)}function Jv(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function Qv(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function cD(e,t){return typeof e=="function"?e.apply(void 0,t):e}function uD(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function $2(e,t){var n=Object.assign({},e);return t.forEach(function(i){delete n[i]}),n}function W2(e){return e.split(/\s+/).filter(Boolean)}function Kl(e){return[].concat(e)}function dD(e,t){e.indexOf(t)===-1&&e.push(t)}function z2(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function U2(e){return e.split("-")[0]}function Ff(e){return[].slice.call(e)}function hD(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Hu(){return document.createElement("div")}function Gu(e){return["Element","Fragment"].some(function(t){return Qv(e,t)})}function j2(e){return Qv(e,"NodeList")}function K2(e){return Qv(e,"MouseEvent")}function q2(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Y2(e){return Gu(e)?[e]:j2(e)?Ff(e):Array.isArray(e)?e:Ff(document.querySelectorAll(e))}function ey(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function fD(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Z2(e){var t,n=Kl(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function X2(e,t){var n=t.clientX,i=t.clientY;return e.every(function(o){var s=o.popperRect,r=o.popperState,a=o.props,l=a.interactiveBorder,c=U2(r.placement),u=r.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,f=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=s.top-i+d>l,y=i-s.bottom-h>l,b=s.left-n+f>l,S=n-s.right-g>l;return m||y||b||S})}function ty(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,n)})}function pD(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var ds={isTouch:!1},gD=0;function J2(){ds.isTouch||(ds.isTouch=!0,window.performance&&document.addEventListener("mousemove",mD))}function mD(){var e=performance.now();e-gD<20&&(ds.isTouch=!1,document.removeEventListener("mousemove",mD)),gD=e}function Q2(){var e=document.activeElement;if(q2(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function eH(){document.addEventListener("touchstart",J2,Oa),window.addEventListener("blur",Q2)}var tH=typeof window<"u"&&typeof document<"u",nH=tH?!!window.msCrypto:!1;function ql(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function vD(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function iH(e){return vD(`
|
|
29
|
+
**/function PB(){KV()}M.env.NODE_ENV!=="production"&&PB();function LR(e){if(!e||typeof e!="string")return null;const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);return t?{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:t[4]!==void 0?parseFloat(t[4]):1}:null}function Gv(e){const t=[e.r,e.g,e.b].map(n=>(n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)));return t[0]*.2126+t[1]*.7152+t[2]*.0722}function IB(e,t){const n=Gv(e),i=Gv(t),o=Math.max(n,i),s=Math.min(n,i);return(o+.05)/(s+.05)}function AB(e){return Gv(e)>.5?"#000000":"#FFFFFF"}const NR=e=>{const n=window.getComputedStyle(e),i=n.backgroundColor,o=n.color,s=LR(i),r=LR(o);if(!s||!r||s.a===0)return;IB(s,r)<4.5&&(e.style.color=AB(s))},kB={mounted(e){qt(()=>{NR(e)})},updated(e){qt(()=>{NR(e)})}},VR=(e,t)=>{const n=e;n&&(n.classList.add("skeleton-loading-wrapper"),requestAnimationFrame(()=>{n.style.setProperty("--loading-overlay-width",t.fullwidth?"100%":`${Math.max(50,Math.round(Math.random()*100))}%`),n.style.setProperty("--loading","block")}))},BR=e=>{const t=e;t&&requestAnimationFrame(()=>{t.style.setProperty("--loading","none")})},$v=e=>typeof e=="boolean"?{isLoading:e}:e,ls={mounted(e,t){const n=$v(t.value);e.classList.add("skeleton-loading-wrapper"),n.isLoading&&VR(e,n)},updated(e,t){if(t.value===t.oldValue)return;const n=$v(t.value),i=$v(t.oldValue??!1);n.isLoading!==i.isLoading&&(n.isLoading?VR(e,n):BR(e))},beforeUnmount(e){BR(e)}};var Ii="top",ro="bottom",ao="right",Ai="left",Wv="auto",ku=[Ii,ro,ao,Ai],Wl="start",Ou="end",OB="clippingParents",HR="viewport",Mu="popper",MB="reference",GR=ku.reduce(function(e,t){return e.concat([t+"-"+Wl,t+"-"+Ou])},[]),$R=[].concat(ku,[Wv]).reduce(function(e,t){return e.concat([t,t+"-"+Wl,t+"-"+Ou])},[]),LB="beforeRead",NB="read",VB="afterRead",BB="beforeMain",HB="main",GB="afterMain",$B="beforeWrite",WB="write",zB="afterWrite",UB=[LB,NB,VB,BB,HB,GB,$B,WB,zB];function cs(e){return e?(e.nodeName||"").toLowerCase():null}function Wi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Aa(e){var t=Wi(e).Element;return e instanceof t||e instanceof Element}function lo(e){var t=Wi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zv(e){if(typeof ShadowRoot>"u")return!1;var t=Wi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jB(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var i=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!lo(s)||!cs(s)||(Object.assign(s.style,i),Object.keys(o).forEach(function(r){var a=o[r];a===!1?s.removeAttribute(r):s.setAttribute(r,a===!0?"":a)}))})}function KB(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(i){var o=t.elements[i],s=t.attributes[i]||{},r=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:n[i]),a=r.reduce(function(l,c){return l[c]="",l},{});!lo(o)||!cs(o)||(Object.assign(o.style,a),Object.keys(s).forEach(function(l){o.removeAttribute(l)}))})}}const WR={name:"applyStyles",enabled:!0,phase:"write",fn:jB,effect:KB,requires:["computeStyles"]};function us(e){return e.split("-")[0]}var ka=Math.max,Rf=Math.min,zl=Math.round;function Uv(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zR(){return!/^((?!chrome|android).)*safari/i.test(Uv())}function Ul(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var i=e.getBoundingClientRect(),o=1,s=1;t&&lo(e)&&(o=e.offsetWidth>0&&zl(i.width)/e.offsetWidth||1,s=e.offsetHeight>0&&zl(i.height)/e.offsetHeight||1);var r=Aa(e)?Wi(e):window,a=r.visualViewport,l=!zR()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/o,u=(i.top+(l&&a?a.offsetTop:0))/s,d=i.width/o,h=i.height/s;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function jv(e){var t=Ul(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function UR(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zv(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Us(e){return Wi(e).getComputedStyle(e)}function qB(e){return["table","td","th"].indexOf(cs(e))>=0}function Ir(e){return((Aa(e)?e.ownerDocument:e.document)||window.document).documentElement}function Df(e){return cs(e)==="html"?e:e.assignedSlot||e.parentNode||(zv(e)?e.host:null)||Ir(e)}function jR(e){return!lo(e)||Us(e).position==="fixed"?null:e.offsetParent}function YB(e){var t=/firefox/i.test(Uv()),n=/Trident/i.test(Uv());if(n&&lo(e)){var i=Us(e);if(i.position==="fixed")return null}var o=Df(e);for(zv(o)&&(o=o.host);lo(o)&&["html","body"].indexOf(cs(o))<0;){var s=Us(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Lu(e){for(var t=Wi(e),n=jR(e);n&&qB(n)&&Us(n).position==="static";)n=jR(n);return n&&(cs(n)==="html"||cs(n)==="body"&&Us(n).position==="static")?t:n||YB(e)||t}function Kv(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nu(e,t,n){return ka(e,Rf(t,n))}function ZB(e,t,n){var i=Nu(e,t,n);return i>n?n:i}function KR(){return{top:0,right:0,bottom:0,left:0}}function qR(e){return Object.assign({},KR(),e)}function YR(e,t){return t.reduce(function(n,i){return n[i]=e,n},{})}var XB=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,qR(typeof t!="number"?t:YR(t,ku))};function JB(e){var t,n=e.state,i=e.name,o=e.options,s=n.elements.arrow,r=n.modifiersData.popperOffsets,a=us(n.placement),l=Kv(a),c=[Ai,ao].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!r)){var d=XB(o.padding,n),h=jv(s),f=l==="y"?Ii:Ai,g=l==="y"?ro:ao,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],y=r[l]-n.rects.reference[l],b=Lu(s),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,F=m/2-y/2,C=d[f],R=S-h[u]-d[g],E=S/2-h[u]/2+F,_=Nu(C,E,R),I=l;n.modifiersData[i]=(t={},t[I]=_,t.centerOffset=_-E,t)}}function QB(e){var t=e.state,n=e.options,i=n.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||UR(t.elements.popper,o)&&(t.elements.arrow=o))}const e2={name:"arrow",enabled:!0,phase:"main",fn:JB,effect:QB,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function jl(e){return e.split("-")[1]}var t2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function n2(e,t){var n=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:zl(n*o)/o||0,y:zl(i*o)/o||0}}function ZR(e){var t,n=e.popper,i=e.popperRect,o=e.placement,s=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=r.x,f=h===void 0?0:h,g=r.y,m=g===void 0?0:g,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var b=r.hasOwnProperty("x"),S=r.hasOwnProperty("y"),F=Ai,C=Ii,R=window;if(c){var E=Lu(n),_="clientHeight",I="clientWidth";if(E===Wi(n)&&(E=Ir(n),Us(E).position!=="static"&&a==="absolute"&&(_="scrollHeight",I="scrollWidth")),E=E,o===Ii||(o===Ai||o===ao)&&s===Ou){C=ro;var O=d&&E===R&&R.visualViewport?R.visualViewport.height:E[_];m-=O-i.height,m*=l?1:-1}if(o===Ai||(o===Ii||o===ro)&&s===Ou){F=ao;var k=d&&E===R&&R.visualViewport?R.visualViewport.width:E[I];f-=k-i.width,f*=l?1:-1}}var x=Object.assign({position:a},c&&t2),P=u===!0?n2({x:f,y:m},Wi(n)):{x:f,y:m};if(f=P.x,m=P.y,l){var N;return Object.assign({},x,(N={},N[C]=S?"0":"",N[F]=b?"0":"",N.transform=(R.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",N))}return Object.assign({},x,(t={},t[C]=S?m+"px":"",t[F]=b?f+"px":"",t.transform="",t))}function i2(e){var t=e.state,n=e.options,i=n.gpuAcceleration,o=i===void 0?!0:i,s=n.adaptive,r=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:us(t.placement),variation:jl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ZR(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ZR(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const o2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:i2,data:{}};var _f={passive:!0};function s2(e){var t=e.state,n=e.instance,i=e.options,o=i.scroll,s=o===void 0?!0:o,r=i.resize,a=r===void 0?!0:r,l=Wi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,_f)}),a&&l.addEventListener("resize",n.update,_f),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,_f)}),a&&l.removeEventListener("resize",n.update,_f)}}const r2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:s2,data:{}};var a2={left:"right",right:"left",bottom:"top",top:"bottom"};function xf(e){return e.replace(/left|right|bottom|top/g,function(t){return a2[t]})}var l2={start:"end",end:"start"};function XR(e){return e.replace(/start|end/g,function(t){return l2[t]})}function qv(e){var t=Wi(e),n=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Yv(e){return Ul(Ir(e)).left+qv(e).scrollLeft}function c2(e,t){var n=Wi(e),i=Ir(e),o=n.visualViewport,s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;var c=zR();(c||!c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:a+Yv(e),y:l}}function u2(e){var t,n=Ir(e),i=qv(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=ka(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),r=ka(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-i.scrollLeft+Yv(e),l=-i.scrollTop;return Us(o||n).direction==="rtl"&&(a+=ka(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:r,x:a,y:l}}function Zv(e){var t=Us(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function JR(e){return["html","body","#document"].indexOf(cs(e))>=0?e.ownerDocument.body:lo(e)&&Zv(e)?e:JR(Df(e))}function Vu(e,t){var n;t===void 0&&(t=[]);var i=JR(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=Wi(i),r=o?[s].concat(s.visualViewport||[],Zv(i)?i:[]):i,a=t.concat(r);return o?a:a.concat(Vu(Df(r)))}function Xv(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function d2(e,t){var n=Ul(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function QR(e,t,n){return t===HR?Xv(c2(e,n)):Aa(t)?d2(t,n):Xv(u2(Ir(e)))}function h2(e){var t=Vu(Df(e)),n=["absolute","fixed"].indexOf(Us(e).position)>=0,i=n&&lo(e)?Lu(e):e;return Aa(i)?t.filter(function(o){return Aa(o)&&UR(o,i)&&cs(o)!=="body"}):[]}function f2(e,t,n,i){var o=t==="clippingParents"?h2(e):[].concat(t),s=[].concat(o,[n]),r=s[0],a=s.reduce(function(l,c){var u=QR(e,c,i);return l.top=ka(u.top,l.top),l.right=Rf(u.right,l.right),l.bottom=Rf(u.bottom,l.bottom),l.left=ka(u.left,l.left),l},QR(e,r,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function eD(e){var t=e.reference,n=e.element,i=e.placement,o=i?us(i):null,s=i?jl(i):null,r=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case Ii:l={x:r,y:t.y-n.height};break;case ro:l={x:r,y:t.y+t.height};break;case ao:l={x:t.x+t.width,y:a};break;case Ai:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=o?Kv(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Wl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ou:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Bu(e,t){t===void 0&&(t={});var n=t,i=n.placement,o=i===void 0?e.placement:i,s=n.strategy,r=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?OB:a,c=n.rootBoundary,u=c===void 0?HR:c,d=n.elementContext,h=d===void 0?Mu:d,f=n.altBoundary,g=f===void 0?!1:f,m=n.padding,y=m===void 0?0:m,b=qR(typeof y!="number"?y:YR(y,ku)),S=h===Mu?MB:Mu,F=e.rects.popper,C=e.elements[g?S:h],R=f2(Aa(C)?C:C.contextElement||Ir(e.elements.popper),l,u,r),E=Ul(e.elements.reference),_=eD({reference:E,element:F,placement:o}),I=Xv(Object.assign({},F,_)),O=h===Mu?I:E,k={top:R.top-O.top+b.top,bottom:O.bottom-R.bottom+b.bottom,left:R.left-O.left+b.left,right:O.right-R.right+b.right},x=e.modifiersData.offset;if(h===Mu&&x){var P=x[o];Object.keys(k).forEach(function(N){var G=[ao,ro].indexOf(N)>=0?1:-1,ie=[Ii,ro].indexOf(N)>=0?"y":"x";k[N]+=P[ie]*G})}return k}function p2(e,t){t===void 0&&(t={});var n=t,i=n.placement,o=n.boundary,s=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?$R:l,u=jl(i),d=u?a?GR:GR.filter(function(g){return jl(g)===u}):ku,h=d.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=d);var f=h.reduce(function(g,m){return g[m]=Bu(e,{placement:m,boundary:o,rootBoundary:s,padding:r})[us(m)],g},{});return Object.keys(f).sort(function(g,m){return f[g]-f[m]})}function g2(e){if(us(e)===Wv)return[];var t=xf(e);return[XR(e),t,XR(t)]}function m2(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,g=f===void 0?!0:f,m=n.allowedAutoPlacements,y=t.options.placement,b=us(y),S=b===y,F=l||(S||!g?[xf(y)]:g2(y)),C=[y].concat(F).reduce(function(Fe,Me){return Fe.concat(us(Me)===Wv?p2(t,{placement:Me,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):Me)},[]),R=t.rects.reference,E=t.rects.popper,_=new Map,I=!0,O=C[0],k=0;k<C.length;k++){var x=C[k],P=us(x),N=jl(x)===Wl,G=[Ii,ro].indexOf(P)>=0,ie=G?"width":"height",B=Bu(t,{placement:x,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),H=G?N?ao:Ai:N?ro:Ii;R[ie]>E[ie]&&(H=xf(H));var X=xf(H),$=[];if(s&&$.push(B[P]<=0),a&&$.push(B[H]<=0,B[X]<=0),$.every(function(Fe){return Fe})){O=x,I=!1;break}_.set(x,$)}if(I)for(var ce=g?3:1,ue=function(Me){var Je=C.find(function(pt){var Mt=_.get(pt);if(Mt)return Mt.slice(0,Me).every(function(Be){return Be})});if(Je)return O=Je,"break"},De=ce;De>0;De--){var ae=ue(De);if(ae==="break")break}t.placement!==O&&(t.modifiersData[i]._skip=!0,t.placement=O,t.reset=!0)}}const v2={name:"flip",enabled:!0,phase:"main",fn:m2,requiresIfExists:["offset"],data:{_skip:!1}};function tD(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function nD(e){return[Ii,ao,ro,Ai].some(function(t){return e[t]>=0})}function y2(e){var t=e.state,n=e.name,i=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,r=Bu(t,{elementContext:"reference"}),a=Bu(t,{altBoundary:!0}),l=tD(r,i),c=tD(a,o,s),u=nD(l),d=nD(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const C2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:y2};function w2(e,t,n){var i=us(e),o=[Ai,Ii].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,r=s[0],a=s[1];return r=r||0,a=(a||0)*o,[Ai,ao].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function b2(e){var t=e.state,n=e.options,i=e.name,o=n.offset,s=o===void 0?[0,0]:o,r=$R.reduce(function(u,d){return u[d]=w2(d,t.rects,s),u},{}),a=r[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=r}const S2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:b2};function E2(e){var t=e.state,n=e.name;t.modifiersData[n]=eD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const R2={name:"popperOffsets",enabled:!0,phase:"read",fn:E2,data:{}};function D2(e){return e==="x"?"y":"x"}function _2(e){var t=e.state,n=e.options,i=e.name,o=n.mainAxis,s=o===void 0?!0:o,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,g=n.tetherOffset,m=g===void 0?0:g,y=Bu(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=us(t.placement),S=jl(t.placement),F=!S,C=Kv(b),R=D2(C),E=t.modifiersData.popperOffsets,_=t.rects.reference,I=t.rects.popper,O=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,k=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(s){var N,G=C==="y"?Ii:Ai,ie=C==="y"?ro:ao,B=C==="y"?"height":"width",H=E[C],X=H+y[G],$=H-y[ie],ce=f?-I[B]/2:0,ue=S===Wl?_[B]:I[B],De=S===Wl?-I[B]:-_[B],ae=t.elements.arrow,Fe=f&&ae?jv(ae):{width:0,height:0},Me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:KR(),Je=Me[G],pt=Me[ie],Mt=Nu(0,_[B],Fe[B]),Be=F?_[B]/2-ce-Mt-Je-k.mainAxis:ue-Mt-Je-k.mainAxis,jt=F?-_[B]/2+ce+Mt+pt+k.mainAxis:De+Mt+pt+k.mainAxis,nn=t.elements.arrow&&Lu(t.elements.arrow),Ot=nn?C==="y"?nn.clientTop||0:nn.clientLeft||0:0,V=(N=x==null?void 0:x[C])!=null?N:0,Y=H+Be-V-Ot,pe=H+jt-V,Te=Nu(f?Rf(X,Y):X,H,f?ka($,pe):$);E[C]=Te,P[C]=Te-H}if(a){var Ee,_e=C==="x"?Ii:Ai,Ve=C==="x"?ro:ao,Ae=E[R],Pe=R==="y"?"height":"width",xe=Ae+y[_e],it=Ae-y[Ve],We=[Ii,Ai].indexOf(b)!==-1,at=(Ee=x==null?void 0:x[R])!=null?Ee:0,dt=We?xe:Ae-_[Pe]-I[Pe]-at+k.altAxis,xt=We?Ae+_[Pe]+I[Pe]-at-k.altAxis:it,Lt=f&&We?ZB(dt,Ae,xt):Nu(f?dt:xe,Ae,f?xt:it);E[R]=Lt,P[R]=Lt-Ae}t.modifiersData[i]=P}}const x2={name:"preventOverflow",enabled:!0,phase:"main",fn:_2,requiresIfExists:["offset"]};function F2(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function T2(e){return e===Wi(e)||!lo(e)?qv(e):F2(e)}function P2(e){var t=e.getBoundingClientRect(),n=zl(t.width)/e.offsetWidth||1,i=zl(t.height)/e.offsetHeight||1;return n!==1||i!==1}function I2(e,t,n){n===void 0&&(n=!1);var i=lo(t),o=lo(t)&&P2(t),s=Ir(t),r=Ul(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((cs(t)!=="body"||Zv(s))&&(a=T2(t)),lo(t)?(l=Ul(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=Yv(s))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function A2(e){var t=new Map,n=new Set,i=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var r=[].concat(s.requires||[],s.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),i.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),i}function k2(e){var t=A2(e);return UB.reduce(function(n,i){return n.concat(t.filter(function(o){return o.phase===i}))},[])}function O2(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function M2(e){var t=e.reduce(function(n,i){var o=n[i.name];return n[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,n},{});return Object.keys(t).map(function(n){return t[n]})}var iD={placement:"bottom",modifiers:[],strategy:"absolute"};function oD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function L2(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,i=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?iD:o;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},iD,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],h=!1,f={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;m(),u.options=Object.assign({},s,u.options,S),u.scrollParents={reference:Aa(a)?Vu(a):a.contextElement?Vu(a.contextElement):[],popper:Vu(l)};var F=k2(M2([].concat(i,u.options.modifiers)));return u.orderedModifiers=F.filter(function(C){return C.enabled}),g(),f.update()},forceUpdate:function(){if(!h){var b=u.elements,S=b.reference,F=b.popper;if(oD(S,F)){u.rects={reference:I2(S,Lu(F),u.options.strategy==="fixed"),popper:jv(F)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(k){return u.modifiersData[k.name]=Object.assign({},k.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var R=u.orderedModifiers[C],E=R.fn,_=R.options,I=_===void 0?{}:_,O=R.name;typeof E=="function"&&(u=E({state:u,options:I,name:O,instance:f})||u)}}}},update:O2(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){m(),h=!0}};if(!oD(a,l))return f;f.setOptions(c).then(function(y){!h&&c.onFirstUpdate&&c.onFirstUpdate(y)});function g(){u.orderedModifiers.forEach(function(y){var b=y.name,S=y.options,F=S===void 0?{}:S,C=y.effect;if(typeof C=="function"){var R=C({state:u,name:b,instance:f,options:F}),E=function(){};d.push(R||E)}})}function m(){d.forEach(function(y){return y()}),d=[]}return f}}var N2=[r2,R2,o2,WR,S2,v2,x2,e2,C2],V2=L2({defaultModifiers:N2}),B2="tippy-box",sD="tippy-content",H2="tippy-backdrop",rD="tippy-arrow",aD="tippy-svg-arrow",Oa={passive:!0,capture:!0},lD=function(){return document.body};function G2(e,t){return{}.hasOwnProperty.call(e,t)}function Jv(e,t,n){if(Array.isArray(e)){var i=e[t];return i??(Array.isArray(n)?n[t]:n)}return e}function Qv(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function cD(e,t){return typeof e=="function"?e.apply(void 0,t):e}function uD(e,t){if(t===0)return e;var n;return function(i){clearTimeout(n),n=setTimeout(function(){e(i)},t)}}function $2(e,t){var n=Object.assign({},e);return t.forEach(function(i){delete n[i]}),n}function W2(e){return e.split(/\s+/).filter(Boolean)}function Kl(e){return[].concat(e)}function dD(e,t){e.indexOf(t)===-1&&e.push(t)}function z2(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function U2(e){return e.split("-")[0]}function Ff(e){return[].slice.call(e)}function hD(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Hu(){return document.createElement("div")}function Gu(e){return["Element","Fragment"].some(function(t){return Qv(e,t)})}function j2(e){return Qv(e,"NodeList")}function K2(e){return Qv(e,"MouseEvent")}function q2(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Y2(e){return Gu(e)?[e]:j2(e)?Ff(e):Array.isArray(e)?e:Ff(document.querySelectorAll(e))}function ey(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function fD(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Z2(e){var t,n=Kl(e),i=n[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function X2(e,t){var n=t.clientX,i=t.clientY;return e.every(function(o){var s=o.popperRect,r=o.popperState,a=o.props,l=a.interactiveBorder,c=U2(r.placement),u=r.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,f=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=s.top-i+d>l,y=i-s.bottom-h>l,b=s.left-n+f>l,S=n-s.right-g>l;return m||y||b||S})}function ty(e,t,n){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[i](o,n)})}function pD(e,t){for(var n=t;n;){var i;if(e.contains(n))return!0;n=n.getRootNode==null||(i=n.getRootNode())==null?void 0:i.host}return!1}var ds={isTouch:!1},gD=0;function J2(){ds.isTouch||(ds.isTouch=!0,window.performance&&document.addEventListener("mousemove",mD))}function mD(){var e=performance.now();e-gD<20&&(ds.isTouch=!1,document.removeEventListener("mousemove",mD)),gD=e}function Q2(){var e=document.activeElement;if(q2(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function eH(){document.addEventListener("touchstart",J2,Oa),window.addEventListener("blur",Q2)}var tH=typeof window<"u"&&typeof document<"u",nH=tH?!!window.msCrypto:!1;function ql(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function vD(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function iH(e){return vD(`
|
|
30
30
|
%ctippy.js
|
|
31
31
|
|
|
32
32
|
%c`+vD(e)+`
|
|
@@ -35,18 +35,18 @@ Expected function or array of functions, received type ${typeof e}.`),Bn)}functi
|
|
|
35
35
|
`)}function yD(e){return[iH(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var $u;M.env.NODE_ENV!=="production"&&oH();function oH(){$u=new Set}function js(e,t){if(e&&!$u.has(t)){var n;$u.add(t),(n=console).warn.apply(n,yD(t))}}function ny(e,t){if(e&&!$u.has(t)){var n;$u.add(t),(n=console).error.apply(n,yD(t))}}function sH(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;ny(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ny(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var CD={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},rH={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},zi=Object.assign({appendTo:lD,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},CD,rH),aH=Object.keys(zi),lH=function(t){M.env.NODE_ENV!=="production"&&SD(t,[]);var n=Object.keys(t);n.forEach(function(i){zi[i]=t[i]})};function wD(e){var t=e.plugins||[],n=t.reduce(function(i,o){var s=o.name,r=o.defaultValue;if(s){var a;i[s]=e[s]!==void 0?e[s]:(a=zi[s])!=null?a:r}return i},{});return Object.assign({},e,n)}function cH(e,t){var n=t?Object.keys(wD(Object.assign({},zi,{plugins:t}))):aH,i=n.reduce(function(o,s){var r=(e.getAttribute("data-tippy-"+s)||"").trim();if(!r)return o;if(s==="content")o[s]=r;else try{o[s]=JSON.parse(r)}catch{o[s]=r}return o},{});return i}function bD(e,t){var n=Object.assign({},t,{content:cD(t.content,[e])},t.ignoreAttributes?{}:cH(e,t.plugins));return n.aria=Object.assign({},zi.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function SD(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(i){var o=$2(zi,Object.keys(CD)),s=!G2(o,i);s&&(s=t.filter(function(r){return r.name===i}).length===0),js(s,["`"+i+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
36
36
|
|
|
37
37
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
38
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var uH=function(){return"innerHTML"};function iy(e,t){e[uH()]=t}function ED(e){var t=Hu();return e===!0?t.className=rD:(t.className=aD,Gu(e)?t.appendChild(e):iy(t,e)),t}function RD(e,t){Gu(t.content)?(iy(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?iy(e,t.content):e.textContent=t.content)}function oy(e){var t=e.firstElementChild,n=Ff(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(sD)}),arrow:n.find(function(i){return i.classList.contains(rD)||i.classList.contains(aD)}),backdrop:n.find(function(i){return i.classList.contains(H2)})}}function DD(e){var t=Hu(),n=Hu();n.className=B2,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Hu();i.className=sD,i.setAttribute("data-state","hidden"),RD(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props);function o(s,r){var a=oy(t),l=a.box,c=a.content,u=a.arrow;r.theme?l.setAttribute("data-theme",r.theme):l.removeAttribute("data-theme"),typeof r.animation=="string"?l.setAttribute("data-animation",r.animation):l.removeAttribute("data-animation"),r.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof r.maxWidth=="number"?r.maxWidth+"px":r.maxWidth,r.role?l.setAttribute("role",r.role):l.removeAttribute("role"),(s.content!==r.content||s.allowHTML!==r.allowHTML)&&RD(c,e.props),r.arrow?u?s.arrow!==r.arrow&&(l.removeChild(u),l.appendChild(ED(r.arrow))):l.appendChild(ED(r.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:o}}DD.$$tippy=!0;var dH=1,Tf=[],sy=[];function hH(e,t){var n=bD(e,Object.assign({},zi,wD(hD(t)))),i,o,s,r=!1,a=!1,l=!1,c=!1,u,d,h,f=[],g=uD(Y,n.interactiveDebounce),m,y=dH++,b=null,S=z2(n.plugins),F={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:y,reference:e,popper:Hu(),popperInstance:b,props:n,state:F,plugins:S,clearDelayTimeouts:dt,setProps:xt,setContent:Lt,show:Ht,hide:Dn,hideWithInteractivity:cn,enable:We,disable:at,unmount:qn,destroy:ke};if(!n.render)return M.env.NODE_ENV!=="production"&&ny(!0,"render() function has not been supplied."),C;var R=n.render(C),E=R.popper,_=R.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+C.id,C.popper=E,e._tippy=C,E._tippy=C;var I=S.map(function(q){return q.fn(C)}),O=e.hasAttribute("aria-expanded");return nn(),ce(),H(),X("onCreate",[C]),n.showOnCreate&&xe(),E.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&G().addEventListener("mousemove",g)}),C;function k(){var q=C.props.touch;return Array.isArray(q)?q:[q,0]}function x(){return k()[0]==="hold"}function P(){var q;return!!((q=C.props.render)!=null&&q.$$tippy)}function N(){return m||e}function G(){var q=N().parentNode;return q?Z2(q):document}function ie(){return oy(E)}function B(q){return C.state.isMounted&&!C.state.isVisible||ds.isTouch||u&&u.type==="focus"?0:Jv(C.props.delay,q?0:1,zi.delay)}function H(q){q===void 0&&(q=!1),E.style.pointerEvents=C.props.interactive&&!q?"":"none",E.style.zIndex=""+C.props.zIndex}function X(q,fe,$e){if($e===void 0&&($e=!0),I.forEach(function(Ft){Ft[q]&&Ft[q].apply(Ft,fe)}),$e){var vt;(vt=C.props)[q].apply(vt,fe)}}function $(){var q=C.props.aria;if(q.content){var fe="aria-"+q.content,$e=E.id,vt=Kl(C.props.triggerTarget||e);vt.forEach(function(Ft){var Le=Ft.getAttribute(fe);if(C.state.isVisible)Ft.setAttribute(fe,Le?Le+" "+$e:$e);else{var An=Le&&Le.replace($e,"").trim();An?Ft.setAttribute(fe,An):Ft.removeAttribute(fe)}})}}function ce(){if(!(O||!C.props.aria.expanded)){var q=Kl(C.props.triggerTarget||e);q.forEach(function(fe){C.props.interactive?fe.setAttribute("aria-expanded",C.state.isVisible&&fe===N()?"true":"false"):fe.removeAttribute("aria-expanded")})}}function ue(){G().removeEventListener("mousemove",g),Tf=Tf.filter(function(q){return q!==g})}function De(q){if(!(ds.isTouch&&(l||q.type==="mousedown"))){var fe=q.composedPath&&q.composedPath()[0]||q.target;if(!(C.props.interactive&&pD(E,fe))){if(Kl(C.props.triggerTarget||e).some(function($e){return pD($e,fe)})){if(ds.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else X("onClickOutside",[C,q]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||Je())}}}function ae(){l=!0}function Fe(){l=!1}function Me(){var q=G();q.addEventListener("mousedown",De,!0),q.addEventListener("touchend",De,Oa),q.addEventListener("touchstart",Fe,Oa),q.addEventListener("touchmove",ae,Oa)}function Je(){var q=G();q.removeEventListener("mousedown",De,!0),q.removeEventListener("touchend",De,Oa),q.removeEventListener("touchstart",Fe,Oa),q.removeEventListener("touchmove",ae,Oa)}function
|
|
38
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var uH=function(){return"innerHTML"};function iy(e,t){e[uH()]=t}function ED(e){var t=Hu();return e===!0?t.className=rD:(t.className=aD,Gu(e)?t.appendChild(e):iy(t,e)),t}function RD(e,t){Gu(t.content)?(iy(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?iy(e,t.content):e.textContent=t.content)}function oy(e){var t=e.firstElementChild,n=Ff(t.children);return{box:t,content:n.find(function(i){return i.classList.contains(sD)}),arrow:n.find(function(i){return i.classList.contains(rD)||i.classList.contains(aD)}),backdrop:n.find(function(i){return i.classList.contains(H2)})}}function DD(e){var t=Hu(),n=Hu();n.className=B2,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var i=Hu();i.className=sD,i.setAttribute("data-state","hidden"),RD(i,e.props),t.appendChild(n),n.appendChild(i),o(e.props,e.props);function o(s,r){var a=oy(t),l=a.box,c=a.content,u=a.arrow;r.theme?l.setAttribute("data-theme",r.theme):l.removeAttribute("data-theme"),typeof r.animation=="string"?l.setAttribute("data-animation",r.animation):l.removeAttribute("data-animation"),r.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof r.maxWidth=="number"?r.maxWidth+"px":r.maxWidth,r.role?l.setAttribute("role",r.role):l.removeAttribute("role"),(s.content!==r.content||s.allowHTML!==r.allowHTML)&&RD(c,e.props),r.arrow?u?s.arrow!==r.arrow&&(l.removeChild(u),l.appendChild(ED(r.arrow))):l.appendChild(ED(r.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:o}}DD.$$tippy=!0;var dH=1,Tf=[],sy=[];function hH(e,t){var n=bD(e,Object.assign({},zi,wD(hD(t)))),i,o,s,r=!1,a=!1,l=!1,c=!1,u,d,h,f=[],g=uD(Y,n.interactiveDebounce),m,y=dH++,b=null,S=z2(n.plugins),F={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},C={id:y,reference:e,popper:Hu(),popperInstance:b,props:n,state:F,plugins:S,clearDelayTimeouts:dt,setProps:xt,setContent:Lt,show:Ht,hide:Dn,hideWithInteractivity:cn,enable:We,disable:at,unmount:qn,destroy:ke};if(!n.render)return M.env.NODE_ENV!=="production"&&ny(!0,"render() function has not been supplied."),C;var R=n.render(C),E=R.popper,_=R.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+C.id,C.popper=E,e._tippy=C,E._tippy=C;var I=S.map(function(q){return q.fn(C)}),O=e.hasAttribute("aria-expanded");return nn(),ce(),H(),X("onCreate",[C]),n.showOnCreate&&xe(),E.addEventListener("mouseenter",function(){C.props.interactive&&C.state.isVisible&&C.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){C.props.interactive&&C.props.trigger.indexOf("mouseenter")>=0&&G().addEventListener("mousemove",g)}),C;function k(){var q=C.props.touch;return Array.isArray(q)?q:[q,0]}function x(){return k()[0]==="hold"}function P(){var q;return!!((q=C.props.render)!=null&&q.$$tippy)}function N(){return m||e}function G(){var q=N().parentNode;return q?Z2(q):document}function ie(){return oy(E)}function B(q){return C.state.isMounted&&!C.state.isVisible||ds.isTouch||u&&u.type==="focus"?0:Jv(C.props.delay,q?0:1,zi.delay)}function H(q){q===void 0&&(q=!1),E.style.pointerEvents=C.props.interactive&&!q?"":"none",E.style.zIndex=""+C.props.zIndex}function X(q,fe,$e){if($e===void 0&&($e=!0),I.forEach(function(Ft){Ft[q]&&Ft[q].apply(Ft,fe)}),$e){var vt;(vt=C.props)[q].apply(vt,fe)}}function $(){var q=C.props.aria;if(q.content){var fe="aria-"+q.content,$e=E.id,vt=Kl(C.props.triggerTarget||e);vt.forEach(function(Ft){var Le=Ft.getAttribute(fe);if(C.state.isVisible)Ft.setAttribute(fe,Le?Le+" "+$e:$e);else{var An=Le&&Le.replace($e,"").trim();An?Ft.setAttribute(fe,An):Ft.removeAttribute(fe)}})}}function ce(){if(!(O||!C.props.aria.expanded)){var q=Kl(C.props.triggerTarget||e);q.forEach(function(fe){C.props.interactive?fe.setAttribute("aria-expanded",C.state.isVisible&&fe===N()?"true":"false"):fe.removeAttribute("aria-expanded")})}}function ue(){G().removeEventListener("mousemove",g),Tf=Tf.filter(function(q){return q!==g})}function De(q){if(!(ds.isTouch&&(l||q.type==="mousedown"))){var fe=q.composedPath&&q.composedPath()[0]||q.target;if(!(C.props.interactive&&pD(E,fe))){if(Kl(C.props.triggerTarget||e).some(function($e){return pD($e,fe)})){if(ds.isTouch||C.state.isVisible&&C.props.trigger.indexOf("click")>=0)return}else X("onClickOutside",[C,q]);C.props.hideOnClick===!0&&(C.clearDelayTimeouts(),C.hide(),a=!0,setTimeout(function(){a=!1}),C.state.isMounted||Je())}}}function ae(){l=!0}function Fe(){l=!1}function Me(){var q=G();q.addEventListener("mousedown",De,!0),q.addEventListener("touchend",De,Oa),q.addEventListener("touchstart",Fe,Oa),q.addEventListener("touchmove",ae,Oa)}function Je(){var q=G();q.removeEventListener("mousedown",De,!0),q.removeEventListener("touchend",De,Oa),q.removeEventListener("touchstart",Fe,Oa),q.removeEventListener("touchmove",ae,Oa)}function pt(q,fe){Be(q,function(){!C.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&fe()})}function Mt(q,fe){Be(q,fe)}function Be(q,fe){var $e=ie().box;function vt(Ft){Ft.target===$e&&(ty($e,"remove",vt),fe())}if(q===0)return fe();ty($e,"remove",d),ty($e,"add",vt),d=vt}function jt(q,fe,$e){$e===void 0&&($e=!1);var vt=Kl(C.props.triggerTarget||e);vt.forEach(function(Ft){Ft.addEventListener(q,fe,$e),f.push({node:Ft,eventType:q,handler:fe,options:$e})})}function nn(){x()&&(jt("touchstart",V,{passive:!0}),jt("touchend",pe,{passive:!0})),W2(C.props.trigger).forEach(function(q){if(q!=="manual")switch(jt(q,V),q){case"mouseenter":jt("mouseleave",pe);break;case"focus":jt(nH?"focusout":"blur",Te);break;case"focusin":jt("focusout",Te);break}})}function Ot(){f.forEach(function(q){var fe=q.node,$e=q.eventType,vt=q.handler,Ft=q.options;fe.removeEventListener($e,vt,Ft)}),f=[]}function V(q){var fe,$e=!1;if(!(!C.state.isEnabled||Ee(q)||a)){var vt=((fe=u)==null?void 0:fe.type)==="focus";u=q,m=q.currentTarget,ce(),!C.state.isVisible&&K2(q)&&Tf.forEach(function(Ft){return Ft(q)}),q.type==="click"&&(C.props.trigger.indexOf("mouseenter")<0||r)&&C.props.hideOnClick!==!1&&C.state.isVisible?$e=!0:xe(q),q.type==="click"&&(r=!$e),$e&&!vt&&it(q)}}function Y(q){var fe=q.target,$e=N().contains(fe)||E.contains(fe);if(!(q.type==="mousemove"&&$e)){var vt=Pe().concat(E).map(function(Ft){var Le,An=Ft._tippy,ks=(Le=An.popperInstance)==null?void 0:Le.state;return ks?{popperRect:Ft.getBoundingClientRect(),popperState:ks,props:n}:null}).filter(Boolean);X2(vt,q)&&(ue(),it(q))}}function pe(q){var fe=Ee(q)||C.props.trigger.indexOf("click")>=0&&r;if(!fe){if(C.props.interactive){C.hideWithInteractivity(q);return}it(q)}}function Te(q){C.props.trigger.indexOf("focusin")<0&&q.target!==N()||C.props.interactive&&q.relatedTarget&&E.contains(q.relatedTarget)||it(q)}function Ee(q){return ds.isTouch?x()!==q.type.indexOf("touch")>=0:!1}function _e(){Ve();var q=C.props,fe=q.popperOptions,$e=q.placement,vt=q.offset,Ft=q.getReferenceClientRect,Le=q.moveTransition,An=P()?oy(E).arrow:null,ks=Ft?{getBoundingClientRect:Ft,contextElement:Ft.contextElement||N()}:e,ra={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qo){var aa=Qo.state;if(P()){var la=ie(),Ms=la.box;["placement","reference-hidden","escaped"].forEach(function(ca){ca==="placement"?Ms.setAttribute("data-placement",aa.placement):aa.attributes.popper["data-popper-"+ca]?Ms.setAttribute("data-"+ca,""):Ms.removeAttribute("data-"+ca)}),aa.attributes.popper={}}}},xo=[{name:"offset",options:{offset:vt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Le}},ra];P()&&An&&xo.push({name:"arrow",options:{element:An,padding:3}}),xo.push.apply(xo,(fe==null?void 0:fe.modifiers)||[]),C.popperInstance=V2(ks,E,Object.assign({},fe,{placement:$e,onFirstUpdate:h,modifiers:xo}))}function Ve(){C.popperInstance&&(C.popperInstance.destroy(),C.popperInstance=null)}function Ae(){var q=C.props.appendTo,fe,$e=N();C.props.interactive&&q===lD||q==="parent"?fe=$e.parentNode:fe=cD(q,[$e]),fe.contains(E)||fe.appendChild(E),C.state.isMounted=!0,_e(),M.env.NODE_ENV!=="production"&&js(C.props.interactive&&q===zi.appendTo&&$e.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
39
39
|
|
|
40
40
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
41
41
|
|
|
42
42
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
43
43
|
|
|
44
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Pe(){return Ff(E.querySelectorAll("[data-tippy-root]"))}function xe(q){C.clearDelayTimeouts(),q&&X("onTrigger",[C,q]),Me();var fe=B(!0),$e=k(),vt=$e[0],Ft=$e[1];ds.isTouch&&vt==="hold"&&Ft&&(fe=Ft),fe?i=setTimeout(function(){C.show()},fe):C.show()}function it(q){if(C.clearDelayTimeouts(),X("onUntrigger",[C,q]),!C.state.isVisible){Je();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(q.type)>=0&&r)){var fe=B(!1);fe?o=setTimeout(function(){C.state.isVisible&&C.hide()},fe):s=requestAnimationFrame(function(){C.hide()})}}function We(){C.state.isEnabled=!0}function at(){C.hide(),C.state.isEnabled=!1}function dt(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(s)}function xt(q){if(M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("setProps")),!C.state.isDestroyed){X("onBeforeUpdate",[C,q]),Ot();var fe=C.props,$e=bD(e,Object.assign({},fe,hD(q),{ignoreAttributes:!0}));C.props=$e,nn(),fe.interactiveDebounce!==$e.interactiveDebounce&&(ue(),g=uD(Y,$e.interactiveDebounce)),fe.triggerTarget&&!$e.triggerTarget?Kl(fe.triggerTarget).forEach(function(vt){vt.removeAttribute("aria-expanded")}):$e.triggerTarget&&e.removeAttribute("aria-expanded"),ce(),H(),_&&_(fe,$e),C.popperInstance&&(_e(),Pe().forEach(function(vt){requestAnimationFrame(vt._tippy.popperInstance.forceUpdate)})),X("onAfterUpdate",[C,q])}}function Lt(q){C.setProps({content:q})}function Ht(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("show"));var q=C.state.isVisible,fe=C.state.isDestroyed,$e=!C.state.isEnabled,vt=ds.isTouch&&!C.props.touch,Ft=Jv(C.props.duration,0,zi.duration);if(!(q||fe||$e||vt)&&!N().hasAttribute("disabled")&&(X("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,P()&&(E.style.visibility="visible"),H(),Me(),C.state.isMounted||(E.style.transition="none"),P()){var Le=ie(),An=Le.box,ks=Le.content;ey([An,ks],0)}h=function(){var xo;if(!(!C.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=C.props.moveTransition,P()&&C.props.animation){var Os=ie(),Qo=Os.box,aa=Os.content;ey([Qo,aa],Ft),fD([Qo,aa],"visible")}$(),ce(),dD(sy,C),(xo=C.popperInstance)==null||xo.forceUpdate(),X("onMount",[C]),C.props.animation&&P()&&Mt(Ft,function(){C.state.isShown=!0,X("onShown",[C])})}},Ae()}}function Dn(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("hide"));var q=!C.state.isVisible,fe=C.state.isDestroyed,$e=!C.state.isEnabled,vt=Jv(C.props.duration,1,zi.duration);if(!(q||fe||$e)&&(X("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,c=!1,r=!1,P()&&(E.style.visibility="hidden"),ue(),Je(),H(!0),P()){var Ft=ie(),Le=Ft.box,An=Ft.content;C.props.animation&&(ey([Le,An],vt),fD([Le,An],"hidden"))}$(),ce(),C.props.animation?P()&&
|
|
44
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Pe(){return Ff(E.querySelectorAll("[data-tippy-root]"))}function xe(q){C.clearDelayTimeouts(),q&&X("onTrigger",[C,q]),Me();var fe=B(!0),$e=k(),vt=$e[0],Ft=$e[1];ds.isTouch&&vt==="hold"&&Ft&&(fe=Ft),fe?i=setTimeout(function(){C.show()},fe):C.show()}function it(q){if(C.clearDelayTimeouts(),X("onUntrigger",[C,q]),!C.state.isVisible){Je();return}if(!(C.props.trigger.indexOf("mouseenter")>=0&&C.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(q.type)>=0&&r)){var fe=B(!1);fe?o=setTimeout(function(){C.state.isVisible&&C.hide()},fe):s=requestAnimationFrame(function(){C.hide()})}}function We(){C.state.isEnabled=!0}function at(){C.hide(),C.state.isEnabled=!1}function dt(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(s)}function xt(q){if(M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("setProps")),!C.state.isDestroyed){X("onBeforeUpdate",[C,q]),Ot();var fe=C.props,$e=bD(e,Object.assign({},fe,hD(q),{ignoreAttributes:!0}));C.props=$e,nn(),fe.interactiveDebounce!==$e.interactiveDebounce&&(ue(),g=uD(Y,$e.interactiveDebounce)),fe.triggerTarget&&!$e.triggerTarget?Kl(fe.triggerTarget).forEach(function(vt){vt.removeAttribute("aria-expanded")}):$e.triggerTarget&&e.removeAttribute("aria-expanded"),ce(),H(),_&&_(fe,$e),C.popperInstance&&(_e(),Pe().forEach(function(vt){requestAnimationFrame(vt._tippy.popperInstance.forceUpdate)})),X("onAfterUpdate",[C,q])}}function Lt(q){C.setProps({content:q})}function Ht(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("show"));var q=C.state.isVisible,fe=C.state.isDestroyed,$e=!C.state.isEnabled,vt=ds.isTouch&&!C.props.touch,Ft=Jv(C.props.duration,0,zi.duration);if(!(q||fe||$e||vt)&&!N().hasAttribute("disabled")&&(X("onShow",[C],!1),C.props.onShow(C)!==!1)){if(C.state.isVisible=!0,P()&&(E.style.visibility="visible"),H(),Me(),C.state.isMounted||(E.style.transition="none"),P()){var Le=ie(),An=Le.box,ks=Le.content;ey([An,ks],0)}h=function(){var xo;if(!(!C.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=C.props.moveTransition,P()&&C.props.animation){var Os=ie(),Qo=Os.box,aa=Os.content;ey([Qo,aa],Ft),fD([Qo,aa],"visible")}$(),ce(),dD(sy,C),(xo=C.popperInstance)==null||xo.forceUpdate(),X("onMount",[C]),C.props.animation&&P()&&Mt(Ft,function(){C.state.isShown=!0,X("onShown",[C])})}},Ae()}}function Dn(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("hide"));var q=!C.state.isVisible,fe=C.state.isDestroyed,$e=!C.state.isEnabled,vt=Jv(C.props.duration,1,zi.duration);if(!(q||fe||$e)&&(X("onHide",[C],!1),C.props.onHide(C)!==!1)){if(C.state.isVisible=!1,C.state.isShown=!1,c=!1,r=!1,P()&&(E.style.visibility="hidden"),ue(),Je(),H(!0),P()){var Ft=ie(),Le=Ft.box,An=Ft.content;C.props.animation&&(ey([Le,An],vt),fD([Le,An],"hidden"))}$(),ce(),C.props.animation?P()&&pt(vt,C.unmount):C.unmount()}}function cn(q){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("hideWithInteractivity")),G().addEventListener("mousemove",g),dD(Tf,g),g(q)}function qn(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("unmount")),C.state.isVisible&&C.hide(),C.state.isMounted&&(Ve(),Pe().forEach(function(q){q._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),sy=sy.filter(function(q){return q!==C}),C.state.isMounted=!1,X("onHidden",[C]))}function ke(){M.env.NODE_ENV!=="production"&&js(C.state.isDestroyed,ql("destroy")),!C.state.isDestroyed&&(C.clearDelayTimeouts(),C.unmount(),Ot(),delete e._tippy,C.state.isDestroyed=!0,X("onDestroy",[C]))}}function Ar(e,t){t===void 0&&(t={});var n=zi.plugins.concat(t.plugins||[]);M.env.NODE_ENV!=="production"&&(sH(e),SD(t,n)),eH();var i=Object.assign({},t,{plugins:n}),o=Y2(e);if(M.env.NODE_ENV!=="production"){var s=Gu(i.content),r=o.length>1;js(s&&r,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
45
45
|
|
|
46
46
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
47
47
|
|
|
48
48
|
`,`1) content: element.innerHTML
|
|
49
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,c){var u=c&&hH(c,i);return u&&l.push(u),l},[]);return Gu(e)?a[0]:a}Ar.defaultProps=zi,Ar.setDefaultProps=lH,Ar.currentInput=ds,Object.assign({},WR,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),Ar.setDefaultProps({render:DD});const _D={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,theme:"light",hideOnClick:!1},xD={..._D,maxWidth:"none"};function FD(e,t){const n=Ar(e,{..._D,...t});return Array.isArray(n)?n[0]:n}function Pf(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function fH(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function ry(e){if(e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE){const n=e.scrollWidth>e.offsetWidth;return e.classList.toggle("arbo-tooltip-text-truncated",n),n}return!0}const If={placement:"top",trigger:"mouseenter focus",hideOnClick:!1,delay:[1e3,0],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},TD=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&fH(n,t)},PD=(e,t,n)=>typeof n=="string"?!0:t===!0||ry(e),ID=(e,t)=>{let n={...If};typeof t=="string"?n.content=String(t):n={...If,...t};const i=ry(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]);const s={...xD,appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",interactive:!0,onShow(r){TD(r,n.contentClass)},onHide(r){}};return FD(e,s)},pH=(e,t)=>{let n={...If};typeof t=="string"?n.content=String(t):n={...If,...t};const i=ry(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]),e._tooltipInstance?e._tooltipInstance.setProps({appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",onShow(s){TD(s,n.contentClass)}}):e._tooltipInstance=ID(e,n)},yn={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;(typeof n=="string"?n:n!=null&&n.content)&&qt(()=>{PD(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=ID(e,n)),(typeof n=="object"&&n.trigger?n.trigger:"mouseenter focus").split(" ").map(a=>a.trim()).filter(Boolean).forEach(a=>{let l=a;if(a==="mouseenter"&&(l="mouseenter"),a==="focus"&&(l="focus"),a==="click"&&(l="click"),a==="manual")return;const c=u=>{};e.addEventListener(l,c)})})},updated(e,t){qt(()=>{const n=t.value;if(!PD(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){Pf(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&pH(e,n)})},beforeUnmount(e){Pf(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){Pf(e._tooltipInstance),delete e._tooltipInstance}};function gH(e,t,n){const i=document.createElement("div");i.className=n;const o=MR(e,t);return o.mount(i),{container:i,app:o}}function Af(e){if(!e)return;const t=e._vueApp;if(t)try{t.unmount(),delete e._vueApp}catch(n){console.warn("Error unmounting Vue app:",n)}}function mH(e,t){e._vueApp=t}const vH=e=>{const{container:t,app:n}=gH(I8,{user:e.user,status:e.status,timezone:e.timezone,userConfig:e.userConfig,showInsightButton:e.showInsightButton,showCopyLinkButton:e.showCopyLinkButton,apiUpdateFunction:e.apiUpdateFunction,refreshInterval:e.refreshInterval,enableAutoRefresh:e.enableAutoRefresh,onInsightClick:e.onInsightClick,onCopyLink:e.onCopyLink},"user-profile-tooltip-content");return mH(t,n),t},AD=e=>{e._userProfileContainer&&(Af(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(Pf(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},kD={mounted(e,t){var i;if(!((i=t.value)!=null&&i.user)){console.warn("[UserProfile] User data is required");return}const n=t.value;e._userProfileInstance=FD(e,{...xD,delay:[1e3,0],content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",onShow(o){e._userProfileContainer&&Af(e._userProfileContainer);const s=vH(n);e._userProfileContainer=s,o.setContent(s)},onHidden(){setTimeout(()=>{e._userProfileContainer&&(Af(e._userProfileContainer),e._userProfileContainer=void 0)},200)},onDestroy(){e._userProfileContainer&&(Af(e._userProfileContainer),e._userProfileContainer=void 0)}}),e._userProfileInstance.enable(),e.classList.add("user-profile-trigger")},updated(e,t){var n;if(!(!((n=t.value)!=null&&n.user)||!e._userProfileInstance)&&t.value!==t.oldValue)try{e._userProfileInstance.setProps({placement:t.value.placement||"bottom-start"}),e._userProfileInstance.hide()}catch(i){console.warn("Error updating tooltip props:",i)}},beforeUnmount(e){AD(e)},unmounted(e){AD(e)}},yH=["type","disabled","aria-readonly"],CH={key:0},wH=lt({__name:"Button",props:{label:{default:""},variant:{default:"primary"},size:{default:"default"},disabled:{type:Boolean,default:!1},type:{default:"button"},rounded:{type:Boolean},highlightOnHover:{type:Boolean},border:{type:Boolean},action:{},readOnly:{type:Boolean,default:!1},actived:{type:Boolean,default:!1},loading:{type:Boolean}},emits:["handleClick"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=["primary","secondary","tertiary","text","menu-item"],r=j(()=>Array.isArray(i.variant)?i.variant:[i.variant]),a=Sf(),l=j(()=>{const m=[a.customButton],y=r.value.find(b=>s.includes(b))||"primary";return m.push(a[`is-${y}`]),r.value.includes("danger")&&m.push(a["is-danger"]),r.value.includes("icon")&&m.push(a["is-icon"]),i.readOnly&&m.push(a["is-readonly"]),i.rounded&&m.push(a["is-rounded"]),i.border&&m.push(a["has-border"]),i.highlightOnHover&&m.push(a["highlight-on-hover"]),f.value&&m.push(a["has-prefix"]),g.value&&m.push(a["has-suffix"]),i.actived&&m.push(a["is-active"]),i.disabled&&m.push(a.disabled),i.loading&&m.push(a["is-loading"]),typeof i.size=="string"&&m.push(a[`size-${i.size}`]),m}),c=j(()=>i.readOnly===!0),u=j(()=>typeof i.size=="number"?{"--button-size":`${i.size}px`}:{}),d=m=>{var y;i.disabled||i.readOnly||(o("handleClick",m),(y=i.action)==null||y.call(i))},h=vv(),f=j(()=>!!h.prefix),g=j(()=>!!h.suffix);return(m,y)=>(K(),Ce("button",{class:z(l.value),type:i.type,disabled:i.disabled,"aria-readonly":c.value,style:mn(u.value),onClick:d},[_t(m.$slots,"prefix"),_t(m.$slots,"default",{},()=>[e.label?nt((K(),Ce("span",CH,[ut(bt(e.label),1)])),[[J(n),{content:e.label}]]):ot("",!0)]),_t(m.$slots,"suffix")],14,yH))}}),bH={customButton:"_customButton_1urqu_1","size-extra-small":"_size-extra-small_1urqu_22","size-small":"_size-small_1urqu_27","size-medium":"_size-medium_1urqu_32","size-large":"_size-large_1urqu_37","size-default":"_size-default_1urqu_42","is-primary":"_is-primary_1urqu_45","is-active":"_is-active_1urqu_53","is-danger":"_is-danger_1urqu_56","is-secondary":"_is-secondary_1urqu_65","is-tertiary":"_is-tertiary_1urqu_89","is-text":"_is-text_1urqu_109","is-menu-item":"_is-menu-item_1urqu_126","is-icon":"_is-icon_1urqu_158","is-readonly":"_is-readonly_1urqu_179","is-rounded":"_is-rounded_1urqu_183","has-border":"_has-border_1urqu_186","highlight-on-hover":"_highlight-on-hover_1urqu_189","icon-wrapper":"_icon-wrapper_1urqu_189","is-loading":"_is-loading_1urqu_192",spin:"_spin_1urqu_1"},Ct=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},
|
|
49
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,c){var u=c&&hH(c,i);return u&&l.push(u),l},[]);return Gu(e)?a[0]:a}Ar.defaultProps=zi,Ar.setDefaultProps=lH,Ar.currentInput=ds,Object.assign({},WR,{effect:function(t){var n=t.state,i={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,i.popper),n.styles=i,n.elements.arrow&&Object.assign(n.elements.arrow.style,i.arrow)}}),Ar.setDefaultProps({render:DD});const _D={arrow:!0,allowHTML:!0,interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,theme:"light",hideOnClick:!1},xD={..._D,maxWidth:"none"};function FD(e,t){const n=Ar(e,{..._D,...t});return Array.isArray(n)?n[0]:n}function Pf(e){if(e)try{e.destroy()}catch(t){console.warn("Error destroying tippy instance:",t)}}function fH(e,t){if(!t)return;(Array.isArray(t)?t:[t]).forEach(i=>{i!=null&&i.trim()&&e.classList.add(i.trim())})}function ry(e){if(e.childNodes.length===1&&e.childNodes[0].nodeType===Node.TEXT_NODE){const n=e.scrollWidth>e.offsetWidth;return e.classList.toggle("arbo-tooltip-text-truncated",n),n}return!0}const If={placement:"top",trigger:"mouseenter focus",hideOnClick:!1,delay:[1e3,0],theme:"arbo",contentClass:"extra-padding",bypassOverflowCheck:!0,content:""},TD=(e,t)=>{if(!t||!e.popper)return;const n=e.popper.querySelector(".tippy-content");n&&fH(n,t)},PD=(e,t,n)=>typeof n=="string"?!0:t===!0||ry(e),ID=(e,t)=>{let n={...If};typeof t=="string"?n.content=String(t):n={...If,...t};const i=ry(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]);const s={...xD,appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",interactive:!0,onShow(r){TD(r,n.contentClass)},onHide(r){}};return FD(e,s)},pH=(e,t)=>{let n={...If};typeof t=="string"?n.content=String(t):n={...If,...t};const i=ry(e),o=typeof n=="object"?n.bypassOverflowCheck:!1;i&&!o&&(n.delay=[1e3,100]),e._tooltipInstance?e._tooltipInstance.setProps({appendTo:e.ownerDocument.body,content:n.content,placement:n.placement,trigger:n.trigger,hideOnClick:n.hideOnClick,delay:n.delay,theme:n.theme||"arbo",onShow(s){TD(s,n.contentClass)}}):e._tooltipInstance=ID(e,n)},yn={mounted(e,t){e.classList.add("arbo-tooltip-wrapper");const n=t.value;(typeof n=="string"?n:n!=null&&n.content)&&qt(()=>{PD(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)&&(e._tooltipInstance=ID(e,n)),(typeof n=="object"&&n.trigger?n.trigger:"mouseenter focus").split(" ").map(a=>a.trim()).filter(Boolean).forEach(a=>{let l=a;if(a==="mouseenter"&&(l="mouseenter"),a==="focus"&&(l="focus"),a==="click"&&(l="click"),a==="manual")return;const c=u=>{};e.addEventListener(l,c)})})},updated(e,t){qt(()=>{const n=t.value;if(!PD(e,typeof n=="object"?n.bypassOverflowCheck:void 0,n)){Pf(e._tooltipInstance),delete e._tooltipInstance;return}t.value!==t.oldValue&&(typeof n=="string"?n:n!=null&&n.content)&&pH(e,n)})},beforeUnmount(e){Pf(e._tooltipInstance),delete e._tooltipInstance},unmounted(e){Pf(e._tooltipInstance),delete e._tooltipInstance}};function gH(e,t,n){const i=document.createElement("div");i.className=n;const o=MR(e,t);return o.mount(i),{container:i,app:o}}function Af(e){if(!e)return;const t=e._vueApp;if(t)try{t.unmount(),delete e._vueApp}catch(n){console.warn("Error unmounting Vue app:",n)}}function mH(e,t){e._vueApp=t}const vH=e=>{const{container:t,app:n}=gH(I8,{user:e.user,status:e.status,timezone:e.timezone,userConfig:e.userConfig,showInsightButton:e.showInsightButton,showCopyLinkButton:e.showCopyLinkButton,apiUpdateFunction:e.apiUpdateFunction,refreshInterval:e.refreshInterval,enableAutoRefresh:e.enableAutoRefresh,onInsightClick:e.onInsightClick,onCopyLink:e.onCopyLink},"user-profile-tooltip-content");return mH(t,n),t},AD=e=>{e._userProfileContainer&&(Af(e._userProfileContainer),delete e._userProfileContainer),e._userProfileInstance&&(Pf(e._userProfileInstance),delete e._userProfileInstance),e.style.cursor="",e.classList.remove("user-profile-trigger")},kD={mounted(e,t){var i;if(!((i=t.value)!=null&&i.user)){console.warn("[UserProfile] User data is required");return}const n=t.value;e._userProfileInstance=FD(e,{...xD,delay:[1e3,0],content:n.user.name||"User",placement:n.placement||"bottom-start",trigger:"mouseenter focus",onShow(o){e._userProfileContainer&&Af(e._userProfileContainer);const s=vH(n);e._userProfileContainer=s,o.setContent(s)},onHidden(){setTimeout(()=>{e._userProfileContainer&&(Af(e._userProfileContainer),e._userProfileContainer=void 0)},200)},onDestroy(){e._userProfileContainer&&(Af(e._userProfileContainer),e._userProfileContainer=void 0)}}),e._userProfileInstance.enable(),e.classList.add("user-profile-trigger")},updated(e,t){var n;if(!(!((n=t.value)!=null&&n.user)||!e._userProfileInstance)&&t.value!==t.oldValue)try{e._userProfileInstance.setProps({placement:t.value.placement||"bottom-start"}),e._userProfileInstance.hide()}catch(i){console.warn("Error updating tooltip props:",i)}},beforeUnmount(e){AD(e)},unmounted(e){AD(e)}},yH=["type","disabled","aria-readonly"],CH={key:0},wH=lt({__name:"Button",props:{label:{default:""},variant:{default:"primary"},size:{default:"default"},disabled:{type:Boolean,default:!1},type:{default:"button"},rounded:{type:Boolean},highlightOnHover:{type:Boolean},border:{type:Boolean},action:{},readOnly:{type:Boolean,default:!1},actived:{type:Boolean,default:!1},loading:{type:Boolean}},emits:["handleClick"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=["primary","secondary","tertiary","text","menu-item"],r=j(()=>Array.isArray(i.variant)?i.variant:[i.variant]),a=Sf(),l=j(()=>{const m=[a.customButton],y=r.value.find(b=>s.includes(b))||"primary";return m.push(a[`is-${y}`]),r.value.includes("danger")&&m.push(a["is-danger"]),r.value.includes("icon")&&m.push(a["is-icon"]),i.readOnly&&m.push(a["is-readonly"]),i.rounded&&m.push(a["is-rounded"]),i.border&&m.push(a["has-border"]),i.highlightOnHover&&m.push(a["highlight-on-hover"]),f.value&&m.push(a["has-prefix"]),g.value&&m.push(a["has-suffix"]),i.actived&&m.push(a["is-active"]),i.disabled&&m.push(a.disabled),i.loading&&m.push(a["is-loading"]),typeof i.size=="string"&&m.push(a[`size-${i.size}`]),m}),c=j(()=>i.readOnly===!0),u=j(()=>typeof i.size=="number"?{"--button-size":`${i.size}px`}:{}),d=m=>{var y;i.disabled||i.readOnly||(o("handleClick",m),(y=i.action)==null||y.call(i))},h=vv(),f=j(()=>!!h.prefix),g=j(()=>!!h.suffix);return(m,y)=>(K(),Ce("button",{class:z(l.value),type:i.type,disabled:i.disabled,"aria-readonly":c.value,style:mn(u.value),onClick:d},[_t(m.$slots,"prefix"),_t(m.$slots,"default",{},()=>[e.label?nt((K(),Ce("span",CH,[ut(bt(e.label),1)])),[[J(n),{content:e.label}]]):ot("",!0)]),_t(m.$slots,"suffix")],14,yH))}}),bH={customButton:"_customButton_1urqu_1","size-extra-small":"_size-extra-small_1urqu_22","size-small":"_size-small_1urqu_27","size-medium":"_size-medium_1urqu_32","size-large":"_size-large_1urqu_37","size-default":"_size-default_1urqu_42","is-primary":"_is-primary_1urqu_45","is-active":"_is-active_1urqu_53","is-danger":"_is-danger_1urqu_56","is-secondary":"_is-secondary_1urqu_65","is-tertiary":"_is-tertiary_1urqu_89","is-text":"_is-text_1urqu_109","is-menu-item":"_is-menu-item_1urqu_126","is-icon":"_is-icon_1urqu_158","is-readonly":"_is-readonly_1urqu_179","is-rounded":"_is-rounded_1urqu_183","has-border":"_has-border_1urqu_186","highlight-on-hover":"_highlight-on-hover_1urqu_189","icon-wrapper":"_icon-wrapper_1urqu_189","is-loading":"_is-loading_1urqu_192",spin:"_spin_1urqu_1"},Ct=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},ft=Ct(wH,[["__cssModules",{$style:bH}]]);/*!
|
|
50
50
|
* Compressor.js v1.2.1
|
|
51
51
|
* https://fengyuanchen.github.io/compressorjs
|
|
52
52
|
*
|
|
@@ -54,9 +54,9 @@ Expected function or array of functions, received type ${typeof e}.`),Bn)}functi
|
|
|
54
54
|
* Released under the MIT license
|
|
55
55
|
*
|
|
56
56
|
* Date: 2023-02-28T14:09:41.732Z
|
|
57
|
-
*/function OD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OD(Object(n),!0).forEach(function(i){RH(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function SH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MD(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,LD(i.key),i)}}function EH(e,t,n){return t&&MD(e.prototype,t),n&&MD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RH(e,t,n){return t=LD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Of.apply(this,arguments)}function DH(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function LD(e){var t=DH(e,"string");return typeof t=="symbol"?t:String(t)}var ND={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,i=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=i&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(i||s)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var c,u,d,h,f,g,m,y,b;if(c=l.match(r),!c)throw new Error("invalid data URI");for(u=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),d=!!c[4],h=l.slice(c[0].length),d?f=atob(h):f=decodeURIComponent(h),g=new ArrayBuffer(f.length),m=new Uint8Array(g),y=0;y<f.length;y+=1)m[y]=f.charCodeAt(y);return i?new Blob([o?m:g],{type:u}):(b=new s,b.append(g),b.getBlob(u))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){u&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.mozGetAsFile("blob",c))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){(c&&c!=="image/png"||u)&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.msToBlob(c))})}:n.toBlob=function(l,c,u){var d=this;setTimeout(function(){l(a(d.toDataURL(c,u)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(ND);var VD=ND.exports,_H=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},BD={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},xH=typeof window<"u"&&typeof window.document<"u",kr=xH?window:{},Mf=function(t){return t>0&&t<1/0},FH=Array.prototype.slice;function ay(e){return Array.from?Array.from(e):FH.call(e)}var TH=/^image\/.+$/;function ly(e){return TH.test(e)}function PH(e){var t=ly(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var HD=String.fromCharCode;function IH(e,t,n){var i="",o;for(n+=t,o=t;o<n;o+=1)i+=HD(e.getUint8(o));return i}var AH=kr.btoa;function GD(e,t){for(var n=[],i=8192,o=new Uint8Array(e);o.length>0;)n.push(HD.apply(null,ay(o.subarray(0,i)))),o=o.subarray(i);return"data:".concat(t,";base64,").concat(AH(n.join("")))}function kH(e){var t=new DataView(e),n;try{var i,o,s;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var r=t.byteLength,a=2;a+1<r;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a+=1}if(o){var l=o+4,c=o+10;if(IH(t,l,4)==="Exif"){var u=t.getUint16(c);if(i=u===18761,(i||u===19789)&&t.getUint16(c+2,i)===42){var d=t.getUint32(c+4,i);d>=8&&(s=c+d)}}}if(s){var h=t.getUint16(s,i),f,g;for(g=0;g<h;g+=1)if(f=s+g*12+2,t.getUint16(f,i)===274){f+=8,n=t.getUint16(f,i),t.setUint16(f,1,i);break}}}catch{n=1}return n}function OH(e){var t=0,n=1,i=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:i}}var MH=/\.\d*(?:0|9){12}\d*$/;function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return MH.test(e)?Math.round(e*t)/t:e}function Wu(e){var t=e.aspectRatio,n=e.height,i=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=Mf(i),r=Mf(n);if(s&&r){var a=n*t;(o==="contain"||o==="none")&&a>i||o==="cover"&&a<i?n=i/t:i=n*t}else s?n=i/t:r&&(i=n*t);return{width:i,height:n}}function LH(e){for(var t=ay(new Uint8Array(e)),n=t.length,i=[],o=0;o+3<n;){var s=t[o],r=t[o+1];if(s===255&&r===218)break;if(s===255&&r===216)o+=2;else{var a=t[o+2]*256+t[o+3],l=o+a+2,c=t.slice(o,l);i.push(c),o=l}}return i.reduce(function(u,d){return d[0]===255&&d[1]===225?u.concat(d):u},[])}function NH(e,t){var n=ay(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var i=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+i));return new Uint8Array(o)}var VH=kr.ArrayBuffer,cy=kr.FileReader,Ma=kr.URL||kr.webkitURL,BH=/\.\w+$/,HH=kr.Compressor,GH=function(){function e(t,n){SH(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=kf(kf({},BD),n),this.aborted=!1,this.result=null,this.init()}return EH(e,[{key:"init",value:function(){var n=this,i=this.file,o=this.options;if(!_H(i)){this.fail(new Error("The first argument must be a File or Blob object."));return}var s=i.type;if(!ly(s)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Ma||!cy){this.fail(new Error("The current browser does not support image compression."));return}VH||(o.checkOrientation=!1,o.retainExif=!1);var r=s==="image/jpeg",a=r&&o.checkOrientation,l=r&&o.retainExif;if(Ma&&!a&&!l)this.load({url:Ma.createObjectURL(i)});else{var c=new cy;this.reader=c,c.onload=function(u){var d=u.target,h=d.result,f={},g=1;a&&(g=kH(h),g>1&&Of(f,OH(g))),l&&(n.exif=LH(h)),a||l?!Ma||g>1?f.url=GD(h,s):f.url=Ma.createObjectURL(i):f.url=h,n.load(f)},c.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){n.reader=null},a||l?c.readAsArrayBuffer(i):c.readAsDataURL(i)}}},{key:"load",value:function(n){var i=this,o=this.file,s=this.image;s.onload=function(){i.draw(kf(kf({},n),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){i.fail(new Error("Aborted to load the image."))},s.onerror=function(){i.fail(new Error("Failed to load the image."))},kr.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(kr.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=o.name,s.src=n.url}},{key:"draw",value:function(n){var i=this,o=n.naturalWidth,s=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,c=l===void 0?1:l,u=n.scaleY,d=u===void 0?1:u,h=this.file,f=this.image,g=this.options,m=document.createElement("canvas"),y=m.getContext("2d"),b=Math.abs(a)%180===90,S=(g.resize==="contain"||g.resize==="cover")&&Mf(g.width)&&Mf(g.height),F=Math.max(g.maxWidth,0)||1/0,C=Math.max(g.maxHeight,0)||1/0,R=Math.max(g.minWidth,0)||0,E=Math.max(g.minHeight,0)||0,_=o/s,I=g.width,O=g.height;if(b){var k=[C,F];F=k[0],C=k[1];var x=[E,R];R=x[0],E=x[1];var P=[O,I];I=P[0],O=P[1]}S&&(_=I/O);var N=Wu({aspectRatio:_,width:F,height:C},"contain");F=N.width,C=N.height;var G=Wu({aspectRatio:_,width:R,height:E},"cover");if(R=G.width,E=G.height,S){var ie=Wu({aspectRatio:_,width:I,height:O},g.resize);I=ie.width,O=ie.height}else{var B=Wu({aspectRatio:_,width:I,height:O}),H=B.width;I=H===void 0?o:H;var X=B.height;O=X===void 0?s:X}I=Math.floor($D(Math.min(Math.max(I,R),F))),O=Math.floor($D(Math.min(Math.max(O,E),C)));var $=-I/2,ce=-O/2,ue=I,De=O,ae=[];if(S){var Fe=0,Me=0,Je=o,ft=s,Mt=Wu({aspectRatio:_,width:o,height:s},{contain:"cover",cover:"contain"}[g.resize]);Je=Mt.width,ft=Mt.height,Fe=(o-Je)/2,Me=(s-ft)/2,ae.push(Fe,Me,Je,ft)}if(ae.push($,ce,ue,De),b){var Be=[O,I];I=Be[0],O=Be[1]}m.width=I,m.height=O,ly(g.mimeType)||(g.mimeType=h.type);var jt="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var nn=g.mimeType==="image/jpeg";if(nn&&(jt="#fff"),y.fillStyle=jt,y.fillRect(0,0,I,O),g.beforeDraw&&g.beforeDraw.call(this,y,m),!this.aborted&&(y.save(),y.translate(I/2,O/2),y.rotate(a*Math.PI/180),y.scale(c,d),y.drawImage.apply(y,[f].concat(ae)),y.restore(),g.drew&&g.drew.call(this,y,m),!this.aborted)){var Ot=function(Y){if(!i.aborted){var pe=function(Ve){return i.done({naturalWidth:o,naturalHeight:s,result:Ve})};if(Y&&nn&&g.retainExif&&i.exif&&i.exif.length>0){var Te=function(Ve){return pe(VD(GD(NH(Ve,i.exif),g.mimeType)))};if(Y.arrayBuffer)Y.arrayBuffer().then(Te).catch(function(){i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new cy;i.reader=Ee,Ee.onload=function(_e){var Ve=_e.target;Te(Ve.result)},Ee.onabort=function(){i.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){i.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){i.reader=null},Ee.readAsArrayBuffer(Y)}}else pe(Y)}};m.toBlob?m.toBlob(Ot,g.mimeType,g.quality):Ot(VD(m.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(n){var i=n.naturalWidth,o=n.naturalHeight,s=n.result,r=this.file,a=this.image,l=this.options;if(Ma&&a.src.indexOf("blob:")===0&&Ma.revokeObjectURL(a.src),s)if(l.strict&&!l.retainExif&&s.size>r.size&&l.mimeType===r.type&&!(l.width>i||l.height>o||l.minWidth>i||l.minHeight>o||l.maxWidth<i||l.maxHeight<o))s=r;else{var c=new Date;s.lastModified=c.getTime(),s.lastModifiedDate=c,s.name=r.name,s.name&&s.type!==r.type&&(s.name=s.name.replace(BH,PH(s.type)))}else s=r;this.result=s,l.success&&l.success.call(this,s)}},{key:"fail",value:function(n){var i=this.options;if(i.error)i.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=HH,e}},{key:"setDefaults",value:function(n){Of(BD,n)}}]),e}(),WD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zD={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(WD,function(){var n=function(p,v){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var T in D)Object.prototype.hasOwnProperty.call(D,T)&&(w[T]=D[T])})(p,v)},i=function(){return(i=Object.assign||function(p){for(var v,w=1,D=arguments.length;w<D;w++)for(var T in v=arguments[w])Object.prototype.hasOwnProperty.call(v,T)&&(p[T]=v[T]);return p}).apply(this,arguments)};function o(p,v,w){for(var D,T=0,A=v.length;T<A;T++)!D&&T in v||((D=D||Array.prototype.slice.call(v,0,T))[T]=v[T]);return p.concat(D||Array.prototype.slice.call(v))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:WD,r=Object.keys,a=Array.isArray;function l(p,v){return typeof v!="object"||r(v).forEach(function(w){p[w]=v[w]}),p}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,v){return u.call(p,v)}function h(p,v){typeof v=="function"&&(v=v(c(p))),(typeof Reflect>"u"?r:Reflect.ownKeys)(v).forEach(function(w){g(p,w,v[w])})}var f=Object.defineProperty;function g(p,v,w,D){f(p,v,l(w&&d(w,"get")&&typeof w.get=="function"?{get:w.get,set:w.set,configurable:!0}:{value:w,configurable:!0,writable:!0},D))}function m(p){return{from:function(v){return p.prototype=Object.create(v.prototype),g(p.prototype,"constructor",p),{extend:h.bind(null,p.prototype)}}}}var y=Object.getOwnPropertyDescriptor,b=[].slice;function S(p,v,w){return b.call(p,v,w)}function F(p,v){return v(p)}function C(p){if(!p)throw new Error("Assertion Failed")}function R(p){s.setImmediate?setImmediate(p):setTimeout(p,0)}function E(p,v){if(typeof v=="string"&&d(p,v))return p[v];if(!v)return p;if(typeof v!="string"){for(var w=[],D=0,T=v.length;D<T;++D){var A=E(p,v[D]);w.push(A)}return w}var L=v.indexOf(".");if(L!==-1){var W=p[v.substr(0,L)];return W==null?void 0:E(W,v.substr(L+1))}}function _(p,v,w){if(p&&v!==void 0&&!("isFrozen"in Object&&Object.isFrozen(p)))if(typeof v!="string"&&"length"in v){C(typeof w!="string"&&"length"in w);for(var D=0,T=v.length;D<T;++D)_(p,v[D],w[D])}else{var A,L,W=v.indexOf(".");W!==-1?(A=v.substr(0,W),(L=v.substr(W+1))===""?w===void 0?a(p)&&!isNaN(parseInt(A))?p.splice(A,1):delete p[A]:p[A]=w:_(W=!(W=p[A])||!d(p,A)?p[A]={}:W,L,w)):w===void 0?a(p)&&!isNaN(parseInt(v))?p.splice(v,1):delete p[v]:p[v]=w}}function I(p){var v,w={};for(v in p)d(p,v)&&(w[v]=p[v]);return w}var O=[].concat;function k(p){return O.apply([],p)}var br="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(k([8,16,32,64].map(function(p){return["Int","Uint","Float"].map(function(v){return v+p+"Array"})}))).filter(function(p){return s[p]}),x=new Set(br.map(function(p){return s[p]})),P=null;function N(p){return P=new WeakMap,p=function v(w){if(!w||typeof w!="object")return w;var D=P.get(w);if(D)return D;if(a(w)){D=[],P.set(w,D);for(var T=0,A=w.length;T<A;++T)D.push(v(w[T]))}else if(x.has(w.constructor))D=w;else{var L,W=c(w);for(L in D=W===Object.prototype?{}:Object.create(W),P.set(w,D),w)d(w,L)&&(D[L]=v(w[L]))}return D}(p),P=null,p}var G={}.toString;function ie(p){return G.call(p).slice(8,-1)}var B=typeof Symbol<"u"?Symbol.iterator:"@@iterator",H=typeof B=="symbol"?function(p){var v;return p!=null&&(v=p[B])&&v.apply(p)}:function(){return null};function X(p,v){return v=p.indexOf(v),0<=v&&p.splice(v,1),0<=v}var $={};function ce(p){var v,w,D,T;if(arguments.length===1){if(a(p))return p.slice();if(this===$&&typeof p=="string")return[p];if(T=H(p)){for(w=[];!(D=T.next()).done;)w.push(D.value);return w}if(p==null)return[p];if(typeof(v=p.length)!="number")return[p];for(w=new Array(v);v--;)w[v]=p[v];return w}for(v=arguments.length,w=new Array(v);v--;)w[v]=arguments[v];return w}var ue=typeof Symbol<"u"?function(p){return p[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},at=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Fo=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(at),De={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ae(p,v){this.name=p,this.message=v}function Fe(p,v){return p+". Errors: "+Object.keys(v).map(function(w){return v[w].toString()}).filter(function(w,D,T){return T.indexOf(w)===D}).join(`
|
|
58
|
-
`)}function Me(p,v,w,D){this.failures=v,this.failedKeys=D,this.successCount=w,this.message=Fe(p,v)}function Je(p,v){this.name="BulkError",this.failures=Object.keys(v).map(function(w){return v[w]}),this.failuresByPos=v,this.message=Fe(p,this.failures)}m(ae).from(Error).extend({toString:function(){return this.name+": "+this.message}}),m(Me).from(ae),m(Je).from(ae);var
|
|
59
|
-
`+A:""),this.inner=A||null):typeof T=="object"&&(this.message="".concat(T.name," ").concat(T.message),this.inner=T):(this.message=De[v]||w,this.inner=null)}return m(D).from(Mt),p[v]=D,p},{});Be.Syntax=SyntaxError,Be.Type=TypeError,Be.Range=RangeError;var jt=at.reduce(function(p,v){return p[v+"Error"]=Be[v],p},{}),nn=Fo.reduce(function(p,v){return["Syntax","Type","Range"].indexOf(v)===-1&&(p[v+"Error"]=Be[v]),p},{});function Ot(){}function V(p){return p}function Y(p,v){return p==null||p===V?v:function(w){return v(p(w))}}function pe(p,v){return function(){p.apply(this,arguments),v.apply(this,arguments)}}function Te(p,v){return p===Ot?v:function(){var w=p.apply(this,arguments);w!==void 0&&(arguments[0]=w);var D=this.onsuccess,T=this.onerror;this.onsuccess=null,this.onerror=null;var A=v.apply(this,arguments);return D&&(this.onsuccess=this.onsuccess?pe(D,this.onsuccess):D),T&&(this.onerror=this.onerror?pe(T,this.onerror):T),A!==void 0?A:w}}function Ee(p,v){return p===Ot?v:function(){p.apply(this,arguments);var w=this.onsuccess,D=this.onerror;this.onsuccess=this.onerror=null,v.apply(this,arguments),w&&(this.onsuccess=this.onsuccess?pe(w,this.onsuccess):w),D&&(this.onerror=this.onerror?pe(D,this.onerror):D)}}function _e(p,v){return p===Ot?v:function(w){var D=p.apply(this,arguments);l(w,D);var T=this.onsuccess,A=this.onerror;return this.onsuccess=null,this.onerror=null,w=v.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?pe(T,this.onsuccess):T),A&&(this.onerror=this.onerror?pe(A,this.onerror):A),D===void 0?w===void 0?void 0:w:l(D,w)}}function Ve(p,v){return p===Ot?v:function(){return v.apply(this,arguments)!==!1&&p.apply(this,arguments)}}function Ae(p,v){return p===Ot?v:function(){var w=p.apply(this,arguments);if(w&&typeof w.then=="function"){for(var D=this,T=arguments.length,A=new Array(T);T--;)A[T]=arguments[T];return w.then(function(){return v.apply(D,A)})}return v.apply(this,arguments)}}nn.ModifyError=Me,nn.DexieError=ae,nn.BulkError=Je;var Pe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function xe(p){Pe=p}var it={},We=100,br=typeof Promise>"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var v=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[v,c(v),p]}(),at=br[0],Fo=br[1],br=br[2],Fo=Fo&&Fo.then,dt=at&&at.constructor,xt=!!br,Lt=function(p,v){$e.push([p,v]),Dn&&(queueMicrotask(aa),Dn=!1)},Ht=!0,Dn=!0,cn=[],qn=[],ke=V,q={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ot,pgp:!1,env:{},finalize:Ot},fe=q,$e=[],vt=0,Ft=[];function Le(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var v=this._PSD=fe;if(typeof p!="function"){if(p!==it)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&ra(this,this._value))}this._state=null,this._value=null,++v.ref,function w(D,T){try{T(function(A){if(D._state===null){if(A===D)throw new TypeError("A promise cannot be resolved with itself.");var L=D._lib&&la();A&&typeof A.then=="function"?w(D,function(W,Q){A instanceof Le?A._then(W,Q):A.then(W,Q)}):(D._state=!0,D._value=A,xo(D)),L&&Ms()}},ra.bind(null,D))}catch(A){ra(D,A)}}(this,p)}var An={get:function(){var p=fe,v=Cm;function w(D,T){var A=this,L=!p.global&&(p!==fe||v!==Cm),W=L&&!da(),Q=new Le(function(te,se){Os(A,new ks($M(D,p,L,W),$M(T,p,L,W),te,se,p))});return this._consoleTask&&(Q._consoleTask=this._consoleTask),Q}return w.prototype=it,w},set:function(p){g(this,"then",p&&p.prototype===it?An:{get:function(){return p},set:An.set})}};function ks(p,v,w,D,T){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof v=="function"?v:null,this.resolve=w,this.reject=D,this.psd=T}function ra(p,v){var w,D;qn.push(v),p._state===null&&(w=p._lib&&la(),v=ke(v),p._state=!1,p._value=v,D=p,cn.some(function(T){return T._value===D._value})||cn.push(D),xo(p),w&&Ms())}function xo(p){var v=p._listeners;p._listeners=[];for(var w=0,D=v.length;w<D;++w)Os(p,v[w]);var T=p._PSD;--T.ref||T.finalize(),vt===0&&(++vt,Lt(function(){--vt==0&&ca()},[]))}function Os(p,v){if(p._state!==null){var w=p._state?v.onFulfilled:v.onRejected;if(w===null)return(p._state?v.resolve:v.reject)(p._value);++v.psd.ref,++vt,Lt(Qo,[w,p,v])}else p._listeners.push(v)}function Qo(p,v,w){try{var D,T=v._value;!v._state&&qn.length&&(qn=[]),D=Pe&&v._consoleTask?v._consoleTask.run(function(){return p(T)}):p(T),v._state||qn.indexOf(T)!==-1||function(A){for(var L=cn.length;L;)if(cn[--L]._value===A._value)return cn.splice(L,1)}(v),w.resolve(D)}catch(A){w.reject(A)}finally{--vt==0&&ca(),--w.psd.ref||w.psd.finalize()}}function aa(){bl(q,function(){la()&&Ms()})}function la(){var p=Ht;return Dn=Ht=!1,p}function Ms(){var p,v,w;do for(;0<$e.length;)for(p=$e,$e=[],w=p.length,v=0;v<w;++v){var D=p[v];D[0].apply(null,D[1])}while(0<$e.length);Dn=Ht=!0}function ca(){var p=cn;cn=[],p.forEach(function(D){D._PSD.onunhandled.call(null,D._value,D)});for(var v=Ft.slice(0),w=v.length;w;)v[--w]()}function mm(p){return new Le(it,!1,p)}function Sn(p,v){var w=fe;return function(){var D=la(),T=fe;try{return ha(w,!0),p.apply(this,arguments)}catch(A){v&&v(A)}finally{ha(T,!1),D&&Ms()}}}h(Le.prototype,{then:An,_then:function(p,v){Os(this,new ks(null,null,p,v,fe))},catch:function(p){if(arguments.length===1)return this.then(null,p);var v=p,w=arguments[1];return typeof v=="function"?this.then(null,function(D){return(D instanceof v?w:mm)(D)}):this.then(null,function(D){return(D&&D.name===v?w:mm)(D)})},finally:function(p){return this.then(function(v){return Le.resolve(p()).then(function(){return v})},function(v){return Le.resolve(p()).then(function(){return mm(v)})})},timeout:function(p,v){var w=this;return p<1/0?new Le(function(D,T){var A=setTimeout(function(){return T(new Be.Timeout(v))},p);w.then(D,T).finally(clearTimeout.bind(null,A))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Le.prototype,Symbol.toStringTag,"Dexie.Promise"),q.env=GM(),h(Le,{all:function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.length===0&&v([]);var D=p.length;p.forEach(function(T,A){return Le.resolve(T).then(function(L){p[A]=L,--D||v(p)},w)})})},resolve:function(p){return p instanceof Le?p:p&&typeof p.then=="function"?new Le(function(v,w){p.then(v,w)}):new Le(it,!0,p)},reject:mm,race:function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.map(function(D){return Le.resolve(D).then(v,w)})})},PSD:{get:function(){return fe},set:function(p){return fe=p}},totalEchoes:{get:function(){return Cm}},newPSD:ua,usePSD:bl,scheduler:{get:function(){return Lt},set:function(p){Lt=p}},rejectionMapper:{get:function(){return ke},set:function(p){ke=p}},follow:function(p,v){return new Le(function(w,D){return ua(function(T,A){var L=fe;L.unhandleds=[],L.onunhandled=A,L.finalize=pe(function(){var W,Q=this;W=function(){Q.unhandleds.length===0?T():A(Q.unhandleds[0])},Ft.push(function te(){W(),Ft.splice(Ft.indexOf(te),1)}),++vt,Lt(function(){--vt==0&&ca()},[])},L.finalize),p()},v,w,D)})}}),dt&&(dt.allSettled&&g(Le,"allSettled",function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v){p.length===0&&v([]);var w=p.length,D=new Array(w);p.forEach(function(T,A){return Le.resolve(T).then(function(L){return D[A]={status:"fulfilled",value:L}},function(L){return D[A]={status:"rejected",reason:L}}).then(function(){return--w||v(D)})})})}),dt.any&&typeof AggregateError<"u"&&g(Le,"any",function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.length===0&&w(new AggregateError([]));var D=p.length,T=new Array(D);p.forEach(function(A,L){return Le.resolve(A).then(function(W){return v(W)},function(W){T[L]=W,--D||w(new AggregateError(T))})})})}),dt.withResolvers&&(Le.withResolvers=dt.withResolvers));var Qn={awaits:0,echoes:0,id:0},Vde=0,vm=[],ym=0,Cm=0,Bde=0;function ua(p,v,w,D){var T=fe,A=Object.create(T);return A.parent=T,A.ref=0,A.global=!1,A.id=++Bde,q.env,A.env=xt?{Promise:Le,PromiseProp:{value:Le,configurable:!0,writable:!0},all:Le.all,race:Le.race,allSettled:Le.allSettled,any:Le.any,resolve:Le.resolve,reject:Le.reject}:{},v&&l(A,v),++T.ref,A.finalize=function(){--this.parent.ref||this.parent.finalize()},D=bl(A,p,w,D),A.ref===0&&A.finalize(),D}function iu(){return Qn.id||(Qn.id=++Vde),++Qn.awaits,Qn.echoes+=We,Qn.id}function da(){return!!Qn.awaits&&(--Qn.awaits==0&&(Qn.id=0),Qn.echoes=Qn.awaits*We,!0)}function wm(p){return Qn.echoes&&p&&p.constructor===dt?(iu(),p.then(function(v){return da(),v},function(v){return da(),Nn(v)})):p}function Hde(){var p=vm[vm.length-1];vm.pop(),ha(p,!1)}function ha(p,v){var w,D=fe;(v?!Qn.echoes||ym++&&p===fe:!ym||--ym&&p===fe)||queueMicrotask(v?(function(T){++Cm,Qn.echoes&&--Qn.echoes!=0||(Qn.echoes=Qn.awaits=Qn.id=0),vm.push(fe),ha(T,!0)}).bind(null,p):Hde),p!==fe&&(fe=p,D===q&&(q.env=GM()),xt&&(w=q.env.Promise,v=p.env,(D.global||p.global)&&(Object.defineProperty(s,"Promise",v.PromiseProp),w.all=v.all,w.race=v.race,w.resolve=v.resolve,w.reject=v.reject,v.allSettled&&(w.allSettled=v.allSettled),v.any&&(w.any=v.any))))}function GM(){var p=s.Promise;return xt?{Promise:p,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:p.all,race:p.race,allSettled:p.allSettled,any:p.any,resolve:p.resolve,reject:p.reject}:{}}function bl(p,v,w,D,T){var A=fe;try{return ha(p,!0),v(w,D,T)}finally{ha(A,!1)}}function $M(p,v,w,D){return typeof p!="function"?p:function(){var T=fe;w&&iu(),ha(v,!0);try{return p.apply(this,arguments)}finally{ha(T,!1),D&&queueMicrotask(da)}}}function GS(p){Promise===dt&&Qn.echoes===0?ym===0?p():enqueueNativeMicroTask(p):setTimeout(p,0)}(""+Fo).indexOf("[native code]")===-1&&(iu=da=Ot);var Nn=Le.reject,Sl="",wr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",WM="String expected.",ou=[],bm="__dbnames",$S="readonly",WS="readwrite";function El(p,v){return p?v?function(){return p.apply(this,arguments)&&v.apply(this,arguments)}:p:v}var zM={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Sm(p){return typeof p!="string"||/\./.test(p)?function(v){return v}:function(v){return v[p]===void 0&&p in v&&delete(v=N(v))[p],v}}function UM(){throw Be.Type()}function Gt(p,v){try{var w=jM(p),D=jM(v);if(w!==D)return w==="Array"?1:D==="Array"?-1:w==="binary"?1:D==="binary"?-1:w==="string"?1:D==="string"?-1:w==="Date"?1:D!=="Date"?NaN:-1;switch(w){case"number":case"Date":case"string":return v<p?1:p<v?-1:0;case"binary":return function(T,A){for(var L=T.length,W=A.length,Q=L<W?L:W,te=0;te<Q;++te)if(T[te]!==A[te])return T[te]<A[te]?-1:1;return L===W?0:L<W?-1:1}(KM(p),KM(v));case"Array":return function(T,A){for(var L=T.length,W=A.length,Q=L<W?L:W,te=0;te<Q;++te){var se=Gt(T[te],A[te]);if(se!==0)return se}return L===W?0:L<W?-1:1}(p,v)}}catch{}return NaN}function jM(p){var v=typeof p;return v!="object"?v:ArrayBuffer.isView(p)?"binary":(p=ie(p),p==="ArrayBuffer"?"binary":p)}function KM(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):new Uint8Array(p)}var qM=(gn.prototype._trans=function(p,v,w){var D=this._tx||fe.trans,T=this.name,A=Pe&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(p==="readonly"?"read":"write"," ").concat(this.name));function L(te,se,U){if(!U.schema[T])throw new Be.NotFound("Table "+T+" not part of transaction");return v(U.idbtrans,U)}var W=la();try{var Q=D&&D.db._novip===this.db._novip?D===fe.trans?D._promise(p,L,w):ua(function(){return D._promise(p,L,w)},{trans:D,transless:fe.transless||fe}):function te(se,U,le,ee){if(se.idbdb&&(se._state.openComplete||fe.letThrough||se._vip)){var oe=se._createTransaction(U,le,se._dbSchema);try{oe.create(),se._state.PR1398_maxLoop=3}catch(re){return re.name===ft.InvalidState&&se.isOpen()&&0<--se._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),se.close({disableAutoOpen:!1}),se.open().then(function(){return te(se,U,le,ee)})):Nn(re)}return oe._promise(U,function(re,ne){return ua(function(){return fe.trans=oe,ee(re,ne,oe)})}).then(function(re){if(U==="readwrite")try{oe.idbtrans.commit()}catch{}return U==="readonly"?re:oe._completion.then(function(){return re})})}if(se._state.openComplete)return Nn(new Be.DatabaseClosed(se._state.dbOpenError));if(!se._state.isBeingOpened){if(!se._state.autoOpen)return Nn(new Be.DatabaseClosed);se.open().catch(Ot)}return se._state.dbReadyPromise.then(function(){return te(se,U,le,ee)})}(this.db,p,[this.name],L);return A&&(Q._consoleTask=A,Q=Q.catch(function(te){return console.trace(te),Nn(te)})),Q}finally{W&&Ms()}},gn.prototype.get=function(p,v){var w=this;return p&&p.constructor===Object?this.where(p).first(v):p==null?Nn(new Be.Type("Invalid argument to Table.get()")):this._trans("readonly",function(D){return w.core.get({trans:D,key:p}).then(function(T){return w.hook.reading.fire(T)})}).then(v)},gn.prototype.where=function(p){if(typeof p=="string")return new this.db.WhereClause(this,p);if(a(p))return new this.db.WhereClause(this,"[".concat(p.join("+"),"]"));var v=r(p);if(v.length===1)return this.where(v[0]).equals(p[v[0]]);var w=this.schema.indexes.concat(this.schema.primKey).filter(function(W){if(W.compound&&v.every(function(te){return 0<=W.keyPath.indexOf(te)})){for(var Q=0;Q<v.length;++Q)if(v.indexOf(W.keyPath[Q])===-1)return!1;return!0}return!1}).sort(function(W,Q){return W.keyPath.length-Q.keyPath.length})[0];if(w&&this.db._maxKey!==Sl){var A=w.keyPath.slice(0,v.length);return this.where(A).equals(A.map(function(Q){return p[Q]}))}!w&&Pe&&console.warn("The query ".concat(JSON.stringify(p)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(v.join("+"),"]"));var D=this.schema.idxByName;function T(W,Q){return Gt(W,Q)===0}var L=v.reduce(function(U,Q){var te=U[0],se=U[1],U=D[Q],le=p[Q];return[te||U,te||!U?El(se,U&&U.multi?function(ee){return ee=E(ee,Q),a(ee)&&ee.some(function(oe){return T(le,oe)})}:function(ee){return T(le,E(ee,Q))}):se]},[null,null]),A=L[0],L=L[1];return A?this.where(A.name).equals(p[A.keyPath]).filter(L):w?this.filter(L):this.where(v).equals("")},gn.prototype.filter=function(p){return this.toCollection().and(p)},gn.prototype.count=function(p){return this.toCollection().count(p)},gn.prototype.offset=function(p){return this.toCollection().offset(p)},gn.prototype.limit=function(p){return this.toCollection().limit(p)},gn.prototype.each=function(p){return this.toCollection().each(p)},gn.prototype.toArray=function(p){return this.toCollection().toArray(p)},gn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},gn.prototype.orderBy=function(p){return new this.db.Collection(new this.db.WhereClause(this,a(p)?"[".concat(p.join("+"),"]"):p))},gn.prototype.reverse=function(){return this.toCollection().reverse()},gn.prototype.mapToClass=function(p){var v,w=this.db,D=this.name;function T(){return v!==null&&v.apply(this,arguments)||this}(this.schema.mappedClass=p).prototype instanceof UM&&(function(Q,te){if(typeof te!="function"&&te!==null)throw new TypeError("Class extends value "+String(te)+" is not a constructor or null");function se(){this.constructor=Q}n(Q,te),Q.prototype=te===null?Object.create(te):(se.prototype=te.prototype,new se)}(T,v=p),Object.defineProperty(T.prototype,"db",{get:function(){return w},enumerable:!1,configurable:!0}),T.prototype.table=function(){return D},p=T);for(var A=new Set,L=p.prototype;L;L=c(L))Object.getOwnPropertyNames(L).forEach(function(Q){return A.add(Q)});function W(Q){if(!Q)return Q;var te,se=Object.create(p.prototype);for(te in Q)if(!A.has(te))try{se[te]=Q[te]}catch{}return se}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=W,this.hook("reading",W),p},gn.prototype.defineClass=function(){return this.mapToClass(function(p){l(this,p)})},gn.prototype.add=function(p,v){var w=this,D=this.schema.primKey,T=D.auto,A=D.keyPath,L=p;return A&&T&&(L=Sm(A)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"add",keys:v!=null?[v]:null,values:[L]})}).then(function(W){return W.numFailures?Le.reject(W.failures[0]):W.lastResult}).then(function(W){if(A)try{_(p,A,W)}catch{}return W})},gn.prototype.update=function(p,v){return typeof p!="object"||a(p)?this.where(":id").equals(p).modify(v):(p=E(p,this.schema.primKey.keyPath),p===void 0?Nn(new Be.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(p).modify(v))},gn.prototype.put=function(p,v){var w=this,D=this.schema.primKey,T=D.auto,A=D.keyPath,L=p;return A&&T&&(L=Sm(A)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"put",values:[L],keys:v!=null?[v]:null})}).then(function(W){return W.numFailures?Le.reject(W.failures[0]):W.lastResult}).then(function(W){if(A)try{_(p,A,W)}catch{}return W})},gn.prototype.delete=function(p){var v=this;return this._trans("readwrite",function(w){return v.core.mutate({trans:w,type:"delete",keys:[p]})}).then(function(w){return w.numFailures?Le.reject(w.failures[0]):void 0})},gn.prototype.clear=function(){var p=this;return this._trans("readwrite",function(v){return p.core.mutate({trans:v,type:"deleteRange",range:zM})}).then(function(v){return v.numFailures?Le.reject(v.failures[0]):void 0})},gn.prototype.bulkGet=function(p){var v=this;return this._trans("readonly",function(w){return v.core.getMany({keys:p,trans:w}).then(function(D){return D.map(function(T){return v.hook.reading.fire(T)})})})},gn.prototype.bulkAdd=function(p,v,w){var D=this,T=Array.isArray(v)?v:void 0,A=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var te=D.schema.primKey,W=te.auto,te=te.keyPath;if(te&&T)throw new Be.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");var Q=p.length,te=te&&W?p.map(Sm(te)):p;return D.core.mutate({trans:L,type:"add",keys:T,values:te,wantResults:A}).then(function(oe){var U=oe.numFailures,le=oe.results,ee=oe.lastResult,oe=oe.failures;if(U===0)return A?le:ee;throw new Je("".concat(D.name,".bulkAdd(): ").concat(U," of ").concat(Q," operations failed"),oe)})})},gn.prototype.bulkPut=function(p,v,w){var D=this,T=Array.isArray(v)?v:void 0,A=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var te=D.schema.primKey,W=te.auto,te=te.keyPath;if(te&&T)throw new Be.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");var Q=p.length,te=te&&W?p.map(Sm(te)):p;return D.core.mutate({trans:L,type:"put",keys:T,values:te,wantResults:A}).then(function(oe){var U=oe.numFailures,le=oe.results,ee=oe.lastResult,oe=oe.failures;if(U===0)return A?le:ee;throw new Je("".concat(D.name,".bulkPut(): ").concat(U," of ").concat(Q," operations failed"),oe)})})},gn.prototype.bulkUpdate=function(p){var v=this,w=this.core,D=p.map(function(L){return L.key}),T=p.map(function(L){return L.changes}),A=[];return this._trans("readwrite",function(L){return w.getMany({trans:L,keys:D,cache:"clone"}).then(function(W){var Q=[],te=[];p.forEach(function(U,le){var ee=U.key,oe=U.changes,re=W[le];if(re){for(var ne=0,he=Object.keys(oe);ne<he.length;ne++){var me=he[ne],ve=oe[me];if(me===v.schema.primKey.keyPath){if(Gt(ve,ee)!==0)throw new Be.Constraint("Cannot update primary key in bulkUpdate()")}else _(re,me,ve)}A.push(le),Q.push(ee),te.push(re)}});var se=Q.length;return w.mutate({trans:L,type:"put",keys:Q,values:te,updates:{keys:D,changeSpecs:T}}).then(function(U){var le=U.numFailures,ee=U.failures;if(le===0)return se;for(var oe=0,re=Object.keys(ee);oe<re.length;oe++){var ne,he=re[oe],me=A[Number(he)];me!=null&&(ne=ee[he],delete ee[he],ee[me]=ne)}throw new Je("".concat(v.name,".bulkUpdate(): ").concat(le," of ").concat(se," operations failed"),ee)})})})},gn.prototype.bulkDelete=function(p){var v=this,w=p.length;return this._trans("readwrite",function(D){return v.core.mutate({trans:D,type:"delete",keys:p})}).then(function(L){var T=L.numFailures,A=L.lastResult,L=L.failures;if(T===0)return A;throw new Je("".concat(v.name,".bulkDelete(): ").concat(T," of ").concat(w," operations failed"),L)})},gn);function gn(){}function Eh(p){function v(L,W){if(W){for(var Q=arguments.length,te=new Array(Q-1);--Q;)te[Q-1]=arguments[Q];return w[L].subscribe.apply(null,te),p}if(typeof L=="string")return w[L]}var w={};v.addEventType=A;for(var D=1,T=arguments.length;D<T;++D)A(arguments[D]);return v;function A(L,W,Q){if(typeof L!="object"){var te;W=W||Ve;var se={subscribers:[],fire:Q=Q||Ot,subscribe:function(U){se.subscribers.indexOf(U)===-1&&(se.subscribers.push(U),se.fire=W(se.fire,U))},unsubscribe:function(U){se.subscribers=se.subscribers.filter(function(le){return le!==U}),se.fire=se.subscribers.reduce(W,Q)}};return w[L]=v[L]=se}r(te=L).forEach(function(U){var le=te[U];if(a(le))A(U,te[U][0],te[U][1]);else{if(le!=="asap")throw new Be.InvalidArgument("Invalid event config");var ee=A(U,V,function(){for(var oe=arguments.length,re=new Array(oe);oe--;)re[oe]=arguments[oe];ee.subscribers.forEach(function(ne){R(function(){ne.apply(null,re)})})})}})}}function Rh(p,v){return m(v).from({prototype:p}),v}function su(p,v){return!(p.filter||p.algorithm||p.or)&&(v?p.justLimit:!p.replayFilter)}function zS(p,v){p.filter=El(p.filter,v)}function US(p,v,w){var D=p.replayFilter;p.replayFilter=D?function(){return El(D(),v())}:v,p.justLimit=w&&!D}function Em(p,v){if(p.isPrimKey)return v.primaryKey;var w=v.getIndexByKeyPath(p.index);if(!w)throw new Be.Schema("KeyPath "+p.index+" on object store "+v.name+" is not indexed");return w}function YM(p,v,w){var D=Em(p,v.schema);return v.openCursor({trans:w,values:!p.keysOnly,reverse:p.dir==="prev",unique:!!p.unique,query:{index:D,range:p.range}})}function Rm(p,v,w,D){var T=p.replayFilter?El(p.filter,p.replayFilter()):p.filter;if(p.or){var A={},L=function(W,Q,te){var se,U;T&&!T(Q,te,function(le){return Q.stop(le)},function(le){return Q.fail(le)})||((U=""+(se=Q.primaryKey))=="[object ArrayBuffer]"&&(U=""+new Uint8Array(se)),d(A,U)||(A[U]=!0,v(W,Q,te)))};return Promise.all([p.or._iterate(L,w),ZM(YM(p,D,w),p.algorithm,L,!p.keysOnly&&p.valueMapper)])}return ZM(YM(p,D,w),El(p.algorithm,T),v,!p.keysOnly&&p.valueMapper)}function ZM(p,v,w,D){var T=Sn(D?function(A,L,W){return w(D(A),L,W)}:w);return p.then(function(A){if(A)return A.start(function(){var L=function(){return A.continue()};v&&!v(A,function(W){return L=W},function(W){A.stop(W),L=Ot},function(W){A.fail(W),L=Ot})||T(A.value,A,function(W){return L=W}),L()})})}var br=Symbol(),Dh=(XM.prototype.execute=function(p){if(this.add!==void 0){var v=this.add;if(a(v))return o(o([],a(p)?p:[],!0),v).sort();if(typeof v=="number")return(Number(p)||0)+v;if(typeof v=="bigint")try{return BigInt(p)+v}catch{return BigInt(0)+v}throw new TypeError("Invalid term ".concat(v))}if(this.remove!==void 0){var w=this.remove;if(a(w))return a(p)?p.filter(function(D){return!w.includes(D)}).sort():[];if(typeof w=="number")return Number(p)-w;if(typeof w=="bigint")try{return BigInt(p)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return v=(v=this.replacePrefix)===null||v===void 0?void 0:v[0],v&&typeof p=="string"&&p.startsWith(v)?this.replacePrefix[1]+p.substring(v.length):p},XM);function XM(p){Object.assign(this,p)}var Gde=(Kt.prototype._read=function(p,v){var w=this._ctx;return w.error?w.table._trans(null,Nn.bind(null,w.error)):w.table._trans("readonly",p).then(v)},Kt.prototype._write=function(p){var v=this._ctx;return v.error?v.table._trans(null,Nn.bind(null,v.error)):v.table._trans("readwrite",p,"locked")},Kt.prototype._addAlgorithm=function(p){var v=this._ctx;v.algorithm=El(v.algorithm,p)},Kt.prototype._iterate=function(p,v){return Rm(this._ctx,p,v,this._ctx.table.core)},Kt.prototype.clone=function(p){var v=Object.create(this.constructor.prototype),w=Object.create(this._ctx);return p&&l(w,p),v._ctx=w,v},Kt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Kt.prototype.each=function(p){var v=this._ctx;return this._read(function(w){return Rm(v,p,w,v.table.core)})},Kt.prototype.count=function(p){var v=this;return this._read(function(w){var D=v._ctx,T=D.table.core;if(su(D,!0))return T.count({trans:w,query:{index:Em(D,T.schema),range:D.range}}).then(function(L){return Math.min(L,D.limit)});var A=0;return Rm(D,function(){return++A,!1},w,T).then(function(){return A})}).then(p)},Kt.prototype.sortBy=function(p,v){var w=p.split(".").reverse(),D=w[0],T=w.length-1;function A(Q,te){return te?A(Q[w[te]],te-1):Q[D]}var L=this._ctx.dir==="next"?1:-1;function W(Q,te){return Gt(A(Q,T),A(te,T))*L}return this.toArray(function(Q){return Q.sort(W)}).then(v)},Kt.prototype.toArray=function(p){var v=this;return this._read(function(w){var D=v._ctx;if(D.dir==="next"&&su(D,!0)&&0<D.limit){var T=D.valueMapper,A=Em(D,D.table.core.schema);return D.table.core.query({trans:w,limit:D.limit,values:!0,query:{index:A,range:D.range}}).then(function(W){return W=W.result,T?W.map(T):W})}var L=[];return Rm(D,function(W){return L.push(W)},w,D.table.core).then(function(){return L})},p)},Kt.prototype.offset=function(p){var v=this._ctx;return p<=0||(v.offset+=p,su(v)?US(v,function(){var w=p;return function(D,T){return w===0||(w===1?--w:T(function(){D.advance(w),w=0}),!1)}}):US(v,function(){var w=p;return function(){return--w<0}})),this},Kt.prototype.limit=function(p){return this._ctx.limit=Math.min(this._ctx.limit,p),US(this._ctx,function(){var v=p;return function(w,D,T){return--v<=0&&D(T),0<=v}},!0),this},Kt.prototype.until=function(p,v){return zS(this._ctx,function(w,D,T){return!p(w.value)||(D(T),v)}),this},Kt.prototype.first=function(p){return this.limit(1).toArray(function(v){return v[0]}).then(p)},Kt.prototype.last=function(p){return this.reverse().first(p)},Kt.prototype.filter=function(p){var v;return zS(this._ctx,function(w){return p(w.value)}),(v=this._ctx).isMatch=El(v.isMatch,p),this},Kt.prototype.and=function(p){return this.filter(p)},Kt.prototype.or=function(p){return new this.db.WhereClause(this._ctx.table,p,this)},Kt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Kt.prototype.desc=function(){return this.reverse()},Kt.prototype.eachKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,D){p(D.key,D)})},Kt.prototype.eachUniqueKey=function(p){return this._ctx.unique="unique",this.eachKey(p)},Kt.prototype.eachPrimaryKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,D){p(D.primaryKey,D)})},Kt.prototype.keys=function(p){var v=this._ctx;v.keysOnly=!v.isMatch;var w=[];return this.each(function(D,T){w.push(T.key)}).then(function(){return w}).then(p)},Kt.prototype.primaryKeys=function(p){var v=this._ctx;if(v.dir==="next"&&su(v,!0)&&0<v.limit)return this._read(function(D){var T=Em(v,v.table.core.schema);return v.table.core.query({trans:D,values:!1,limit:v.limit,query:{index:T,range:v.range}})}).then(function(D){return D.result}).then(p);v.keysOnly=!v.isMatch;var w=[];return this.each(function(D,T){w.push(T.primaryKey)}).then(function(){return w}).then(p)},Kt.prototype.uniqueKeys=function(p){return this._ctx.unique="unique",this.keys(p)},Kt.prototype.firstKey=function(p){return this.limit(1).keys(function(v){return v[0]}).then(p)},Kt.prototype.lastKey=function(p){return this.reverse().firstKey(p)},Kt.prototype.distinct=function(){var p=this._ctx,p=p.index&&p.table.schema.idxByName[p.index];if(!p||!p.multi)return this;var v={};return zS(this._ctx,function(T){var D=T.primaryKey.toString(),T=d(v,D);return v[D]=!0,!T}),this},Kt.prototype.modify=function(p){var v=this,w=this._ctx;return this._write(function(D){var T,A,L;L=typeof p=="function"?p:(T=r(p),A=T.length,function(ne){for(var he=!1,me=0;me<A;++me){var ve=T[me],Re=p[ve],He=E(ne,ve);Re instanceof Dh?(_(ne,ve,Re.execute(He)),he=!0):He!==Re&&(_(ne,ve,Re),he=!0)}return he});var W=w.table.core,U=W.schema.primaryKey,Q=U.outbound,te=U.extractKey,se=200,U=v.db._options.modifyChunkSize;U&&(se=typeof U=="object"?U[W.name]||U["*"]||200:U);function le(ne,ve){var me=ve.failures,ve=ve.numFailures;oe+=ne-ve;for(var Re=0,He=r(me);Re<He.length;Re++){var Ze=He[Re];ee.push(me[Ze])}}var ee=[],oe=0,re=[];return v.clone().primaryKeys().then(function(ne){function he(ve){var Re=Math.min(se,ne.length-ve);return W.getMany({trans:D,keys:ne.slice(ve,ve+Re),cache:"immutable"}).then(function(He){for(var Ze=[],Ge=[],ze=Q?[]:null,Qe=[],qe=0;qe<Re;++qe){var st=He[qe],At={value:N(st),primKey:ne[ve+qe]};L.call(At,At.value,At)!==!1&&(At.value==null?Qe.push(ne[ve+qe]):Q||Gt(te(st),te(At.value))===0?(Ge.push(At.value),Q&&ze.push(ne[ve+qe])):(Qe.push(ne[ve+qe]),Ze.push(At.value)))}return Promise.resolve(0<Ze.length&&W.mutate({trans:D,type:"add",values:Ze}).then(function(Vt){for(var Bt in Vt.failures)Qe.splice(parseInt(Bt),1);le(Ze.length,Vt)})).then(function(){return(0<Ge.length||me&&typeof p=="object")&&W.mutate({trans:D,type:"put",keys:ze,values:Ge,criteria:me,changeSpec:typeof p!="function"&&p,isAdditionalChunk:0<ve}).then(function(Vt){return le(Ge.length,Vt)})}).then(function(){return(0<Qe.length||me&&p===jS)&&W.mutate({trans:D,type:"delete",keys:Qe,criteria:me,isAdditionalChunk:0<ve}).then(function(Vt){return le(Qe.length,Vt)})}).then(function(){return ne.length>ve+Re&&he(ve+se)})})}var me=su(w)&&w.limit===1/0&&(typeof p!="function"||p===jS)&&{index:w.index,range:w.range};return he(0).then(function(){if(0<ee.length)throw new Me("Error modifying one or more objects",ee,oe,re);return ne.length})})})},Kt.prototype.delete=function(){var p=this._ctx,v=p.range;return su(p)&&(p.isPrimKey||v.type===3)?this._write(function(w){var D=p.table.core.schema.primaryKey,T=v;return p.table.core.count({trans:w,query:{index:D,range:T}}).then(function(A){return p.table.core.mutate({trans:w,type:"deleteRange",range:T}).then(function(L){var W=L.failures;if(L.lastResult,L.results,L=L.numFailures,L)throw new Me("Could not delete some values",Object.keys(W).map(function(Q){return W[Q]}),A-L);return A-L})})}):this.modify(jS)},Kt);function Kt(){}var jS=function(p,v){return v.value=null};function $de(p,v){return p<v?-1:p===v?0:1}function Wde(p,v){return v<p?-1:p===v?0:1}function no(p,v,w){return p=p instanceof QM?new p.Collection(p):p,p._ctx.error=new(w||TypeError)(v),p}function ru(p){return new p.Collection(p,function(){return JM("")}).limit(0)}function Dm(p,v,w,D){var T,A,L,W,Q,te,se,U=w.length;if(!w.every(function(oe){return typeof oe=="string"}))return no(p,WM);function le(oe){T=oe==="next"?function(ne){return ne.toUpperCase()}:function(ne){return ne.toLowerCase()},A=oe==="next"?function(ne){return ne.toLowerCase()}:function(ne){return ne.toUpperCase()},L=oe==="next"?$de:Wde;var re=w.map(function(ne){return{lower:A(ne),upper:T(ne)}}).sort(function(ne,he){return L(ne.lower,he.lower)});W=re.map(function(ne){return ne.upper}),Q=re.map(function(ne){return ne.lower}),se=(te=oe)==="next"?"":D}le("next"),p=new p.Collection(p,function(){return fa(W[0],Q[U-1]+D)}),p._ondirectionchange=function(oe){le(oe)};var ee=0;return p._addAlgorithm(function(oe,re,ne){var he=oe.key;if(typeof he!="string")return!1;var me=A(he);if(v(me,Q,ee))return!0;for(var ve=null,Re=ee;Re<U;++Re){var He=function(Ze,Ge,ze,Qe,qe,st){for(var At=Math.min(Ze.length,Qe.length),Vt=-1,Bt=0;Bt<At;++Bt){var io=Ge[Bt];if(io!==Qe[Bt])return qe(Ze[Bt],ze[Bt])<0?Ze.substr(0,Bt)+ze[Bt]+ze.substr(Bt+1):qe(Ze[Bt],Qe[Bt])<0?Ze.substr(0,Bt)+Qe[Bt]+ze.substr(Bt+1):0<=Vt?Ze.substr(0,Vt)+Ge[Vt]+ze.substr(Vt+1):null;qe(Ze[Bt],io)<0&&(Vt=Bt)}return At<Qe.length&&st==="next"?Ze+ze.substr(Ze.length):At<Ze.length&&st==="prev"?Ze.substr(0,ze.length):Vt<0?null:Ze.substr(0,Vt)+Qe[Vt]+ze.substr(Vt+1)}(he,me,W[Re],Q[Re],L,te);He===null&&ve===null?ee=Re+1:(ve===null||0<L(ve,He))&&(ve=He)}return re(ve!==null?function(){oe.continue(ve+se)}:ne),!1}),p}function fa(p,v,w,D){return{type:2,lower:p,upper:v,lowerOpen:w,upperOpen:D}}function JM(p){return{type:1,lower:p,upper:p}}var QM=(Object.defineProperty(ei.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ei.prototype.between=function(p,v,w,D){w=w!==!1,D=D===!0;try{return 0<this._cmp(p,v)||this._cmp(p,v)===0&&(w||D)&&(!w||!D)?ru(this):new this.Collection(this,function(){return fa(p,v,!w,!D)})}catch{return no(this,wr)}},ei.prototype.equals=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return JM(p)})},ei.prototype.above=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(p,void 0,!0)})},ei.prototype.aboveOrEqual=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(p,void 0,!1)})},ei.prototype.below=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(void 0,p,!1,!0)})},ei.prototype.belowOrEqual=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(void 0,p)})},ei.prototype.startsWith=function(p){return typeof p!="string"?no(this,WM):this.between(p,p+Sl,!0,!0)},ei.prototype.startsWithIgnoreCase=function(p){return p===""?this.startsWith(p):Dm(this,function(v,w){return v.indexOf(w[0])===0},[p],Sl)},ei.prototype.equalsIgnoreCase=function(p){return Dm(this,function(v,w){return v===w[0]},[p],"")},ei.prototype.anyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?ru(this):Dm(this,function(v,w){return w.indexOf(v)!==-1},p,"")},ei.prototype.startsWithAnyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?ru(this):Dm(this,function(v,w){return w.some(function(D){return v.indexOf(D)===0})},p,Sl)},ei.prototype.anyOf=function(){var p=this,v=ce.apply($,arguments),w=this._cmp;try{v.sort(w)}catch{return no(this,wr)}if(v.length===0)return ru(this);var D=new this.Collection(this,function(){return fa(v[0],v[v.length-1])});D._ondirectionchange=function(A){w=A==="next"?p._ascending:p._descending,v.sort(w)};var T=0;return D._addAlgorithm(function(A,L,W){for(var Q=A.key;0<w(Q,v[T]);)if(++T===v.length)return L(W),!1;return w(Q,v[T])===0||(L(function(){A.continue(v[T])}),!1)}),D},ei.prototype.notEqual=function(p){return this.inAnyRange([[-1/0,p],[p,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ei.prototype.noneOf=function(){var p=ce.apply($,arguments);if(p.length===0)return new this.Collection(this);try{p.sort(this._ascending)}catch{return no(this,wr)}var v=p.reduce(function(w,D){return w?w.concat([[w[w.length-1][1],D]]):[[-1/0,D]]},null);return v.push([p[p.length-1],this.db._maxKey]),this.inAnyRange(v,{includeLowers:!1,includeUppers:!1})},ei.prototype.inAnyRange=function(he,v){var w=this,D=this._cmp,T=this._ascending,A=this._descending,L=this._min,W=this._max;if(he.length===0)return ru(this);if(!he.every(function(me){return me[0]!==void 0&&me[1]!==void 0&&T(me[0],me[1])<=0}))return no(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Be.InvalidArgument);var Q=!v||v.includeLowers!==!1,te=v&&v.includeUppers===!0,se,U=T;function le(me,ve){return U(me[0],ve[0])}try{(se=he.reduce(function(me,ve){for(var Re=0,He=me.length;Re<He;++Re){var Ze=me[Re];if(D(ve[0],Ze[1])<0&&0<D(ve[1],Ze[0])){Ze[0]=L(Ze[0],ve[0]),Ze[1]=W(Ze[1],ve[1]);break}}return Re===He&&me.push(ve),me},[])).sort(le)}catch{return no(this,wr)}var ee=0,oe=te?function(me){return 0<T(me,se[ee][1])}:function(me){return 0<=T(me,se[ee][1])},re=Q?function(me){return 0<A(me,se[ee][0])}:function(me){return 0<=A(me,se[ee][0])},ne=oe,he=new this.Collection(this,function(){return fa(se[0][0],se[se.length-1][1],!Q,!te)});return he._ondirectionchange=function(me){U=me==="next"?(ne=oe,T):(ne=re,A),se.sort(le)},he._addAlgorithm(function(me,ve,Re){for(var He,Ze=me.key;ne(Ze);)if(++ee===se.length)return ve(Re),!1;return!oe(He=Ze)&&!re(He)||(w._cmp(Ze,se[ee][1])===0||w._cmp(Ze,se[ee][0])===0||ve(function(){U===T?me.continue(se[ee][0]):me.continue(se[ee][1])}),!1)}),he},ei.prototype.startsWithAnyOf=function(){var p=ce.apply($,arguments);return p.every(function(v){return typeof v=="string"})?p.length===0?ru(this):this.inAnyRange(p.map(function(v){return[v,v+Sl]})):no(this,"startsWithAnyOf() only works with strings")},ei);function ei(){}function Ls(p){return Sn(function(v){return _h(v),p(v.target.error),!1})}function _h(p){p.stopPropagation&&p.stopPropagation(),p.preventDefault&&p.preventDefault()}var xh="storagemutated",KS="x-storagemutated-1",pa=Eh(null,xh),zde=(Ns.prototype._lock=function(){return C(!fe.global),++this._reculock,this._reculock!==1||fe.global||(fe.lockOwnerFor=this),this},Ns.prototype._unlock=function(){if(C(!fe.global),--this._reculock==0)for(fe.global||(fe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var p=this._blockedFuncs.shift();try{bl(p[1],p[0])}catch{}}return this},Ns.prototype._locked=function(){return this._reculock&&fe.lockOwnerFor!==this},Ns.prototype.create=function(p){var v=this;if(!this.mode)return this;var w=this.db.idbdb,D=this.db._state.dbOpenError;if(C(!this.idbtrans),!p&&!w)switch(D&&D.name){case"DatabaseClosedError":throw new Be.DatabaseClosed(D);case"MissingAPIError":throw new Be.MissingAPI(D.message,D);default:throw new Be.OpenFailed(D)}if(!this.active)throw new Be.TransactionInactive;return C(this._completion._state===null),(p=this.idbtrans=p||(this.db.core||w).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Sn(function(T){_h(T),v._reject(p.error)}),p.onabort=Sn(function(T){_h(T),v.active&&v._reject(new Be.Abort(p.error)),v.active=!1,v.on("abort").fire(T)}),p.oncomplete=Sn(function(){v.active=!1,v._resolve(),"mutatedParts"in p&&pa.storagemutated.fire(p.mutatedParts)}),this},Ns.prototype._promise=function(p,v,w){var D=this;if(p==="readwrite"&&this.mode!=="readwrite")return Nn(new Be.ReadOnly("Transaction is readonly"));if(!this.active)return Nn(new Be.TransactionInactive);if(this._locked())return new Le(function(A,L){D._blockedFuncs.push([function(){D._promise(p,v,w).then(A,L)},fe])});if(w)return ua(function(){var A=new Le(function(L,W){D._lock();var Q=v(L,W,D);Q&&Q.then&&Q.then(L,W)});return A.finally(function(){return D._unlock()}),A._lib=!0,A});var T=new Le(function(A,L){var W=v(A,L,D);W&&W.then&&W.then(A,L)});return T._lib=!0,T},Ns.prototype._root=function(){return this.parent?this.parent._root():this},Ns.prototype.waitFor=function(p){var v,w=this._root(),D=Le.resolve(p);w._waitingFor?w._waitingFor=w._waitingFor.then(function(){return D}):(w._waitingFor=D,w._waitingQueue=[],v=w.idbtrans.objectStore(w.storeNames[0]),function A(){for(++w._spinCount;w._waitingQueue.length;)w._waitingQueue.shift()();w._waitingFor&&(v.get(-1/0).onsuccess=A)}());var T=w._waitingFor;return new Le(function(A,L){D.then(function(W){return w._waitingQueue.push(Sn(A.bind(null,W)))},function(W){return w._waitingQueue.push(Sn(L.bind(null,W)))}).finally(function(){w._waitingFor===T&&(w._waitingFor=null)})})},Ns.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Be.Abort))},Ns.prototype.table=function(p){var v=this._memoizedTables||(this._memoizedTables={});if(d(v,p))return v[p];var w=this.schema[p];if(!w)throw new Be.NotFound("Table "+p+" not part of transaction");return w=new this.db.Table(p,w,this),w.core=this.db.core.table(p),v[p]=w},Ns);function Ns(){}function qS(p,v,w,D,T,A,L){return{name:p,keyPath:v,unique:w,multi:D,auto:T,compound:A,src:(w&&!L?"&":"")+(D?"*":"")+(T?"++":"")+eL(v)}}function eL(p){return typeof p=="string"?p:p?"["+[].join.call(p,"+")+"]":""}function YS(p,v,w){return{name:p,primKey:v,indexes:w,mappedClass:null,idxByName:(D=function(T){return[T.name,T]},w.reduce(function(T,A,L){return L=D(A,L),L&&(T[L[0]]=L[1]),T},{}))};var D}var Fh=function(p){try{return p.only([[]]),Fh=function(){return[[]]},[[]]}catch{return Fh=function(){return Sl},Sl}};function ZS(p){return p==null?function(){}:typeof p=="string"?(v=p).split(".").length===1?function(w){return w[v]}:function(w){return E(w,v)}:function(w){return E(w,p)};var v}function tL(p){return[].slice.call(p)}var Ude=0;function Th(p){return p==null?":id":typeof p=="string"?p:"[".concat(p.join("+"),"]")}function jde(p,v,Q){function D(ne){if(ne.type===3)return null;if(ne.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var ee=ne.lower,oe=ne.upper,re=ne.lowerOpen,ne=ne.upperOpen;return ee===void 0?oe===void 0?null:v.upperBound(oe,!!ne):oe===void 0?v.lowerBound(ee,!!re):v.bound(ee,oe,!!re,!!ne)}function T(le){var ee,oe=le.name;return{name:oe,schema:le,mutate:function(re){var ne=re.trans,he=re.type,me=re.keys,ve=re.values,Re=re.range;return new Promise(function(He,Ze){He=Sn(He);var Ge=ne.objectStore(oe),ze=Ge.keyPath==null,Qe=he==="put"||he==="add";if(!Qe&&he!=="delete"&&he!=="deleteRange")throw new Error("Invalid operation type: "+he);var qe,st=(me||ve||{length:1}).length;if(me&&ve&&me.length!==ve.length)throw new Error("Given keys array must have same length as given values array.");if(st===0)return He({numFailures:0,failures:{},results:[],lastResult:void 0});function At(xi){++io,_h(xi)}var Vt=[],Bt=[],io=0;if(he==="deleteRange"){if(Re.type===4)return He({numFailures:io,failures:Bt,results:[],lastResult:void 0});Re.type===3?Vt.push(qe=Ge.clear()):Vt.push(qe=Ge.delete(D(Re)))}else{var ze=Qe?ze?[ve,me]:[ve,null]:[me,null],Tt=ze[0],vi=ze[1];if(Qe)for(var yi=0;yi<st;++yi)Vt.push(qe=vi&&vi[yi]!==void 0?Ge[he](Tt[yi],vi[yi]):Ge[he](Tt[yi])),qe.onerror=At;else for(yi=0;yi<st;++yi)Vt.push(qe=Ge[he](Tt[yi])),qe.onerror=At}function Vm(xi){xi=xi.target.result,Vt.forEach(function(_l,p0){return _l.error!=null&&(Bt[p0]=_l.error)}),He({numFailures:io,failures:Bt,results:he==="delete"?me:Vt.map(function(_l){return _l.result}),lastResult:xi})}qe.onerror=function(xi){At(xi),Vm(xi)},qe.onsuccess=Vm})},getMany:function(re){var ne=re.trans,he=re.keys;return new Promise(function(me,ve){me=Sn(me);for(var Re,He=ne.objectStore(oe),Ze=he.length,Ge=new Array(Ze),ze=0,Qe=0,qe=function(Vt){Vt=Vt.target,Ge[Vt._pos]=Vt.result,++Qe===ze&&me(Ge)},st=Ls(ve),At=0;At<Ze;++At)he[At]!=null&&((Re=He.get(he[At]))._pos=At,Re.onsuccess=qe,Re.onerror=st,++ze);ze===0&&me(Ge)})},get:function(re){var ne=re.trans,he=re.key;return new Promise(function(me,ve){me=Sn(me);var Re=ne.objectStore(oe).get(he);Re.onsuccess=function(He){return me(He.target.result)},Re.onerror=Ls(ve)})},query:(ee=te,function(re){return new Promise(function(ne,he){ne=Sn(ne);var me,ve,Re,ze=re.trans,He=re.values,Ze=re.limit,qe=re.query,Ge=Ze===1/0?void 0:Ze,Qe=qe.index,qe=qe.range,ze=ze.objectStore(oe),Qe=Qe.isPrimaryKey?ze:ze.index(Qe.name),qe=D(qe);if(Ze===0)return ne({result:[]});ee?((Ge=He?Qe.getAll(qe,Ge):Qe.getAllKeys(qe,Ge)).onsuccess=function(st){return ne({result:st.target.result})},Ge.onerror=Ls(he)):(me=0,ve=!He&&"openKeyCursor"in Qe?Qe.openKeyCursor(qe):Qe.openCursor(qe),Re=[],ve.onsuccess=function(st){var At=ve.result;return At?(Re.push(He?At.value:At.primaryKey),++me===Ze?ne({result:Re}):void At.continue()):ne({result:Re})},ve.onerror=Ls(he))})}),openCursor:function(re){var ne=re.trans,he=re.values,me=re.query,ve=re.reverse,Re=re.unique;return new Promise(function(He,Ze){He=Sn(He);var Qe=me.index,Ge=me.range,ze=ne.objectStore(oe),ze=Qe.isPrimaryKey?ze:ze.index(Qe.name),Qe=ve?Re?"prevunique":"prev":Re?"nextunique":"next",qe=!he&&"openKeyCursor"in ze?ze.openKeyCursor(D(Ge),Qe):ze.openCursor(D(Ge),Qe);qe.onerror=Ls(Ze),qe.onsuccess=Sn(function(st){var At,Vt,Bt,io,Tt=qe.result;Tt?(Tt.___id=++Ude,Tt.done=!1,At=Tt.continue.bind(Tt),Vt=(Vt=Tt.continuePrimaryKey)&&Vt.bind(Tt),Bt=Tt.advance.bind(Tt),io=function(){throw new Error("Cursor not stopped")},Tt.trans=ne,Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=function(){throw new Error("Cursor not started")},Tt.fail=Sn(Ze),Tt.next=function(){var vi=this,yi=1;return this.start(function(){return yi--?vi.continue():vi.stop()}).then(function(){return vi})},Tt.start=function(vi){function yi(){if(qe.result)try{vi()}catch(xi){Tt.fail(xi)}else Tt.done=!0,Tt.start=function(){throw new Error("Cursor behind last entry")},Tt.stop()}var Vm=new Promise(function(xi,_l){xi=Sn(xi),qe.onerror=Ls(_l),Tt.fail=_l,Tt.stop=function(p0){Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=io,xi(p0)}});return qe.onsuccess=Sn(function(xi){qe.onsuccess=yi,yi()}),Tt.continue=At,Tt.continuePrimaryKey=Vt,Tt.advance=Bt,yi(),Vm},He(Tt)):He(null)},Ze)})},count:function(re){var ne=re.query,he=re.trans,me=ne.index,ve=ne.range;return new Promise(function(Re,He){var Ze=he.objectStore(oe),Ge=me.isPrimaryKey?Ze:Ze.index(me.name),Ze=D(ve),Ge=Ze?Ge.count(Ze):Ge.count();Ge.onsuccess=Sn(function(ze){return Re(ze.target.result)}),Ge.onerror=Ls(He)})}}}var A,L,W,se=(L=Q,W=tL((A=p).objectStoreNames),{schema:{name:A.name,tables:W.map(function(le){return L.objectStore(le)}).map(function(le){var ee=le.keyPath,ne=le.autoIncrement,oe=a(ee),re={},ne={name:le.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:ee==null,compound:oe,keyPath:ee,autoIncrement:ne,unique:!0,extractKey:ZS(ee)},indexes:tL(le.indexNames).map(function(he){return le.index(he)}).map(function(Re){var me=Re.name,ve=Re.unique,He=Re.multiEntry,Re=Re.keyPath,He={name:me,compound:a(Re),keyPath:Re,unique:ve,multiEntry:He,extractKey:ZS(Re)};return re[Th(Re)]=He}),getIndexByKeyPath:function(he){return re[Th(he)]}};return re[":id"]=ne.primaryKey,ee!=null&&(re[Th(ee)]=ne.primaryKey),ne})},hasGetAll:0<W.length&&"getAll"in L.objectStore(W[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),Q=se.schema,te=se.hasGetAll,se=Q.tables.map(T),U={};return se.forEach(function(le){return U[le.name]=le}),{stack:"dbcore",transaction:p.transaction.bind(p),table:function(le){if(!U[le])throw new Error("Table '".concat(le,"' not found"));return U[le]},MIN_KEY:-1/0,MAX_KEY:Fh(v),schema:Q}}function Kde(p,v,w,D){var T=w.IDBKeyRange;return w.indexedDB,{dbcore:(D=jde(v,T,D),p.dbcore.reduce(function(A,L){return L=L.create,i(i({},A),L(A))},D))}}function _m(p,D){var w=D.db,D=Kde(p._middlewares,w,p._deps,D);p.core=D.dbcore,p.tables.forEach(function(T){var A=T.name;p.core.schema.tables.some(function(L){return L.name===A})&&(T.core=p.core.table(A),p[A]instanceof p.Table&&(p[A].core=T.core))})}function xm(p,v,w,D){w.forEach(function(T){var A=D[T];v.forEach(function(L){var W=function Q(te,se){return y(te,se)||(te=c(te))&&Q(te,se)}(L,T);(!W||"value"in W&&W.value===void 0)&&(L===p.Transaction.prototype||L instanceof p.Transaction?g(L,T,{get:function(){return this.table(T)},set:function(Q){f(this,T,{value:Q,writable:!0,configurable:!0,enumerable:!0})}}):L[T]=new p.Table(T,A))})})}function XS(p,v){v.forEach(function(w){for(var D in w)w[D]instanceof p.Table&&delete w[D]})}function qde(p,v){return p._cfg.version-v._cfg.version}function Yde(p,v,w,D){var T=p._dbSchema;w.objectStoreNames.contains("$meta")&&!T.$meta&&(T.$meta=YS("$meta",iL("")[0],[]),p._storeNames.push("$meta"));var A=p._createTransaction("readwrite",p._storeNames,T);A.create(w),A._completion.catch(D);var L=A._reject.bind(A),W=fe.transless||fe;ua(function(){return fe.trans=A,fe.transless=W,v!==0?(_m(p,w),te=v,((Q=A).storeNames.includes("$meta")?Q.table("$meta").get("version").then(function(se){return se??te}):Le.resolve(te)).then(function(se){return le=se,ee=A,oe=w,re=[],se=(U=p)._versions,ne=U._dbSchema=Tm(0,U.idbdb,oe),(se=se.filter(function(he){return he._cfg.version>=le})).length!==0?(se.forEach(function(he){re.push(function(){var me=ne,ve=he._cfg.dbschema;Pm(U,me,oe),Pm(U,ve,oe),ne=U._dbSchema=ve;var Re=JS(me,ve);Re.add.forEach(function(Qe){QS(oe,Qe[0],Qe[1].primKey,Qe[1].indexes)}),Re.change.forEach(function(Qe){if(Qe.recreate)throw new Be.Upgrade("Not yet support for changing primary key");var qe=oe.objectStore(Qe.name);Qe.add.forEach(function(st){return Fm(qe,st)}),Qe.change.forEach(function(st){qe.deleteIndex(st.name),Fm(qe,st)}),Qe.del.forEach(function(st){return qe.deleteIndex(st)})});var He=he._cfg.contentUpgrade;if(He&&he._cfg.version>le){_m(U,oe),ee._memoizedTables={};var Ze=I(ve);Re.del.forEach(function(Qe){Ze[Qe]=me[Qe]}),XS(U,[U.Transaction.prototype]),xm(U,[U.Transaction.prototype],r(Ze),Ze),ee.schema=Ze;var Ge,ze=ue(He);return ze&&iu(),Re=Le.follow(function(){var Qe;(Ge=He(ee))&&ze&&(Qe=da.bind(null,null),Ge.then(Qe,Qe))}),Ge&&typeof Ge.then=="function"?Le.resolve(Ge):Re.then(function(){return Ge})}}),re.push(function(me){var ve,Re,He=he._cfg.dbschema;ve=He,Re=me,[].slice.call(Re.db.objectStoreNames).forEach(function(Ze){return ve[Ze]==null&&Re.db.deleteObjectStore(Ze)}),XS(U,[U.Transaction.prototype]),xm(U,[U.Transaction.prototype],U._storeNames,U._dbSchema),ee.schema=U._dbSchema}),re.push(function(me){U.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(U.idbdb.version/10)===he._cfg.version?(U.idbdb.deleteObjectStore("$meta"),delete U._dbSchema.$meta,U._storeNames=U._storeNames.filter(function(ve){return ve!=="$meta"})):me.objectStore("$meta").put(he._cfg.version,"version"))})}),function he(){return re.length?Le.resolve(re.shift()(ee.idbtrans)).then(he):Le.resolve()}().then(function(){nL(ne,oe)})):Le.resolve();var U,le,ee,oe,re,ne}).catch(L)):(r(T).forEach(function(se){QS(w,se,T[se].primKey,T[se].indexes)}),_m(p,w),void Le.follow(function(){return p.on.populate.fire(A)}).catch(L));var Q,te})}function Zde(p,v){nL(p._dbSchema,v),v.db.version%10!=0||v.objectStoreNames.contains("$meta")||v.db.createObjectStore("$meta").add(Math.ceil(v.db.version/10-1),"version");var w=Tm(0,p.idbdb,v);Pm(p,p._dbSchema,v);for(var D=0,T=JS(w,p._dbSchema).change;D<T.length;D++){var A=function(L){if(L.change.length||L.recreate)return console.warn("Unable to patch indexes of table ".concat(L.name," because it has changes on the type of index or primary key.")),{value:void 0};var W=v.objectStore(L.name);L.add.forEach(function(Q){Pe&&console.debug("Dexie upgrade patch: Creating missing index ".concat(L.name,".").concat(Q.src)),Fm(W,Q)})}(T[D]);if(typeof A=="object")return A.value}}function JS(p,v){var w,D={del:[],add:[],change:[]};for(w in p)v[w]||D.del.push(w);for(w in v){var T=p[w],A=v[w];if(T){var L={name:w,def:A,recreate:!1,del:[],add:[],change:[]};if(""+(T.primKey.keyPath||"")!=""+(A.primKey.keyPath||"")||T.primKey.auto!==A.primKey.auto)L.recreate=!0,D.change.push(L);else{var W=T.idxByName,Q=A.idxByName,te=void 0;for(te in W)Q[te]||L.del.push(te);for(te in Q){var se=W[te],U=Q[te];se?se.src!==U.src&&L.change.push(U):L.add.push(U)}(0<L.del.length||0<L.add.length||0<L.change.length)&&D.change.push(L)}}else D.add.push([w,A])}return D}function QS(p,v,w,D){var T=p.db.createObjectStore(v,w.keyPath?{keyPath:w.keyPath,autoIncrement:w.auto}:{autoIncrement:w.auto});return D.forEach(function(A){return Fm(T,A)}),T}function nL(p,v){r(p).forEach(function(w){v.db.objectStoreNames.contains(w)||(Pe&&console.debug("Dexie: Creating missing table",w),QS(v,w,p[w].primKey,p[w].indexes))})}function Fm(p,v){p.createIndex(v.name,v.keyPath,{unique:v.unique,multiEntry:v.multi})}function Tm(p,v,w){var D={};return S(v.objectStoreNames,0).forEach(function(T){for(var A=w.objectStore(T),L=qS(eL(te=A.keyPath),te||"",!0,!1,!!A.autoIncrement,te&&typeof te!="string",!0),W=[],Q=0;Q<A.indexNames.length;++Q){var se=A.index(A.indexNames[Q]),te=se.keyPath,se=qS(se.name,te,!!se.unique,!!se.multiEntry,!1,te&&typeof te!="string",!1);W.push(se)}D[T]=YS(T,L,W)}),D}function Pm(p,v,w){for(var D=w.db.objectStoreNames,T=0;T<D.length;++T){var A=D[T],L=w.objectStore(A);p._hasGetAll="getAll"in L;for(var W=0;W<L.indexNames.length;++W){var Q=L.indexNames[W],te=L.index(Q).keyPath,se=typeof te=="string"?te:"["+S(te).join("+")+"]";!v[A]||(te=v[A].idxByName[se])&&(te.name=Q,delete v[A].idxByName[se],v[A].idxByName[Q]=te)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(p._hasGetAll=!1)}function iL(p){return p.split(",").map(function(v,w){var D=(v=v.trim()).replace(/([&*]|\+\+)/g,""),T=/^\[/.test(D)?D.match(/^\[(.*)\]$/)[1].split("+"):D;return qS(D,T||null,/\&/.test(v),/\*/.test(v),/\+\+/.test(v),a(T),w===0)})}var Xde=(Im.prototype._parseStoresSpec=function(p,v){r(p).forEach(function(w){if(p[w]!==null){var D=iL(p[w]),T=D.shift();if(T.unique=!0,T.multi)throw new Be.Schema("Primary key cannot be multi-valued");D.forEach(function(A){if(A.auto)throw new Be.Schema("Only primary key can be marked as autoIncrement (++)");if(!A.keyPath)throw new Be.Schema("Index must have a name and cannot be an empty string")}),v[w]=YS(w,T,D)}})},Im.prototype.stores=function(w){var v=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,w):w;var w=v._versions,D={},T={};return w.forEach(function(A){l(D,A._cfg.storesSource),T=A._cfg.dbschema={},A._parseStoresSpec(D,T)}),v._dbSchema=T,XS(v,[v._allTables,v,v.Transaction.prototype]),xm(v,[v._allTables,v,v.Transaction.prototype,this._cfg.tables],r(T),T),v._storeNames=r(T),this},Im.prototype.upgrade=function(p){return this._cfg.contentUpgrade=Ae(this._cfg.contentUpgrade||Ot,p),this},Im);function Im(){}function e0(p,v){var w=p._dbNamesDB;return w||(w=p._dbNamesDB=new Sr(bm,{addons:[],indexedDB:p,IDBKeyRange:v})).version(1).stores({dbnames:"name"}),w.table("dbnames")}function t0(p){return p&&typeof p.databases=="function"}function n0(p){return ua(function(){return fe.letThrough=!0,p()})}function i0(p){return!("from"in p)}var mi=function(p,v){if(!this){var w=new mi;return p&&"d"in p&&l(w,p),w}l(this,arguments.length?{d:1,from:p,to:1<arguments.length?v:p}:{d:0})};function Ph(p,v,w){var D=Gt(v,w);if(!isNaN(D)){if(0<D)throw RangeError();if(i0(p))return l(p,{from:v,to:w,d:1});var T=p.l,D=p.r;if(Gt(w,p.from)<0)return T?Ph(T,v,w):p.l={from:v,to:w,d:1,l:null,r:null},sL(p);if(0<Gt(v,p.to))return D?Ph(D,v,w):p.r={from:v,to:w,d:1,l:null,r:null},sL(p);Gt(v,p.from)<0&&(p.from=v,p.l=null,p.d=D?D.d+1:1),0<Gt(w,p.to)&&(p.to=w,p.r=null,p.d=p.l?p.l.d+1:1),w=!p.r,T&&!p.l&&Ih(p,T),D&&w&&Ih(p,D)}}function Ih(p,v){i0(v)||function w(D,Q){var A=Q.from,L=Q.to,W=Q.l,Q=Q.r;Ph(D,A,L),W&&w(D,W),Q&&w(D,Q)}(p,v)}function oL(p,v){var w=Am(v),D=w.next();if(D.done)return!1;for(var T=D.value,A=Am(p),L=A.next(T.from),W=L.value;!D.done&&!L.done;){if(Gt(W.from,T.to)<=0&&0<=Gt(W.to,T.from))return!0;Gt(T.from,W.from)<0?T=(D=w.next(W.from)).value:W=(L=A.next(T.from)).value}return!1}function Am(p){var v=i0(p)?null:{s:0,n:p};return{next:function(w){for(var D=0<arguments.length;v;)switch(v.s){case 0:if(v.s=1,D)for(;v.n.l&&Gt(w,v.n.from)<0;)v={up:v,n:v.n.l,s:1};else for(;v.n.l;)v={up:v,n:v.n.l,s:1};case 1:if(v.s=2,!D||Gt(w,v.n.to)<=0)return{value:v.n,done:!1};case 2:if(v.n.r){v.s=3,v={up:v,n:v.n.r,s:0};continue}case 3:v=v.up}return{done:!0}}}}function sL(p){var v,w,D=(((v=p.r)===null||v===void 0?void 0:v.d)||0)-(((w=p.l)===null||w===void 0?void 0:w.d)||0),T=1<D?"r":D<-1?"l":"";T&&(v=T=="r"?"l":"r",w=i({},p),D=p[T],p.from=D.from,p.to=D.to,p[T]=D[T],w[T]=D[v],(p[v]=w).d=rL(w)),p.d=rL(p)}function rL(w){var v=w.r,w=w.l;return(v?w?Math.max(v.d,w.d):v.d:w?w.d:0)+1}function km(p,v){return r(v).forEach(function(w){p[w]?Ih(p[w],v[w]):p[w]=function D(T){var A,L,W={};for(A in T)d(T,A)&&(L=T[A],W[A]=!L||typeof L!="object"||x.has(L.constructor)?L:D(L));return W}(v[w])}),p}function o0(p,v){return p.all||v.all||Object.keys(p).some(function(w){return v[w]&&oL(v[w],p[w])})}h(mi.prototype,((Fo={add:function(p){return Ih(this,p),this},addKey:function(p){return Ph(this,p,p),this},addKeys:function(p){var v=this;return p.forEach(function(w){return Ph(v,w,w)}),this},hasKey:function(p){var v=Am(this).next(p).value;return v&&Gt(v.from,p)<=0&&0<=Gt(v.to,p)}})[B]=function(){return Am(this)},Fo));var Rl={},s0={},r0=!1;function Om(p){km(s0,p),r0||(r0=!0,setTimeout(function(){r0=!1,a0(s0,!(s0={}))},0))}function a0(p,v){v===void 0&&(v=!1);var w=new Set;if(p.all)for(var D=0,T=Object.values(Rl);D<T.length;D++)aL(L=T[D],p,w,v);else for(var A in p){var L,W=/^idb\:\/\/(.*)\/(.*)\//.exec(A);W&&(A=W[1],W=W[2],(L=Rl["idb://".concat(A,"/").concat(W)])&&aL(L,p,w,v))}w.forEach(function(Q){return Q()})}function aL(p,v,w,D){for(var T=[],A=0,L=Object.entries(p.queries.query);A<L.length;A++){for(var W=L[A],Q=W[0],te=[],se=0,U=W[1];se<U.length;se++){var le=U[se];o0(v,le.obsSet)?le.subscribers.forEach(function(ne){return w.add(ne)}):D&&te.push(le)}D&&T.push([Q,te])}if(D)for(var ee=0,oe=T;ee<oe.length;ee++){var re=oe[ee],Q=re[0],te=re[1];p.queries.query[Q]=te}}function Jde(p){var v=p._state,w=p._deps.indexedDB;if(v.isBeingOpened||p.idbdb)return v.dbReadyPromise.then(function(){return v.dbOpenError?Nn(v.dbOpenError):p});v.isBeingOpened=!0,v.dbOpenError=null,v.openComplete=!1;var D=v.openCanceller,T=Math.round(10*p.verno),A=!1;function L(){if(v.openCanceller!==D)throw new Be.DatabaseClosed("db.open() was cancelled")}function W(){return new Le(function(le,ee){if(L(),!w)throw new Be.MissingAPI;var oe=p.name,re=v.autoSchema||!T?w.open(oe):w.open(oe,T);if(!re)throw new Be.MissingAPI;re.onerror=Ls(ee),re.onblocked=Sn(p._fireOnBlocked),re.onupgradeneeded=Sn(function(ne){var he;se=re.transaction,v.autoSchema&&!p._options.allowEmptyDB?(re.onerror=_h,se.abort(),re.result.close(),(he=w.deleteDatabase(oe)).onsuccess=he.onerror=Sn(function(){ee(new Be.NoSuchDatabase("Database ".concat(oe," doesnt exist")))})):(se.onerror=Ls(ee),ne=ne.oldVersion>Math.pow(2,62)?0:ne.oldVersion,U=ne<1,p.idbdb=re.result,A&&Zde(p,se),Yde(p,ne/10,se,ee))},ee),re.onsuccess=Sn(function(){se=null;var ne,he,me,ve,Re,He=p.idbdb=re.result,Ze=S(He.objectStoreNames);if(0<Ze.length)try{var Ge=He.transaction((ve=Ze).length===1?ve[0]:ve,"readonly");if(v.autoSchema)he=He,me=Ge,(ne=p).verno=he.version/10,me=ne._dbSchema=Tm(0,he,me),ne._storeNames=S(he.objectStoreNames,0),xm(ne,[ne._allTables],r(me),me);else if(Pm(p,p._dbSchema,Ge),((Re=JS(Tm(0,(Re=p).idbdb,Ge),Re._dbSchema)).add.length||Re.change.some(function(ze){return ze.add.length||ze.change.length}))&&!A)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),He.close(),T=He.version+1,A=!0,le(W());_m(p,Ge)}catch{}ou.push(p),He.onversionchange=Sn(function(ze){v.vcFired=!0,p.on("versionchange").fire(ze)}),He.onclose=Sn(function(ze){p.on("close").fire(ze)}),U&&(Re=p._deps,Ge=oe,He=Re.indexedDB,Re=Re.IDBKeyRange,t0(He)||Ge===bm||e0(He,Re).put({name:Ge}).catch(Ot)),le()},ee)}).catch(function(le){switch(le==null?void 0:le.name){case"UnknownError":if(0<v.PR1398_maxLoop)return v.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),W();break;case"VersionError":if(0<T)return T=0,W()}return Le.reject(le)})}var Q,te=v.dbReadyResolve,se=null,U=!1;return Le.race([D,(typeof navigator>"u"?Le.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(le){function ee(){return indexedDB.databases().finally(le)}Q=setInterval(ee,100),ee()}).finally(function(){return clearInterval(Q)}):Promise.resolve()).then(W)]).then(function(){return L(),v.onReadyBeingFired=[],Le.resolve(n0(function(){return p.on.ready.fire(p.vip)})).then(function le(){if(0<v.onReadyBeingFired.length){var ee=v.onReadyBeingFired.reduce(Ae,Ot);return v.onReadyBeingFired=[],Le.resolve(n0(function(){return ee(p.vip)})).then(le)}})}).finally(function(){v.openCanceller===D&&(v.onReadyBeingFired=null,v.isBeingOpened=!1)}).catch(function(le){v.dbOpenError=le;try{se&&se.abort()}catch{}return D===v.openCanceller&&p._close(),Nn(le)}).finally(function(){v.openComplete=!0,te()}).then(function(){var le;return U&&(le={},p.tables.forEach(function(ee){ee.schema.indexes.forEach(function(oe){oe.name&&(le["idb://".concat(p.name,"/").concat(ee.name,"/").concat(oe.name)]=new mi(-1/0,[[[]]]))}),le["idb://".concat(p.name,"/").concat(ee.name,"/")]=le["idb://".concat(p.name,"/").concat(ee.name,"/:dels")]=new mi(-1/0,[[[]]])}),pa(xh).fire(le),a0(le,!0)),p})}function l0(p){function v(A){return p.next(A)}var w=T(v),D=T(function(A){return p.throw(A)});function T(A){return function(Q){var W=A(Q),Q=W.value;return W.done?Q:Q&&typeof Q.then=="function"?Q.then(w,D):a(Q)?Promise.all(Q).then(w,D):w(Q)}}return T(v)()}function Mm(p,v,w){for(var D=a(p)?p.slice():[p],T=0;T<w;++T)D.push(v);return D}var Qde={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),D=w.schema,T={},A=[];function L(U,le,ee){var oe=Th(U),re=T[oe]=T[oe]||[],ne=U==null?0:typeof U=="string"?1:U.length,he=0<le,he=i(i({},ee),{name:he?"".concat(oe,"(virtual-from:").concat(ee.name,")"):ee.name,lowLevelIndex:ee,isVirtual:he,keyTail:le,keyLength:ne,extractKey:ZS(U),unique:!he&&ee.unique});return re.push(he),he.isPrimaryKey||A.push(he),1<ne&&L(ne===2?U[0]:U.slice(0,ne-1),le+1,ee),re.sort(function(me,ve){return me.keyTail-ve.keyTail}),he}v=L(D.primaryKey.keyPath,0,D.primaryKey),T[":id"]=[v];for(var W=0,Q=D.indexes;W<Q.length;W++){var te=Q[W];L(te.keyPath,0,te)}function se(U){var le,ee=U.query.index;return ee.isVirtual?i(i({},U),{query:{index:ee.lowLevelIndex,range:(le=U.query.range,ee=ee.keyTail,{type:le.type===1?2:le.type,lower:Mm(le.lower,le.lowerOpen?p.MAX_KEY:p.MIN_KEY,ee),lowerOpen:!0,upper:Mm(le.upper,le.upperOpen?p.MIN_KEY:p.MAX_KEY,ee),upperOpen:!0})}}):U}return i(i({},w),{schema:i(i({},D),{primaryKey:v,indexes:A,getIndexByKeyPath:function(U){return(U=T[Th(U)])&&U[0]}}),count:function(U){return w.count(se(U))},query:function(U){return w.query(se(U))},openCursor:function(U){var le=U.query.index,ee=le.keyTail,oe=le.isVirtual,re=le.keyLength;return oe?w.openCursor(se(U)).then(function(he){return he&&ne(he)}):w.openCursor(U);function ne(he){return Object.create(he,{continue:{value:function(me){me!=null?he.continue(Mm(me,U.reverse?p.MAX_KEY:p.MIN_KEY,ee)):U.unique?he.continue(he.key.slice(0,re).concat(U.reverse?p.MIN_KEY:p.MAX_KEY,ee)):he.continue()}},continuePrimaryKey:{value:function(me,ve){he.continuePrimaryKey(Mm(me,p.MAX_KEY,ee),ve)}},primaryKey:{get:function(){return he.primaryKey}},key:{get:function(){var me=he.key;return re===1?me[0]:me.slice(0,re)}},value:{get:function(){return he.value}}})}}})}})}};function c0(p,v,w,D){return w=w||{},D=D||"",r(p).forEach(function(T){var A,L,W;d(v,T)?(A=p[T],L=v[T],typeof A=="object"&&typeof L=="object"&&A&&L?(W=ie(A))!==ie(L)?w[D+T]=v[T]:W==="Object"?c0(A,L,w,D+T+"."):A!==L&&(w[D+T]=v[T]):A!==L&&(w[D+T]=v[T])):w[D+T]=void 0}),r(v).forEach(function(T){d(p,T)||(w[D+T]=v[T])}),w}function u0(p,v){return v.type==="delete"?v.keys:v.keys||v.values.map(p.extractKey)}var ehe={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),D=w.schema.primaryKey;return i(i({},w),{mutate:function(T){var A=fe.trans,L=A.table(v).hook,W=L.deleting,Q=L.creating,te=L.updating;switch(T.type){case"add":if(Q.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"put":if(Q.fire===Ot&&te.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"delete":if(W.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"deleteRange":if(W.fire===Ot)break;return A._promise("readwrite",function(){return function U(le,ee,oe){return w.query({trans:le,values:!1,query:{index:D,range:ee},limit:oe}).then(function(re){var ne=re.result;return se({type:"delete",keys:ne,trans:le}).then(function(he){return 0<he.numFailures?Promise.reject(he.failures[0]):ne.length<oe?{failures:[],numFailures:0,lastResult:void 0}:U(le,i(i({},ee),{lower:ne[ne.length-1],lowerOpen:!0}),oe)})})}(T.trans,T.range,1e4)},!0)}return w.mutate(T);function se(U){var le,ee,oe,re=fe.trans,ne=U.keys||u0(D,U);if(!ne)throw new Error("Keys missing");return(U=U.type==="add"||U.type==="put"?i(i({},U),{keys:ne}):i({},U)).type!=="delete"&&(U.values=o([],U.values)),U.keys&&(U.keys=o([],U.keys)),le=w,oe=ne,((ee=U).type==="add"?Promise.resolve([]):le.getMany({trans:ee.trans,keys:oe,cache:"immutable"})).then(function(he){var me=ne.map(function(ve,Re){var He,Ze,Ge,ze=he[Re],Qe={onerror:null,onsuccess:null};return U.type==="delete"?W.fire.call(Qe,ve,ze,re):U.type==="add"||ze===void 0?(He=Q.fire.call(Qe,ve,U.values[Re],re),ve==null&&He!=null&&(U.keys[Re]=ve=He,D.outbound||_(U.values[Re],D.keyPath,ve))):(He=c0(ze,U.values[Re]),(Ze=te.fire.call(Qe,He,ve,ze,re))&&(Ge=U.values[Re],Object.keys(Ze).forEach(function(qe){d(Ge,qe)?Ge[qe]=Ze[qe]:_(Ge,qe,Ze[qe])}))),Qe});return w.mutate(U).then(function(ve){for(var Re=ve.failures,He=ve.results,Ze=ve.numFailures,ve=ve.lastResult,Ge=0;Ge<ne.length;++Ge){var ze=(He||ne)[Ge],Qe=me[Ge];ze==null?Qe.onerror&&Qe.onerror(Re[Ge]):Qe.onsuccess&&Qe.onsuccess(U.type==="put"&&he[Ge]?U.values[Ge]:ze)}return{failures:Re,results:He,numFailures:Ze,lastResult:ve}}).catch(function(ve){return me.forEach(function(Re){return Re.onerror&&Re.onerror(ve)}),Promise.reject(ve)})})}}})}})}};function lL(p,v,w){try{if(!v||v.keys.length<p.length)return null;for(var D=[],T=0,A=0;T<v.keys.length&&A<p.length;++T)Gt(v.keys[T],p[A])===0&&(D.push(w?N(v.values[T]):v.values[T]),++A);return D.length===p.length?D:null}catch{return null}}var the={stack:"dbcore",level:-1,create:function(p){return{table:function(v){var w=p.table(v);return i(i({},w),{getMany:function(D){if(!D.cache)return w.getMany(D);var T=lL(D.keys,D.trans._cache,D.cache==="clone");return T?Le.resolve(T):w.getMany(D).then(function(A){return D.trans._cache={keys:D.keys,values:D.cache==="clone"?N(A):A},A})},mutate:function(D){return D.type!=="add"&&(D.trans._cache=null),w.mutate(D)}})}}}};function cL(p,v){return p.trans.mode==="readonly"&&!!p.subscr&&!p.trans.explicit&&p.trans.db._options.cache!=="disabled"&&!v.schema.primaryKey.outbound}function uL(p,v){switch(p){case"query":return v.values&&!v.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var nhe={stack:"dbcore",level:0,name:"Observability",create:function(p){var v=p.schema.name,w=new mi(p.MIN_KEY,p.MAX_KEY);return i(i({},p),{transaction:function(D,T,A){if(fe.subscr&&T!=="readonly")throw new Be.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(fe.querier));return p.transaction(D,T,A)},table:function(D){var T=p.table(D),A=T.schema,L=A.primaryKey,U=A.indexes,W=L.extractKey,Q=L.outbound,te=L.autoIncrement&&U.filter(function(ee){return ee.compound&&ee.keyPath.includes(L.keyPath)}),se=i(i({},T),{mutate:function(ee){function oe(qe){return qe="idb://".concat(v,"/").concat(D,"/").concat(qe),ve[qe]||(ve[qe]=new mi)}var re,ne,he,me=ee.trans,ve=ee.mutatedParts||(ee.mutatedParts={}),Re=oe(""),He=oe(":dels"),Ze=ee.type,Qe=ee.type==="deleteRange"?[ee.range]:ee.type==="delete"?[ee.keys]:ee.values.length<50?[u0(L,ee).filter(function(qe){return qe}),ee.values]:[],Ge=Qe[0],ze=Qe[1],Qe=ee.trans._cache;return a(Ge)?(Re.addKeys(Ge),(Qe=Ze==="delete"||Ge.length===ze.length?lL(Ge,Qe):null)||He.addKeys(Ge),(Qe||ze)&&(re=oe,ne=Qe,he=ze,A.indexes.forEach(function(qe){var st=re(qe.name||"");function At(Bt){return Bt!=null?qe.extractKey(Bt):null}function Vt(Bt){return qe.multiEntry&&a(Bt)?Bt.forEach(function(io){return st.addKey(io)}):st.addKey(Bt)}(ne||he).forEach(function(Bt,vi){var Tt=ne&&At(ne[vi]),vi=he&&At(he[vi]);Gt(Tt,vi)!==0&&(Tt!=null&&Vt(Tt),vi!=null&&Vt(vi))})}))):Ge?(ze={from:(ze=Ge.lower)!==null&&ze!==void 0?ze:p.MIN_KEY,to:(ze=Ge.upper)!==null&&ze!==void 0?ze:p.MAX_KEY},He.add(ze),Re.add(ze)):(Re.add(w),He.add(w),A.indexes.forEach(function(qe){return oe(qe.name).add(w)})),T.mutate(ee).then(function(qe){return!Ge||ee.type!=="add"&&ee.type!=="put"||(Re.addKeys(qe.results),te&&te.forEach(function(st){for(var At=ee.values.map(function(Tt){return st.extractKey(Tt)}),Vt=st.keyPath.findIndex(function(Tt){return Tt===L.keyPath}),Bt=0,io=qe.results.length;Bt<io;++Bt)At[Bt][Vt]=qe.results[Bt];oe(st.name).addKeys(At)})),me.mutatedParts=km(me.mutatedParts||{},ve),qe})}}),U=function(oe){var re=oe.query,oe=re.index,re=re.range;return[oe,new mi((oe=re.lower)!==null&&oe!==void 0?oe:p.MIN_KEY,(re=re.upper)!==null&&re!==void 0?re:p.MAX_KEY)]},le={get:function(ee){return[L,new mi(ee.key)]},getMany:function(ee){return[L,new mi().addKeys(ee.keys)]},count:U,query:U,openCursor:U};return r(le).forEach(function(ee){se[ee]=function(oe){var re=fe.subscr,ne=!!re,he=cL(fe,T)&&uL(ee,oe)?oe.obsSet={}:re;if(ne){var me=function(ze){return ze="idb://".concat(v,"/").concat(D,"/").concat(ze),he[ze]||(he[ze]=new mi)},ve=me(""),Re=me(":dels"),re=le[ee](oe),ne=re[0],re=re[1];if((ee==="query"&&ne.isPrimaryKey&&!oe.values?Re:me(ne.name||"")).add(re),!ne.isPrimaryKey){if(ee!=="count"){var He=ee==="query"&&Q&&oe.values&&T.query(i(i({},oe),{values:!1}));return T[ee].apply(this,arguments).then(function(ze){if(ee==="query"){if(Q&&oe.values)return He.then(function(At){return At=At.result,ve.addKeys(At),ze});var Qe=oe.values?ze.result.map(W):ze.result;(oe.values?ve:Re).addKeys(Qe)}else if(ee==="openCursor"){var qe=ze,st=oe.values;return qe&&Object.create(qe,{key:{get:function(){return Re.addKey(qe.primaryKey),qe.key}},primaryKey:{get:function(){var At=qe.primaryKey;return Re.addKey(At),At}},value:{get:function(){return st&&ve.addKey(qe.primaryKey),qe.value}}})}return ze})}Re.add(w)}}return T[ee].apply(this,arguments)}}),se}})}};function dL(p,v,w){if(w.numFailures===0)return v;if(v.type==="deleteRange")return null;var D=v.keys?v.keys.length:"values"in v&&v.values?v.values.length:1;return w.numFailures===D?null:(v=i({},v),a(v.keys)&&(v.keys=v.keys.filter(function(T,A){return!(A in w.failures)})),"values"in v&&a(v.values)&&(v.values=v.values.filter(function(T,A){return!(A in w.failures)})),v)}function d0(p,v){return w=p,((D=v).lower===void 0||(D.lowerOpen?0<Gt(w,D.lower):0<=Gt(w,D.lower)))&&(p=p,(v=v).upper===void 0||(v.upperOpen?Gt(p,v.upper)<0:Gt(p,v.upper)<=0));var w,D}function hL(p,v,le,D,T,A){if(!le||le.length===0)return p;var L=v.query.index,W=L.multiEntry,Q=v.query.range,te=D.schema.primaryKey.extractKey,se=L.extractKey,U=(L.lowLevelIndex||L).extractKey,le=le.reduce(function(ee,oe){var re=ee,ne=[];if(oe.type==="add"||oe.type==="put")for(var he=new mi,me=oe.values.length-1;0<=me;--me){var ve,Re=oe.values[me],He=te(Re);he.hasKey(He)||(ve=se(Re),(W&&a(ve)?ve.some(function(qe){return d0(qe,Q)}):d0(ve,Q))&&(he.addKey(He),ne.push(Re)))}switch(oe.type){case"add":var Ze=new mi().addKeys(v.values?ee.map(function(st){return te(st)}):ee),re=ee.concat(v.values?ne.filter(function(st){return st=te(st),!Ze.hasKey(st)&&(Ze.addKey(st),!0)}):ne.map(function(st){return te(st)}).filter(function(st){return!Ze.hasKey(st)&&(Ze.addKey(st),!0)}));break;case"put":var Ge=new mi().addKeys(oe.values.map(function(st){return te(st)}));re=ee.filter(function(st){return!Ge.hasKey(v.values?te(st):st)}).concat(v.values?ne:ne.map(function(st){return te(st)}));break;case"delete":var ze=new mi().addKeys(oe.keys);re=ee.filter(function(st){return!ze.hasKey(v.values?te(st):st)});break;case"deleteRange":var Qe=oe.range;re=ee.filter(function(st){return!d0(te(st),Qe)})}return re},p);return le===p?p:(le.sort(function(ee,oe){return Gt(U(ee),U(oe))||Gt(te(ee),te(oe))}),v.limit&&v.limit<1/0&&(le.length>v.limit?le.length=v.limit:p.length===v.limit&&le.length<v.limit&&(T.dirty=!0)),A?Object.freeze(le):le)}function fL(p,v){return Gt(p.lower,v.lower)===0&&Gt(p.upper,v.upper)===0&&!!p.lowerOpen==!!v.lowerOpen&&!!p.upperOpen==!!v.upperOpen}function ihe(p,v){return function(w,D,T,A){if(w===void 0)return D!==void 0?-1:0;if(D===void 0)return 1;if((D=Gt(w,D))===0){if(T&&A)return 0;if(T)return 1;if(A)return-1}return D}(p.lower,v.lower,p.lowerOpen,v.lowerOpen)<=0&&0<=function(w,D,T,A){if(w===void 0)return D!==void 0?1:0;if(D===void 0)return-1;if((D=Gt(w,D))===0){if(T&&A)return 0;if(T)return-1;if(A)return 1}return D}(p.upper,v.upper,p.upperOpen,v.upperOpen)}function ohe(p,v,w,D){p.subscribers.add(w),D.addEventListener("abort",function(){var T,A;p.subscribers.delete(w),p.subscribers.size===0&&(T=p,A=v,setTimeout(function(){T.subscribers.size===0&&X(A,T)},3e3))})}var she={stack:"dbcore",level:0,name:"Cache",create:function(p){var v=p.schema.name;return i(i({},p),{transaction:function(w,D,T){var A,L,W=p.transaction(w,D,T);return D==="readwrite"&&(L=(A=new AbortController).signal,T=function(Q){return function(){if(A.abort(),D==="readwrite"){for(var te=new Set,se=0,U=w;se<U.length;se++){var le=U[se],ee=Rl["idb://".concat(v,"/").concat(le)];if(ee){var oe=p.table(le),re=ee.optimisticOps.filter(function(st){return st.trans===W});if(W._explicit&&Q&&W.mutatedParts)for(var ne=0,he=Object.values(ee.queries.query);ne<he.length;ne++)for(var me=0,ve=(Ze=he[ne]).slice();me<ve.length;me++)o0((Ge=ve[me]).obsSet,W.mutatedParts)&&(X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)}));else if(0<re.length){ee.optimisticOps=ee.optimisticOps.filter(function(st){return st.trans!==W});for(var Re=0,He=Object.values(ee.queries.query);Re<He.length;Re++)for(var Ze,Ge,ze,Qe=0,qe=(Ze=He[Re]).slice();Qe<qe.length;Qe++)(Ge=qe[Qe]).res!=null&&W.mutatedParts&&(Q&&!Ge.dirty?(ze=Object.isFrozen(Ge.res),ze=hL(Ge.res,Ge.req,re,oe,Ge,ze),Ge.dirty?(X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)})):ze!==Ge.res&&(Ge.res=ze,Ge.promise=Le.resolve({result:ze}))):(Ge.dirty&&X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)})))}}}te.forEach(function(st){return st()})}}},W.addEventListener("abort",T(!1),{signal:L}),W.addEventListener("error",T(!1),{signal:L}),W.addEventListener("complete",T(!0),{signal:L})),W},table:function(w){var D=p.table(w),T=D.schema.primaryKey;return i(i({},D),{mutate:function(A){var L=fe.trans;if(T.outbound||L.db._options.cache==="disabled"||L.explicit||L.idbtrans.mode!=="readwrite")return D.mutate(A);var W=Rl["idb://".concat(v,"/").concat(w)];return W?(L=D.mutate(A),A.type!=="add"&&A.type!=="put"||!(50<=A.values.length||u0(T,A).some(function(Q){return Q==null}))?(W.optimisticOps.push(A),A.mutatedParts&&Om(A.mutatedParts),L.then(function(Q){0<Q.numFailures&&(X(W.optimisticOps,A),(Q=dL(0,A,Q))&&W.optimisticOps.push(Q),A.mutatedParts&&Om(A.mutatedParts))}),L.catch(function(){X(W.optimisticOps,A),A.mutatedParts&&Om(A.mutatedParts)})):L.then(function(Q){var te=dL(0,i(i({},A),{values:A.values.map(function(se,U){var le;return Q.failures[U]?se:(se=(le=T.keyPath)!==null&&le!==void 0&&le.includes(".")?N(se):i({},se),_(se,T.keyPath,Q.results[U]),se)})}),Q);W.optimisticOps.push(te),queueMicrotask(function(){return A.mutatedParts&&Om(A.mutatedParts)})}),L):D.mutate(A)},query:function(A){if(!cL(fe,D)||!uL("query",A))return D.query(A);var L=((te=fe.trans)===null||te===void 0?void 0:te.db._options.cache)==="immutable",U=fe,W=U.requery,Q=U.signal,te=function(oe,re,ne,he){var me=Rl["idb://".concat(oe,"/").concat(re)];if(!me)return[];if(!(re=me.queries[ne]))return[null,!1,me,null];var ve=re[(he.query?he.query.index.name:null)||""];if(!ve)return[null,!1,me,null];switch(ne){case"query":var Re=ve.find(function(He){return He.req.limit===he.limit&&He.req.values===he.values&&fL(He.req.query.range,he.query.range)});return Re?[Re,!0,me,ve]:[ve.find(function(He){return("limit"in He.req?He.req.limit:1/0)>=he.limit&&(!he.values||He.req.values)&&ihe(He.req.query.range,he.query.range)}),!1,me,ve];case"count":return Re=ve.find(function(He){return fL(He.req.query.range,he.query.range)}),[Re,!!Re,me,ve]}}(v,w,"query",A),se=te[0],U=te[1],le=te[2],ee=te[3];return se&&U?se.obsSet=A.obsSet:(U=D.query(A).then(function(oe){var re=oe.result;if(se&&(se.res=re),L){for(var ne=0,he=re.length;ne<he;++ne)Object.freeze(re[ne]);Object.freeze(re)}else oe.result=N(re);return oe}).catch(function(oe){return ee&&se&&X(ee,se),Promise.reject(oe)}),se={obsSet:A.obsSet,promise:U,subscribers:new Set,type:"query",req:A,dirty:!1},ee?ee.push(se):(ee=[se],(le=le||(Rl["idb://".concat(v,"/").concat(w)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[A.query.index.name||""]=ee)),ohe(se,ee,W,Q),se.promise.then(function(oe){return{result:hL(oe.result,A,le==null?void 0:le.optimisticOps,D,se,L)}})}})}})}};function Lm(p,v){return new Proxy(p,{get:function(w,D,T){return D==="db"?v:Reflect.get(w,D,T)}})}var Sr=(Vn.prototype.version=function(p){if(isNaN(p)||p<.1)throw new Be.Type("Given version is not a positive number");if(p=Math.round(10*p)/10,this.idbdb||this._state.isBeingOpened)throw new Be.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,p);var v=this._versions,w=v.filter(function(D){return D._cfg.version===p})[0];return w||(w=new this.Version(p),v.push(w),v.sort(qde),w.stores({}),this._state.autoSchema=!1,w)},Vn.prototype._whenReady=function(p){var v=this;return this.idbdb&&(this._state.openComplete||fe.letThrough||this._vip)?p():new Le(function(w,D){if(v._state.openComplete)return D(new Be.DatabaseClosed(v._state.dbOpenError));if(!v._state.isBeingOpened){if(!v._state.autoOpen)return void D(new Be.DatabaseClosed);v.open().catch(Ot)}v._state.dbReadyPromise.then(w,D)}).then(p)},Vn.prototype.use=function(p){var v=p.stack,w=p.create,D=p.level,T=p.name;return T&&this.unuse({stack:v,name:T}),p=this._middlewares[v]||(this._middlewares[v]=[]),p.push({stack:v,create:w,level:D??10,name:T}),p.sort(function(A,L){return A.level-L.level}),this},Vn.prototype.unuse=function(p){var v=p.stack,w=p.name,D=p.create;return v&&this._middlewares[v]&&(this._middlewares[v]=this._middlewares[v].filter(function(T){return D?T.create!==D:!!w&&T.name!==w})),this},Vn.prototype.open=function(){var p=this;return bl(q,function(){return Jde(p)})},Vn.prototype._close=function(){var p=this._state,v=ou.indexOf(this);if(0<=v&&ou.splice(v,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}p.isBeingOpened||(p.dbReadyPromise=new Le(function(w){p.dbReadyResolve=w}),p.openCanceller=new Le(function(w,D){p.cancelOpen=D}))},Vn.prototype.close=function(w){var v=(w===void 0?{disableAutoOpen:!0}:w).disableAutoOpen,w=this._state;v?(w.isBeingOpened&&w.cancelOpen(new Be.DatabaseClosed),this._close(),w.autoOpen=!1,w.dbOpenError=new Be.DatabaseClosed):(this._close(),w.autoOpen=this._options.autoOpen||w.isBeingOpened,w.openComplete=!1,w.dbOpenError=null)},Vn.prototype.delete=function(p){var v=this;p===void 0&&(p={disableAutoOpen:!0});var w=0<arguments.length&&typeof arguments[0]!="object",D=this._state;return new Le(function(T,A){function L(){v.close(p);var W=v._deps.indexedDB.deleteDatabase(v.name);W.onsuccess=Sn(function(){var Q,te,se;Q=v._deps,te=v.name,se=Q.indexedDB,Q=Q.IDBKeyRange,t0(se)||te===bm||e0(se,Q).delete(te).catch(Ot),T()}),W.onerror=Ls(A),W.onblocked=v._fireOnBlocked}if(w)throw new Be.InvalidArgument("Invalid closeOptions argument to db.delete()");D.isBeingOpened?D.dbReadyPromise.then(L):L()})},Vn.prototype.backendDB=function(){return this.idbdb},Vn.prototype.isOpen=function(){return this.idbdb!==null},Vn.prototype.hasBeenClosed=function(){var p=this._state.dbOpenError;return p&&p.name==="DatabaseClosed"},Vn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Vn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Vn.prototype,"tables",{get:function(){var p=this;return r(this._allTables).map(function(v){return p._allTables[v]})},enumerable:!1,configurable:!0}),Vn.prototype.transaction=function(){var p=(function(v,w,D){var T=arguments.length;if(T<2)throw new Be.InvalidArgument("Too few arguments");for(var A=new Array(T-1);--T;)A[T-1]=arguments[T];return D=A.pop(),[v,k(A),D]}).apply(this,arguments);return this._transaction.apply(this,p)},Vn.prototype._transaction=function(p,v,w){var D=this,T=fe.trans;T&&T.db===this&&p.indexOf("!")===-1||(T=null);var A,L,W=p.indexOf("?")!==-1;p=p.replace("!","").replace("?","");try{if(L=v.map(function(te){if(te=te instanceof D.Table?te.name:te,typeof te!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return te}),p=="r"||p===$S)A=$S;else{if(p!="rw"&&p!=WS)throw new Be.InvalidArgument("Invalid transaction mode: "+p);A=WS}if(T){if(T.mode===$S&&A===WS){if(!W)throw new Be.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");T=null}T&&L.forEach(function(te){if(T&&T.storeNames.indexOf(te)===-1){if(!W)throw new Be.SubTransaction("Table "+te+" not included in parent transaction.");T=null}}),W&&T&&!T.active&&(T=null)}}catch(te){return T?T._promise(null,function(se,U){U(te)}):Nn(te)}var Q=(function te(se,U,le,ee,oe){return Le.resolve().then(function(){var re=fe.transless||fe,ne=se._createTransaction(U,le,se._dbSchema,ee);if(ne.explicit=!0,re={trans:ne,transless:re},ee)ne.idbtrans=ee.idbtrans;else try{ne.create(),ne.idbtrans._explicit=!0,se._state.PR1398_maxLoop=3}catch(ve){return ve.name===ft.InvalidState&&se.isOpen()&&0<--se._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),se.close({disableAutoOpen:!1}),se.open().then(function(){return te(se,U,le,null,oe)})):Nn(ve)}var he,me=ue(oe);return me&&iu(),re=Le.follow(function(){var ve;(he=oe.call(ne,ne))&&(me?(ve=da.bind(null,null),he.then(ve,ve)):typeof he.next=="function"&&typeof he.throw=="function"&&(he=l0(he)))},re),(he&&typeof he.then=="function"?Le.resolve(he).then(function(ve){return ne.active?ve:Nn(new Be.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):re.then(function(){return he})).then(function(ve){return ee&&ne._resolve(),ne._completion.then(function(){return ve})}).catch(function(ve){return ne._reject(ve),Nn(ve)})})}).bind(null,this,A,L,T,w);return T?T._promise(A,Q,"lock"):fe.trans?bl(fe.transless,function(){return D._whenReady(Q)}):this._whenReady(Q)},Vn.prototype.table=function(p){if(!d(this._allTables,p))throw new Be.InvalidTable("Table ".concat(p," does not exist"));return this._allTables[p]},Vn);function Vn(p,v){var w=this;this._middlewares={},this.verno=0;var D=Vn.dependencies;this._options=v=i({addons:Vn.addons,autoOpen:!0,indexedDB:D.indexedDB,IDBKeyRange:D.IDBKeyRange,cache:"cloned"},v),this._deps={indexedDB:v.indexedDB,IDBKeyRange:v.IDBKeyRange},D=v.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var T,A,L,W,Q,te={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ot,dbReadyPromise:null,cancelOpen:Ot,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:v.autoOpen};te.dbReadyPromise=new Le(function(U){te.dbReadyResolve=U}),te.openCanceller=new Le(function(U,le){te.cancelOpen=le}),this._state=te,this.name=p,this.on=Eh(this,"populate","blocked","versionchange","close",{ready:[Ae,Ot]}),this.on.ready.subscribe=F(this.on.ready.subscribe,function(U){return function(le,ee){Vn.vip(function(){var oe,re=w._state;re.openComplete?(re.dbOpenError||Le.resolve().then(le),ee&&U(le)):re.onReadyBeingFired?(re.onReadyBeingFired.push(le),ee&&U(le)):(U(le),oe=w,ee||U(function ne(){oe.on.ready.unsubscribe(le),oe.on.ready.unsubscribe(ne)}))})}}),this.Collection=(T=this,Rh(Gde.prototype,function(he,ne){this.db=T;var ee=zM,oe=null;if(ne)try{ee=ne()}catch(me){oe=me}var re=he._ctx,ne=re.table,he=ne.hook.reading.fire;this._ctx={table:ne,index:re.index,isPrimKey:!re.index||ne.schema.primKey.keyPath&&re.index===ne.schema.primKey.name,range:ee,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:oe,or:re.or,valueMapper:he!==V?he:null}})),this.Table=(A=this,Rh(qM.prototype,function(U,le,ee){this.db=A,this._tx=ee,this.name=U,this.schema=le,this.hook=A._allTables[U]?A._allTables[U].hook:Eh(null,{creating:[Te,Ot],reading:[Y,V],updating:[_e,Ot],deleting:[Ee,Ot]})})),this.Transaction=(L=this,Rh(zde.prototype,function(U,le,ee,oe,re){var ne=this;this.db=L,this.mode=U,this.storeNames=le,this.schema=ee,this.chromeTransactionDurability=oe,this.idbtrans=null,this.on=Eh(this,"complete","error","abort"),this.parent=re||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Le(function(he,me){ne._resolve=he,ne._reject=me}),this._completion.then(function(){ne.active=!1,ne.on.complete.fire()},function(he){var me=ne.active;return ne.active=!1,ne.on.error.fire(he),ne.parent?ne.parent._reject(he):me&&ne.idbtrans&&ne.idbtrans.abort(),Nn(he)})})),this.Version=(W=this,Rh(Xde.prototype,function(U){this.db=W,this._cfg={version:U,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(Q=this,Rh(QM.prototype,function(U,le,ee){if(this.db=Q,this._ctx={table:U,index:le===":id"?null:le,or:ee},this._cmp=this._ascending=Gt,this._descending=function(oe,re){return Gt(re,oe)},this._max=function(oe,re){return 0<Gt(oe,re)?oe:re},this._min=function(oe,re){return Gt(oe,re)<0?oe:re},this._IDBKeyRange=Q._deps.IDBKeyRange,!this._IDBKeyRange)throw new Be.MissingAPI})),this.on("versionchange",function(U){0<U.newVersion?console.warn("Another connection wants to upgrade database '".concat(w.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(w.name,"'. Closing db now to resume the delete request.")),w.close({disableAutoOpen:!1})}),this.on("blocked",function(U){!U.newVersion||U.newVersion<U.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(U.oldVersion/10))}),this._maxKey=Fh(v.IDBKeyRange),this._createTransaction=function(U,le,ee,oe){return new w.Transaction(U,le,ee,w._options.chromeTransactionDurability,oe)},this._fireOnBlocked=function(U){w.on("blocked").fire(U),ou.filter(function(le){return le.name===w.name&&le!==w&&!le._state.vcFired}).map(function(le){return le.on("versionchange").fire(U)})},this.use(the),this.use(she),this.use(nhe),this.use(Qde),this.use(ehe);var se=new Proxy(this,{get:function(U,le,ee){if(le==="_vip")return!0;if(le==="table")return function(re){return Lm(w.table(re),se)};var oe=Reflect.get(U,le,ee);return oe instanceof qM?Lm(oe,se):le==="tables"?oe.map(function(re){return Lm(re,se)}):le==="_createTransaction"?function(){return Lm(oe.apply(this,arguments),se)}:oe}});this.vip=se,D.forEach(function(U){return U(w)})}var Nm,Fo=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",rhe=(h0.prototype.subscribe=function(p,v,w){return this._subscribe(p&&typeof p!="function"?p:{next:p,error:v,complete:w})},h0.prototype[Fo]=function(){return this},h0);function h0(p){this._subscribe=p}try{Nm={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Nm={indexedDB:null,IDBKeyRange:null}}function pL(p){var v,w=!1,D=new rhe(function(T){var A=ue(p),L,W=!1,Q={},te={},se={get closed(){return W},unsubscribe:function(){W||(W=!0,L&&L.abort(),U&&pa.storagemutated.unsubscribe(ee))}};T.start&&T.start(se);var U=!1,le=function(){return GS(oe)},ee=function(re){km(Q,re),o0(te,Q)&&le()},oe=function(){var re,ne,he;!W&&Nm.indexedDB&&(Q={},re={},L&&L.abort(),L=new AbortController,he=function(me){var ve=la();try{A&&iu();var Re=ua(p,me);return Re=A?Re.finally(da):Re}finally{ve&&Ms()}}(ne={subscr:re,signal:L.signal,requery:le,querier:p,trans:null}),Promise.resolve(he).then(function(me){w=!0,v=me,W||ne.signal.aborted||(Q={},function(ve){for(var Re in ve)if(d(ve,Re))return;return 1}(te=re)||U||(pa(xh,ee),U=!0),GS(function(){return!W&&T.next&&T.next(me)}))},function(me){w=!1,["DatabaseClosedError","AbortError"].includes(me==null?void 0:me.name)||W||GS(function(){W||T.error&&T.error(me)})}))};return setTimeout(le,0),se});return D.hasValue=function(){return w},D.getValue=function(){return v},D}var Dl=Sr;function f0(p){var v=ga;try{ga=!0,pa.storagemutated.fire(p),a0(p,!0)}finally{ga=v}}h(Dl,i(i({},nn),{delete:function(p){return new Dl(p,{addons:[]}).delete()},exists:function(p){return new Dl(p,{addons:[]}).open().then(function(v){return v.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(p){try{return v=Dl.dependencies,w=v.indexedDB,v=v.IDBKeyRange,(t0(w)?Promise.resolve(w.databases()).then(function(D){return D.map(function(T){return T.name}).filter(function(T){return T!==bm})}):e0(w,v).toCollection().primaryKeys()).then(p)}catch{return Nn(new Be.MissingAPI)}var v,w},defineClass:function(){return function(p){l(this,p)}},ignoreTransaction:function(p){return fe.trans?bl(fe.transless,p):p()},vip:n0,async:function(p){return function(){try{var v=l0(p.apply(this,arguments));return v&&typeof v.then=="function"?v:Le.resolve(v)}catch(w){return Nn(w)}}},spawn:function(p,v,w){try{var D=l0(p.apply(w,v||[]));return D&&typeof D.then=="function"?D:Le.resolve(D)}catch(T){return Nn(T)}},currentTransaction:{get:function(){return fe.trans||null}},waitFor:function(p,v){return v=Le.resolve(typeof p=="function"?Dl.ignoreTransaction(p):p).timeout(v||6e4),fe.trans?fe.trans.waitFor(v):v},Promise:Le,debug:{get:function(){return Pe},set:function(p){xe(p)}},derive:m,extend:l,props:h,override:F,Events:Eh,on:pa,liveQuery:pL,extendObservabilitySet:km,getByKeyPath:E,setByKeyPath:_,delByKeyPath:function(p,v){typeof v=="string"?_(p,v,void 0):"length"in v&&[].map.call(v,function(w){_(p,w,void 0)})},shallowClone:I,deepClone:N,getObjectDiff:c0,cmp:Gt,asap:R,minKey:-1/0,addons:[],connections:ou,errnames:ft,dependencies:Nm,cache:Rl,semVer:"4.0.10",version:"4.0.10".split(".").map(function(p){return parseInt(p)}).reduce(function(p,v,w){return p+v/Math.pow(10,2*w)})})),Dl.maxKey=Fh(Dl.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(pa(xh,function(p){ga||(p=new CustomEvent(KS,{detail:p}),ga=!0,dispatchEvent(p),ga=!1)}),addEventListener(KS,function(p){p=p.detail,ga||f0(p)}));var au,ga=!1,gL=function(){};return typeof BroadcastChannel<"u"&&((gL=function(){(au=new BroadcastChannel(KS)).onmessage=function(p){return p.data&&f0(p.data)}})(),typeof au.unref=="function"&&au.unref(),pa(xh,function(p){ga||au.postMessage(p)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(p){if(!Sr.disableBfCache&&p.persisted){Pe&&console.debug("Dexie: handling persisted pagehide"),au!=null&&au.close();for(var v=0,w=ou;v<w.length;v++)w[v].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(p){!Sr.disableBfCache&&p.persisted&&(Pe&&console.debug("Dexie: handling persisted pageshow"),gL(),f0({all:new mi(-1/0,[[]])}))})),Le.rejectionMapper=function(p,v){return!p||p instanceof ae||p instanceof TypeError||p instanceof SyntaxError||!p.name||!jt[p.name]?p:(v=new jt[p.name](v||p.message,p),"stack"in p&&g(v,"stack",{get:function(){return this.inner.stack}}),v)},xe(Pe),i(Sr,Object.freeze({__proto__:null,Dexie:Sr,liveQuery:pL,Entity:UM,cmp:Gt,PropModSymbol:br,PropModification:Dh,replacePrefix:function(p,v){return new Dh({replacePrefix:[p,v]})},add:function(p){return new Dh({add:p})},remove:function(p){return new Dh({remove:p})},default:Sr,RangeSet:mi,mergeRanges:Ih,rangesOverlap:oL}),{default:Sr}),Sr})})(zD);var WH=zD.exports;const uy=$H(WH),UD=Symbol.for("Dexie"),zu=globalThis[UD]||(globalThis[UD]=uy);if(uy.semVer!==zu.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${uy.semVer} and ${zu.semVer}`);const{liveQuery:ghe,mergeRanges:mhe,rangesOverlap:vhe,RangeSet:yhe,cmp:Che,Entity:whe,PropModSymbol:bhe,PropModification:She,replacePrefix:Ehe,add:Rhe,remove:Dhe}=zu;class jD extends zu{constructor(n){super(n);_n(this,"icons");_n(this,"visuals");_n(this,"users");_n(this,"columns");_n(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Lf=new Map,zH=async e=>{if(!Lf.has(e)){const t=new jD(e);try{await t.open(),Lf.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await zu.delete(e);const i=new jD(e);await i.open(),Lf.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Lf.get(e)},Uu=({dbName:e,storeName:t})=>{const n=async()=>(await zH(e)).getTable(t);return{getCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}const d=await u.get(c);return d==null?void 0:d.value}catch(u){console.error("Failed to get cached value:",u);return}},setCachedValue:async(c,u)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${c}`);return}await d.put({key:c,value:u,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined, cannot delete key: ${c}`);return}await u.delete(c)}catch(u){console.error("Failed to delete cached value:",u)}},clearCache:async()=>{try{const c=await n();if(!c){console.error("Store is undefined, cannot clear cache");return}await c.clear()}catch(c){console.error("Failed to clear cache:",c)}},getAllKeys:async()=>{try{const c=await n();return c?(await c.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(c){return console.error("Failed to get all keys:",c),[]}},getCachedValueWithTimestamp:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}return await u.get(c)}catch(u){console.error("Failed to get cached value with timestamp:",u);return}}}},UH="AvatarCache",jH="images",KH=()=>{const{getCachedValue:e,setCachedValue:t}=Uu({dbName:UH,storeName:jH}),n=async s=>{const r=await e(s);return!r||!(r instanceof Blob)?null:URL.createObjectURL(r)},i=s=>new Promise((r,a)=>{new GH(s,{width:96,height:96,quality:1,success(l){r(l)},error(l){console.error(l.message),a(l)}})});return{getCachedImage:n,setCachedImage:async(s,r)=>{const a=await i(r);await t(s,a)}}},ju=new Map,hs=new Map,Yl=new Map,qH=5*60*1e3,KD=100;function YH(){const e=Date.now(),t=[];Yl.forEach((n,i)=>{e-n>qH&&t.push(i)}),t.forEach(n=>{ju.delete(n),Yl.delete(n),hs.delete(n)})}function ZH(){if(Yl.size<=KD)return;const e=Array.from(Yl.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-KD).forEach(([n])=>{ju.delete(n),Yl.delete(n),hs.delete(n)})}const XH=(e,t)=>{const n=hs.get(e);return n==null||n.forEach(i=>i(t)),hs.delete(e),t};async function JH({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const o=await n.getCachedImage(e),s=ju.has(e),r=hs.has(e);if(o)return XH(e,o);if(YH(),s)return new Promise(c=>{r||hs.set(e,[]),hs.get(e).push(c)});const a=(async()=>{let c=null,u=null;try{const d=Math.random()*300;await new Promise(f=>setTimeout(f,d)),i==null||i(!0);const h=await fetch(t,{cache:"no-cache"});if(!h.ok)throw new Error("Failed to fetch image");return c=await h.blob(),await n.setCachedImage(e,c),u=URL.createObjectURL(c),u}catch(d){throw console.error("Error loading avatar image:",d),d}finally{c=null,i==null||i(!1),Yl.set(e,Date.now()),setTimeout(()=>{ju.delete(e),ZH()},100)}})();ju.set(e,a);const l=await a;return hs.has(e)&&(hs.get(e).forEach(u=>u(l)),hs.delete(e)),l}const QH=(e,t=3,n=1e3)=>{const i=Z(0),o=Z(!1),s=Z(!1),r=async()=>{try{await e()}catch(a){if(i.value<t)return i.value++,s.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:i,errorRetry:o,isRetrying:s}};function ti(e,t){eG(e)&&(e="100%");const n=tG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Nf(e){return Math.min(1,Math.max(0,e))}function eG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function tG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vf(e){return Number(e)<=1?`${Number(e)*100}%`:e}function La(e){return e.length===1?"0"+e:String(e)}function nG(e,t,n){return{r:ti(e,255)*255,g:ti(t,255)*255,b:ti(n,255)*255}}function YD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0,r=0;const a=(i+o)/2;if(i===o)r=0,s=0;else{const l=i-o;switch(r=a>.5?l/(2-i-o):l/(i+o),i){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:r,l:a}}function dy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iG(e,t,n){let i,o,s;if(e=ti(e,360),t=ti(t,100),n=ti(n,100),t===0)o=n,s=n,i=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=dy(a,r,e+1/3),o=dy(a,r,e),s=dy(a,r,e-1/3)}return{r:i*255,g:o*255,b:s*255}}function ZD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0;const r=i,a=i-o,l=i===0?0:a/i;if(i===o)s=0;else{switch(i){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4;break}s/=6}return{h:s,s:l,v:r}}function oG(e,t,n){e=ti(e,360)*6,t=ti(t,100),n=ti(n,100);const i=Math.floor(e),o=e-i,s=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=i%6,c=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function XD(e,t,n,i){const o=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function sG(e,t,n,i,o){const s=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16)),La(aG(i))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function rG(e,t,n,i){const o=e/100,s=t/100,r=n/100,a=i/100,l=255*(1-o)*(1-a),c=255*(1-s)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function JD(e,t,n){let i=1-e/255,o=1-t/255,s=1-n/255,r=Math.min(i,o,s);return r===1?(i=0,o=0,s=0):(i=(i-r)/(1-r)*100,o=(o-r)/(1-r)*100,s=(s-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(o),y:Math.round(s),k:Math.round(r)}}function aG(e){return Math.round(parseFloat(e)*255).toString(16)}function QD(e){return Ui(e)/255}function Ui(e){return parseInt(e,16)}function lG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const hy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function cG(e){let t={r:0,g:0,b:0},n=1,i=null,o=null,s=null,r=!1,a=!1;return typeof e=="string"&&(e=uG(e)),typeof e=="object"&&(ji(e.r)&&ji(e.g)&&ji(e.b)?(t=nG(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ji(e.h)&&ji(e.s)&&ji(e.v)?(i=Vf(e.s),o=Vf(e.v),t=oG(e.h,i,o),r=!0,a="hsv"):ji(e.h)&&ji(e.s)&&ji(e.l)?(i=Vf(e.s),s=Vf(e.l),t=iG(e.h,i,s),r=!0,a="hsl"):ji(e.c)&&ji(e.m)&&ji(e.y)&&ji(e.k)&&(t=rG(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=qD(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const Or="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",fy="[\\s|\\(]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")\\s*\\)?",Bf="[\\s|\\(]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")\\s*\\)?",co={CSS_UNIT:new RegExp(Or),rgb:new RegExp("rgb"+fy),rgba:new RegExp("rgba"+Bf),hsl:new RegExp("hsl"+fy),hsla:new RegExp("hsla"+Bf),hsv:new RegExp("hsv"+fy),hsva:new RegExp("hsva"+Bf),cmyk:new RegExp("cmyk"+Bf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function uG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(hy[e])e=hy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=co.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=co.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=co.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=co.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=co.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=co.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=co.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=co.hex8.exec(e),n?{r:Ui(n[1]),g:Ui(n[2]),b:Ui(n[3]),a:QD(n[4]),format:t?"name":"hex8"}:(n=co.hex6.exec(e),n?{r:Ui(n[1]),g:Ui(n[2]),b:Ui(n[3]),format:t?"name":"hex"}:(n=co.hex4.exec(e),n?{r:Ui(n[1]+n[1]),g:Ui(n[2]+n[2]),b:Ui(n[3]+n[3]),a:QD(n[4]+n[4]),format:t?"name":"hex8"}:(n=co.hex3.exec(e),n?{r:Ui(n[1]+n[1]),g:Ui(n[2]+n[2]),b:Ui(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function ji(e){return typeof e=="number"?!Number.isNaN(e):co.CSS_UNIT.test(e)}class En{constructor(t="",n={}){if(t instanceof En)return t;typeof t=="number"&&(t=lG(t)),this.originalInput=t;const i=cG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,i,o;const s=t.r/255,r=t.g/255,a=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=qD(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=ZD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=ZD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${i}%, ${o}%)`:`hsva(${n}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){const t=YD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=YD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${i}%, ${o}%)`:`hsla(${n}, ${i}%, ${o}%, ${this.roundA})`}toHex(t=!1){return XD(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return sG(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${i})`:`rgba(${t}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(ti(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(ti(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...JD(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:o}=JD(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+XD(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(hy))if(t===i)return n;return!1}toString(t){const n=!!t;t=t??this.format;let i=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),t==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new En(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Nf(n.l),new En(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new En(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Nf(n.l),new En(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=Nf(n.s),new En(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Nf(n.s),new En(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,new En(n)}mix(t,n=50){const i=this.toRgb(),o=new En(t).toRgb(),s=n/100,r={r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a};return new En(r)}analogous(t=6,n=30){const i=this.toHsl(),o=360/n,s=[this];for(i.h=(i.h-(o*t>>1)+720)%360;--t;)i.h=(i.h+o)%360,s.push(new En(i));return s}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new En(t)}monochromatic(t=6){const n=this.toHsv(),{h:i}=n,{s:o}=n;let{v:s}=n;const r=[],a=1/t;for(;t--;)r.push(new En({h:i,s:o,v:s})),s=(s+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new En({h:(n+72)%360,s:t.s,l:t.l}),new En({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new En(t).toRgb(),o=n.a+i.a*(1-n.a);return new En({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:i}=n,o=[this],s=360/t;for(let r=1;r<t;r++)o.push(new En({h:(i+r*s)%360,s:n.s,l:n.l}));return o}equals(t){const n=new En(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function py(e){return new En(e||"").isValid}function gy(e,t){const{c1:n,c2:i}={c1:new En(e),c2:new En(t)};return n.equals(i)}const dG=["src","alt"],Ku=Ct(lt({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0}},setup(e){const t=e,n=Z(""),i=Z(!1),o=Z(null),s=Z(!1),r=j(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=j(()=>{var R;const C=((R=r.value.color)==null?void 0:R.bgColor)||"#CCCCCC";return py(C)?C:"#CCCCCC"}),l=j(()=>{var R;const C=((R=r.value.color)==null?void 0:R.textColor)||"var(--background-color)";return py(C)?C:"var(--background-color)"}),c=j(()=>{if(!t.isUseShortLabel)return"";const{initial:C,name:R}=r.value;if(typeof C=="string"&&C.trim())return C.trim();if(!(R!=null&&R.trim()))return"";const E=R.trim().split(/\s+/).filter(Boolean);return E.length===1?E[0].slice(0,2).toUpperCase():(E[0][0]+E[1][0]).toUpperCase()}),u=j(()=>r.value.profile_image?"image":"text"),d=j(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#dcdcdc","--text-color":l.value})),h=()=>{n.value="",s.value=!0},{getCachedImage:f,setCachedImage:g}=KH(),m=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const C=o.value;try{const R=await JH({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:g},onLoadingChange:E=>{C.signal.aborted||(i.value=E)}});if(!C.signal.aborted&&(n.value=R,R.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(R){C.signal.aborted||(console.error("Failed to load avatar:",R),n.value="")}},{retry:y,errorRetry:b,isRetrying:S}=QH(m,3,2e3),F=ct(()=>r.value.id,y,{immediate:!0});return Yn(()=>{F(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",i.value=!1}),(C,R)=>(K(),Ce("div",{class:z([C.$style["avatar-wrapper"],{[C.$style.me]:e.isMe,[C.$style.loading]:i.value,[C.$style.disabled]:e.disabled,[C.$style.readOnly]:t.readOnly}]),style:mn(d.value)},[i.value||J(S)?(K(),Ce("div",{key:0,class:z(C.$style["skeleton-loader"])},null,2)):(K(),Ce(kt,{key:1},[u.value==="text"||J(b)||s.value?(K(),Ce("div",{key:0,class:z(C.$style["short-label"])},bt(c.value),3)):n.value.length>0||r.value.profile_image?(K(),Ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,dG)):ot("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1gfzg_1",me:"_me_1gfzg_16","short-label":"_short-label_1gfzg_19",action:"_action_1gfzg_37",loading:"_loading_1gfzg_55",disabled:"_disabled_1gfzg_58",readOnly:"_readOnly_1gfzg_61"}}]]),hG=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],fG=["UploadInProgress"],Hf={},e_=(e,t,n,i)=>{const o=Z(""),s=Z(""),r=Z(!0),a=j(()=>`${t}:${e.value.name}`),l=y=>URL.createObjectURL(y),c=y=>{URL.revokeObjectURL(y)},u=y=>new Blob([y],{type:"image/svg+xml"}),d=async y=>await y.text(),h=async(y,b)=>{const S=await i(a.value);if(S&&S instanceof Blob&&S.size>0||S&&typeof S=="string")return S;if(b in Hf)return await Hf[b];const F=(async()=>{try{const C=await fetch(y,{cache:"no-cache"});if(!C.ok)throw new Error("Failed to fetch visual");const R=C.headers.get("Content-Type")||"";let E;if(R.includes("svg")||R.includes("xml")){const _=await C.text();if(_.trim()){if(E=u(_),!E.size)throw new Error("Empty image blob")}else throw new Error("Empty SVG content")}else if(R.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(E=await C.blob(),!E.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${R}`);return await n(a.value,E),E}catch(C){return console.error("Error fetching visual:",C),new Blob}})();return Hf[b]=F,F.finally(()=>{delete Hf[b]}),await F},f=async y=>{r.value=!0;try{const b=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",S={icon:`${b}/icon/tess/TESSRAPP_Icon_${y}`,visual:`${b}/icon/visual/TESSRAPP_Visual_${y}`,ratting:`${b}/icon/tess/rating/TESSRAPP_Icon_${y}_Outline`,flag:`${b}/icon/flags/4x3/${y}`},F=hG.includes(y)?"png":fG.includes(y)?"gif":"svg",C=`${S[t]}.${F}`,R=await h(C,a.value);typeof R!="string"&&R.size>0?((R.type.includes("svg")||R.type.includes("xml"))&&(s.value=await d(R)),o.value=l(R)):o.value=R}catch(b){console.error("Error fetching remote visual:",b)}finally{r.value=!1}},g=async()=>{o.value="",s.value="",e.value.name&&(r.value=!0,await f(e.value.name),r.value=!1)},m=j(()=>s.value?s.value:"");return Ll(()=>{o.value&&c(o.value)}),ct(()=>e,y=>{g()},{deep:!0,immediate:!0}),{svgContent:m,url:o,loading:r}},pG=["innerHTML"],gG="IconCache",mG="icons",gt=Ct(lt({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){nB(l=>({d999b740:l.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=Uu({dbName:gG,storeName:mG}),o=l=>{if(typeof l=="number")return l;switch(l){case"small":return 8;case"medium":return 16;case"large":return 20;default:return typeof l=="string"?parseInt(l,10):14}},s=j(()=>t.source==="rating"?"ratting":"icon"),r=j(()=>({name:t.src,size:o(t.size),color:t.color})),{svgContent:a}=e_(r,s.value,i,n);return(l,c)=>(K(),Ce("div",{class:z(l.$style.iconWrapper),innerHTML:J(a),style:mn({color:e.color,"--size":e.size})},null,14,pG))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),vG={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},Vo=({type:e,config:t})=>{const n=[];try{const i=vG[e];if(!i)throw new Error(`Link template for link type "${e}" not found`);const o=i.replace(/{(.*?)}/g,(s,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(i){return console.error("Link Creator ERROR at:",i),{url:"",hasError:!0,error:i instanceof Error?i.message:`Missing required keys: ${n.join(", ")}`}}};var t_=typeof global=="object"&&global&&global.Object===Object&&global,yG=typeof self=="object"&&self&&self.Object===Object&&self,Bo=t_||yG||Function("return this")(),uo=Bo.Symbol,n_=Object.prototype,CG=n_.hasOwnProperty,wG=n_.toString,qu=uo?uo.toStringTag:void 0;function bG(e){var t=CG.call(e,qu),n=e[qu];try{e[qu]=void 0;var i=!0}catch{}var o=wG.call(e);return i&&(t?e[qu]=n:delete e[qu]),o}var SG=Object.prototype,EG=SG.toString;function RG(e){return EG.call(e)}var DG="[object Null]",_G="[object Undefined]",i_=uo?uo.toStringTag:void 0;function Zl(e){return e==null?e===void 0?_G:DG:i_&&i_ in Object(e)?bG(e):RG(e)}function Ks(e){return e!=null&&typeof e=="object"}var xG="[object Symbol]";function Gf(e){return typeof e=="symbol"||Ks(e)&&Zl(e)==xG}function FG(e,t){for(var n=-1,i=e==null?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}var ho=Array.isArray,o_=uo?uo.prototype:void 0,s_=o_?o_.toString:void 0;function r_(e){if(typeof e=="string")return e;if(ho(e))return FG(e,r_)+"";if(Gf(e))return s_?s_.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var TG=/\s/;function PG(e){for(var t=e.length;t--&&TG.test(e.charAt(t)););return t}var IG=/^\s+/;function AG(e){return e&&e.slice(0,PG(e)+1).replace(IG,"")}function qs(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var a_=NaN,kG=/^[-+]0x[0-9a-f]+$/i,OG=/^0b[01]+$/i,MG=/^0o[0-7]+$/i,LG=parseInt;function my(e){if(typeof e=="number")return e;if(Gf(e))return a_;if(qs(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qs(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=AG(e);var n=OG.test(e);return n||MG.test(e)?LG(e.slice(2),n?2:8):kG.test(e)?a_:+e}var l_=1/0,NG=17976931348623157e292;function vy(e){if(!e)return e===0?e:0;if(e=my(e),e===l_||e===-l_){var t=e<0?-1:1;return t*NG}return e===e?e:0}function VG(e){var t=vy(e),n=t%1;return t===t?n?t-n:t:0}function yy(e){return e}var BG="[object AsyncFunction]",HG="[object Function]",GG="[object GeneratorFunction]",$G="[object Proxy]";function c_(e){if(!qs(e))return!1;var t=Zl(e);return t==HG||t==GG||t==BG||t==$G}var Cy=Bo["__core-js_shared__"],u_=function(){var e=/[^.]+$/.exec(Cy&&Cy.keys&&Cy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WG(e){return!!u_&&u_ in e}var zG=Function.prototype,UG=zG.toString;function Na(e){if(e!=null){try{return UG.call(e)}catch{}try{return e+""}catch{}}return""}var jG=/[\\^$.*+?()[\]{}|]/g,KG=/^\[object .+?Constructor\]$/,qG=Function.prototype,YG=Object.prototype,ZG=qG.toString,XG=YG.hasOwnProperty,JG=RegExp("^"+ZG.call(XG).replace(jG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QG(e){if(!qs(e)||WG(e))return!1;var t=c_(e)?JG:KG;return t.test(Na(e))}function e$(e,t){return e==null?void 0:e[t]}function Va(e,t){var n=e$(e,t);return QG(n)?n:void 0}var wy=Va(Bo,"WeakMap"),d_=Object.create,t$=function(){function e(){}return function(t){if(!qs(t))return{};if(d_)return d_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function n$(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i$(){}var o$=800,s$=16,r$=Date.now;function a$(e){var t=0,n=0;return function(){var i=r$(),o=s$-(i-n);if(n=i,o>0){if(++t>=o$)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function l$(e){return function(){return e}}var $f=function(){try{var e=Va(Object,"defineProperty");return e({},"",{}),e}catch{}}(),c$=$f?function(e,t){return $f(e,"toString",{configurable:!0,enumerable:!1,value:l$(t),writable:!0})}:yy,u$=a$(c$);function d$(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function h$(e,t,n,i){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function f$(e){return e!==e}function p$(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function g$(e,t,n){return t===t?p$(e,t,n):h$(e,f$,n)}function m$(e,t){var n=e==null?0:e.length;return!!n&&g$(e,t,0)>-1}var v$=9007199254740991,y$=/^(?:0|[1-9]\d*)$/;function by(e,t){var n=typeof e;return t=t??v$,!!t&&(n=="number"||n!="symbol"&&y$.test(e))&&e>-1&&e%1==0&&e<t}function C$(e,t,n){t=="__proto__"&&$f?$f(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wf(e,t){return e===t||e!==e&&t!==t}var w$=Object.prototype,b$=w$.hasOwnProperty;function S$(e,t,n){var i=e[t];(!(b$.call(e,t)&&Wf(i,n))||n===void 0&&!(t in e))&&C$(e,t,n)}var h_=Math.max;function E$(e,t,n){return t=h_(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=h_(i.length-t,0),r=Array(s);++o<s;)r[o]=i[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=i[o];return a[t]=n(r),n$(e,this,a)}}function R$(e,t){return u$(E$(e,t,yy),e+"")}var D$=9007199254740991;function Sy(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=D$}function zf(e){return e!=null&&Sy(e.length)&&!c_(e)}function _$(e,t,n){if(!qs(n))return!1;var i=typeof t;return(i=="number"?zf(n)&&by(t,n.length):i=="string"&&t in n)?Wf(n[t],e):!1}var x$=Object.prototype;function Ey(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x$;return e===n}function F$(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var T$="[object Arguments]";function f_(e){return Ks(e)&&Zl(e)==T$}var p_=Object.prototype,P$=p_.hasOwnProperty,I$=p_.propertyIsEnumerable,Uf=f_(function(){return arguments}())?f_:function(e){return Ks(e)&&P$.call(e,"callee")&&!I$.call(e,"callee")};function A$(){return!1}var g_=typeof un=="object"&&un&&!un.nodeType&&un,m_=g_&&typeof module=="object"&&module&&!module.nodeType&&module,k$=m_&&m_.exports===g_,v_=k$?Bo.Buffer:void 0,O$=v_?v_.isBuffer:void 0,Yu=O$||A$,M$="[object Arguments]",L$="[object Array]",N$="[object Boolean]",V$="[object Date]",B$="[object Error]",H$="[object Function]",G$="[object Map]",$$="[object Number]",W$="[object Object]",z$="[object RegExp]",U$="[object Set]",j$="[object String]",K$="[object WeakMap]",q$="[object ArrayBuffer]",Y$="[object DataView]",Z$="[object Float32Array]",X$="[object Float64Array]",J$="[object Int8Array]",Q$="[object Int16Array]",eW="[object Int32Array]",tW="[object Uint8Array]",nW="[object Uint8ClampedArray]",iW="[object Uint16Array]",oW="[object Uint32Array]",hn={};hn[Z$]=hn[X$]=hn[J$]=hn[Q$]=hn[eW]=hn[tW]=hn[nW]=hn[iW]=hn[oW]=!0,hn[M$]=hn[L$]=hn[q$]=hn[N$]=hn[Y$]=hn[V$]=hn[B$]=hn[H$]=hn[G$]=hn[$$]=hn[W$]=hn[z$]=hn[U$]=hn[j$]=hn[K$]=!1;function sW(e){return Ks(e)&&Sy(e.length)&&!!hn[Zl(e)]}function Ry(e){return function(t){return e(t)}}var y_=typeof un=="object"&&un&&!un.nodeType&&un,Zu=y_&&typeof module=="object"&&module&&!module.nodeType&&module,rW=Zu&&Zu.exports===y_,Dy=rW&&t_.process,Xl=function(){try{var e=Zu&&Zu.require&&Zu.require("util").types;return e||Dy&&Dy.binding&&Dy.binding("util")}catch{}}(),C_=Xl&&Xl.isTypedArray,_y=C_?Ry(C_):sW,aW=Object.prototype,lW=aW.hasOwnProperty;function cW(e,t){var n=ho(e),i=!n&&Uf(e),o=!n&&!i&&Yu(e),s=!n&&!i&&!o&&_y(e),r=n||i||o||s,a=r?F$(e.length,String):[],l=a.length;for(var c in e)lW.call(e,c)&&!(r&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||by(c,l)))&&a.push(c);return a}function w_(e,t){return function(n){return e(t(n))}}var uW=w_(Object.keys,Object),dW=Object.prototype,hW=dW.hasOwnProperty;function b_(e){if(!Ey(e))return uW(e);var t=[];for(var n in Object(e))hW.call(e,n)&&n!="constructor"&&t.push(n);return t}function S_(e){return zf(e)?cW(e):b_(e)}var fW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pW=/^\w*$/;function xy(e,t){if(ho(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Gf(e)?!0:pW.test(e)||!fW.test(e)||t!=null&&e in Object(t)}var Xu=Va(Object,"create");function gW(){this.__data__=Xu?Xu(null):{},this.size=0}function mW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vW="__lodash_hash_undefined__",yW=Object.prototype,CW=yW.hasOwnProperty;function wW(e){var t=this.__data__;if(Xu){var n=t[e];return n===vW?void 0:n}return CW.call(t,e)?t[e]:void 0}var bW=Object.prototype,SW=bW.hasOwnProperty;function EW(e){var t=this.__data__;return Xu?t[e]!==void 0:SW.call(t,e)}var RW="__lodash_hash_undefined__";function DW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xu&&t===void 0?RW:t,this}function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ba.prototype.clear=gW,Ba.prototype.delete=mW,Ba.prototype.get=wW,Ba.prototype.has=EW,Ba.prototype.set=DW;function _W(){this.__data__=[],this.size=0}function jf(e,t){for(var n=e.length;n--;)if(Wf(e[n][0],t))return n;return-1}var xW=Array.prototype,FW=xW.splice;function TW(e){var t=this.__data__,n=jf(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():FW.call(t,n,1),--this.size,!0}function PW(e){var t=this.__data__,n=jf(t,e);return n<0?void 0:t[n][1]}function IW(e){return jf(this.__data__,e)>-1}function AW(e,t){var n=this.__data__,i=jf(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Ys(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ys.prototype.clear=_W,Ys.prototype.delete=TW,Ys.prototype.get=PW,Ys.prototype.has=IW,Ys.prototype.set=AW;var Ju=Va(Bo,"Map");function kW(){this.size=0,this.__data__={hash:new Ba,map:new(Ju||Ys),string:new Ba}}function OW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kf(e,t){var n=e.__data__;return OW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function MW(e){var t=Kf(this,e).delete(e);return this.size-=t?1:0,t}function LW(e){return Kf(this,e).get(e)}function NW(e){return Kf(this,e).has(e)}function VW(e,t){var n=Kf(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Zs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Zs.prototype.clear=kW,Zs.prototype.delete=MW,Zs.prototype.get=LW,Zs.prototype.has=NW,Zs.prototype.set=VW;var BW="Expected a function";function Fy(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(BW);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var r=e.apply(this,i);return n.cache=s.set(o,r)||s,r};return n.cache=new(Fy.Cache||Zs),n}Fy.Cache=Zs;var HW=500;function GW(e){var t=Fy(e,function(i){return n.size===HW&&n.clear(),i}),n=t.cache;return t}var $W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WW=/\\(\\)?/g,zW=GW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($W,function(n,i,o,s){t.push(o?s.replace(WW,"$1"):i||n)}),t});function UW(e){return e==null?"":r_(e)}function E_(e,t){return ho(e)?e:xy(e,t)?[e]:zW(UW(e))}function qf(e){if(typeof e=="string"||Gf(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function R_(e,t){t=E_(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[qf(t[n++])];return n&&n==i?e:void 0}function jW(e,t,n){var i=e==null?void 0:R_(e,t);return i===void 0?n:i}function D_(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}var __=uo?uo.isConcatSpreadable:void 0;function KW(e){return ho(e)||Uf(e)||!!(__&&e&&e[__])}function qW(e,t,n,i,o){var s=-1,r=e.length;for(n||(n=KW),o||(o=[]);++s<r;){var a=e[s];n(a)&&D_(o,a)}return o}var YW=w_(Object.getPrototypeOf,Object);function ZW(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s}var XW=Math.ceil,JW=Math.max;function QW(e,t,n){t===void 0?t=1:t=JW(VG(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,r=Array(XW(i/t));o<i;)r[s++]=ZW(e,o,o+=t);return r}function ez(){this.__data__=new Ys,this.size=0}function tz(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nz(e){return this.__data__.get(e)}function iz(e){return this.__data__.has(e)}var oz=200;function sz(e,t){var n=this.__data__;if(n instanceof Ys){var i=n.__data__;if(!Ju||i.length<oz-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zs(i)}return n.set(e,t),this.size=n.size,this}function fs(e){var t=this.__data__=new Ys(e);this.size=t.size}fs.prototype.clear=ez,fs.prototype.delete=tz,fs.prototype.get=nz,fs.prototype.has=iz,fs.prototype.set=sz;var x_=typeof un=="object"&&un&&!un.nodeType&&un,F_=x_&&typeof module=="object"&&module&&!module.nodeType&&module,rz=F_&&F_.exports===x_,T_=rz?Bo.Buffer:void 0;T_&&T_.allocUnsafe;function az(e,t){return e.slice()}function lz(e,t){for(var n=-1,i=e==null?0:e.length,o=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[o++]=r)}return s}function cz(){return[]}var uz=Object.prototype,dz=uz.propertyIsEnumerable,P_=Object.getOwnPropertySymbols,hz=P_?function(e){return e==null?[]:(e=Object(e),lz(P_(e),function(t){return dz.call(e,t)}))}:cz;function fz(e,t,n){var i=t(e);return ho(e)?i:D_(i,n(e))}function Ty(e){return fz(e,S_,hz)}var Py=Va(Bo,"DataView"),Iy=Va(Bo,"Promise"),Jl=Va(Bo,"Set"),I_="[object Map]",pz="[object Object]",A_="[object Promise]",k_="[object Set]",O_="[object WeakMap]",M_="[object DataView]",gz=Na(Py),mz=Na(Ju),vz=Na(Iy),yz=Na(Jl),Cz=Na(wy),fo=Zl;(Py&&fo(new Py(new ArrayBuffer(1)))!=M_||Ju&&fo(new Ju)!=I_||Iy&&fo(Iy.resolve())!=A_||Jl&&fo(new Jl)!=k_||wy&&fo(new wy)!=O_)&&(fo=function(e){var t=Zl(e),n=t==pz?e.constructor:void 0,i=n?Na(n):"";if(i)switch(i){case gz:return M_;case mz:return I_;case vz:return A_;case yz:return k_;case Cz:return O_}return t});var wz=Object.prototype,bz=wz.hasOwnProperty;function Sz(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&bz.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Yf=Bo.Uint8Array;function Ay(e){var t=new e.constructor(e.byteLength);return new Yf(t).set(new Yf(e)),t}function Ez(e,t){var n=Ay(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var Rz=/\w*$/;function Dz(e){var t=new e.constructor(e.source,Rz.exec(e));return t.lastIndex=e.lastIndex,t}var L_=uo?uo.prototype:void 0,N_=L_?L_.valueOf:void 0;function _z(e){return N_?Object(N_.call(e)):{}}function xz(e,t){var n=Ay(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var Fz="[object Boolean]",Tz="[object Date]",Pz="[object Map]",Iz="[object Number]",Az="[object RegExp]",kz="[object Set]",Oz="[object String]",Mz="[object Symbol]",Lz="[object ArrayBuffer]",Nz="[object DataView]",Vz="[object Float32Array]",Bz="[object Float64Array]",Hz="[object Int8Array]",Gz="[object Int16Array]",$z="[object Int32Array]",Wz="[object Uint8Array]",zz="[object Uint8ClampedArray]",Uz="[object Uint16Array]",jz="[object Uint32Array]";function Kz(e,t,n){var i=e.constructor;switch(t){case Lz:return Ay(e);case Fz:case Tz:return new i(+e);case Nz:return Ez(e);case Vz:case Bz:case Hz:case Gz:case $z:case Wz:case zz:case Uz:case jz:return xz(e);case Pz:return new i;case Iz:case Oz:return new i(e);case Az:return Dz(e);case kz:return new i;case Mz:return _z(e)}}function qz(e){return typeof e.constructor=="function"&&!Ey(e)?t$(YW(e)):{}}var Yz="[object Map]";function Zz(e){return Ks(e)&&fo(e)==Yz}var V_=Xl&&Xl.isMap,Xz=V_?Ry(V_):Zz,Jz="[object Set]";function Qz(e){return Ks(e)&&fo(e)==Jz}var B_=Xl&&Xl.isSet,eU=B_?Ry(B_):Qz,H_="[object Arguments]",tU="[object Array]",nU="[object Boolean]",iU="[object Date]",oU="[object Error]",G_="[object Function]",sU="[object GeneratorFunction]",rU="[object Map]",aU="[object Number]",$_="[object Object]",lU="[object RegExp]",cU="[object Set]",uU="[object String]",dU="[object Symbol]",hU="[object WeakMap]",fU="[object ArrayBuffer]",pU="[object DataView]",gU="[object Float32Array]",mU="[object Float64Array]",vU="[object Int8Array]",yU="[object Int16Array]",CU="[object Int32Array]",wU="[object Uint8Array]",bU="[object Uint8ClampedArray]",SU="[object Uint16Array]",EU="[object Uint32Array]",an={};an[H_]=an[tU]=an[fU]=an[pU]=an[nU]=an[iU]=an[gU]=an[mU]=an[vU]=an[yU]=an[CU]=an[rU]=an[aU]=an[$_]=an[lU]=an[cU]=an[uU]=an[dU]=an[wU]=an[bU]=an[SU]=an[EU]=!0,an[oU]=an[G_]=an[hU]=!1;function Zf(e,t,n,i,o,s){var r;if(r!==void 0)return r;if(!qs(e))return e;var a=ho(e);if(a)r=Sz(e);else{var l=fo(e),c=l==G_||l==sU;if(Yu(e))return az(e);if(l==$_||l==H_||c&&!o)r=c?{}:qz(e);else{if(!an[l])return o?e:{};r=Kz(e,l)}}s||(s=new fs);var u=s.get(e);if(u)return u;s.set(e,r),eU(e)?e.forEach(function(f){r.add(Zf(f,t,n,f,e,s))}):Xz(e)&&e.forEach(function(f,g){r.set(g,Zf(f,t,n,g,e,s))});var d=Ty,h=a?void 0:d(e);return d$(h||e,function(f,g){h&&(g=f,f=e[g]),S$(r,g,Zf(f,t,n,g,e,s))}),r}var RU=1,DU=4;function _U(e){return Zf(e,RU|DU)}var xU="__lodash_hash_undefined__";function FU(e){return this.__data__.set(e,xU),this}function TU(e){return this.__data__.has(e)}function Qu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zs;++t<n;)this.add(e[t])}Qu.prototype.add=Qu.prototype.push=FU,Qu.prototype.has=TU;function PU(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function W_(e,t){return e.has(t)}var IU=1,AU=2;function z_(e,t,n,i,o,s){var r=n&IU,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&AU?new Qu:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var g=e[d],m=t[d];if(i)var y=r?i(m,g,d,t,e,s):i(g,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!PU(t,function(b,S){if(!W_(f,S)&&(g===b||o(g,b,n,i,s)))return f.push(S)})){h=!1;break}}else if(!(g===m||o(g,m,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function kU(e){var t=-1,n=Array(e.size);return e.forEach(function(i,o){n[++t]=[o,i]}),n}function ky(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var OU=1,MU=2,LU="[object Boolean]",NU="[object Date]",VU="[object Error]",BU="[object Map]",HU="[object Number]",GU="[object RegExp]",$U="[object Set]",WU="[object String]",zU="[object Symbol]",UU="[object ArrayBuffer]",jU="[object DataView]",U_=uo?uo.prototype:void 0,Oy=U_?U_.valueOf:void 0;function KU(e,t,n,i,o,s,r){switch(n){case jU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case UU:return!(e.byteLength!=t.byteLength||!s(new Yf(e),new Yf(t)));case LU:case NU:case HU:return Wf(+e,+t);case VU:return e.name==t.name&&e.message==t.message;case GU:case WU:return e==t+"";case BU:var a=kU;case $U:var l=i&OU;if(a||(a=ky),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;i|=MU,r.set(e,t);var u=z_(a(e),a(t),i,o,s,r);return r.delete(e),u;case zU:if(Oy)return Oy.call(e)==Oy.call(t)}return!1}var qU=1,YU=Object.prototype,ZU=YU.hasOwnProperty;function XU(e,t,n,i,o,s){var r=n&qU,a=Ty(e),l=a.length,c=Ty(t),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:ZU.call(t,h)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=r;++d<l;){h=a[d];var b=e[h],S=t[h];if(i)var F=r?i(S,b,h,t,e,s):i(b,S,h,e,t,s);if(!(F===void 0?b===S||o(b,S,n,i,s):F)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,R=t.constructor;C!=R&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof R=="function"&&R instanceof R)&&(m=!1)}return s.delete(e),s.delete(t),m}var JU=1,j_="[object Arguments]",K_="[object Array]",Xf="[object Object]",QU=Object.prototype,q_=QU.hasOwnProperty;function e3(e,t,n,i,o,s){var r=ho(e),a=ho(t),l=r?K_:fo(e),c=a?K_:fo(t);l=l==j_?Xf:l,c=c==j_?Xf:c;var u=l==Xf,d=c==Xf,h=l==c;if(h&&Yu(e)){if(!Yu(t))return!1;r=!0,u=!1}if(h&&!u)return s||(s=new fs),r||_y(e)?z_(e,t,n,i,o,s):KU(e,t,l,n,i,o,s);if(!(n&JU)){var f=u&&q_.call(e,"__wrapped__"),g=d&&q_.call(t,"__wrapped__");if(f||g){var m=f?e.value():e,y=g?t.value():t;return s||(s=new fs),o(m,y,n,i,s)}}return h?(s||(s=new fs),XU(e,t,n,i,o,s)):!1}function My(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ks(e)&&!Ks(t)?e!==e&&t!==t:e3(e,t,n,i,My,o)}var t3=1,n3=2;function i3(e,t,n,i){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<s;){r=n[o];var a=r[0],l=e[a],c=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var u=new fs,d;if(!(d===void 0?My(c,l,t3|n3,i,u):d))return!1}}return!0}function Y_(e){return e===e&&!qs(e)}function o3(e){for(var t=S_(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Y_(o)]}return t}function Z_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function s3(e){var t=o3(e);return t.length==1&&t[0][2]?Z_(t[0][0],t[0][1]):function(n){return n===e||i3(n,e,t)}}function r3(e,t){return e!=null&&t in Object(e)}function a3(e,t,n){t=E_(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var r=qf(t[i]);if(!(s=e!=null&&n(e,r)))break;e=e[r]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&Sy(o)&&by(r,o)&&(ho(e)||Uf(e)))}function l3(e,t){return e!=null&&a3(e,t,r3)}var c3=1,u3=2;function d3(e,t){return xy(e)&&Y_(t)?Z_(qf(e),t):function(n){var i=jW(n,e);return i===void 0&&i===t?l3(n,e):My(t,i,c3|u3)}}function h3(e){return function(t){return t==null?void 0:t[e]}}function f3(e){return function(t){return R_(t,e)}}function p3(e){return xy(e)?h3(qf(e)):f3(e)}function g3(e){return typeof e=="function"?e:e==null?yy:typeof e=="object"?ho(e)?d3(e[0],e[1]):s3(e):p3(e)}var Ly=function(){return Bo.Date.now()},m3="Expected a function",v3=Math.max,y3=Math.min;function Ho(e,t,n){var i,o,s,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(m3);t=my(t)||0,qs(n)&&(u=!!n.leading,d="maxWait"in n,s=d?v3(my(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var _=i,I=o;return i=o=void 0,c=E,r=e.apply(I,_),r}function g(E){return c=E,a=setTimeout(b,t),u?f(E):r}function m(E){var _=E-l,I=E-c,O=t-_;return d?y3(O,s-I):O}function y(E){var _=E-l,I=E-c;return l===void 0||_>=t||_<0||d&&I>=s}function b(){var E=Ly();if(y(E))return S(E);a=setTimeout(b,m(E))}function S(E){return a=void 0,h&&i?f(E):(i=o=void 0,r)}function F(){a!==void 0&&clearTimeout(a),c=0,i=l=o=a=void 0}function C(){return a===void 0?r:S(Ly())}function R(){var E=Ly(),_=y(E);if(i=arguments,o=this,l=E,_){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(b,t),f(l)}return a===void 0&&(a=setTimeout(b,t)),r}return R.cancel=F,R.flush=C,R}function X_(e){return Ks(e)&&zf(e)}function C3(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var w3="[object Map]",b3="[object Set]",S3=Object.prototype,E3=S3.hasOwnProperty;function R3(e){if(e==null)return!0;if(zf(e)&&(ho(e)||typeof e=="string"||typeof e.splice=="function"||Yu(e)||_y(e)||Uf(e)))return!e.length;var t=fo(e);if(t==w3||t==b3)return!e.size;if(Ey(e))return!b_(e).length;for(var n in e)if(E3.call(e,n))return!1;return!0}var D3=Math.floor,_3=Math.random;function x3(e,t){return e+D3(_3()*(t-e+1))}var F3=parseFloat,T3=Math.min,P3=Math.random;function I3(e,t,n){if(n&&typeof n!="boolean"&&_$(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=vy(e),t===void 0?(t=e,e=0):t=vy(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=P3();return T3(e+o*(t-e+F3("1e-"+((o+"").length-1))),t)}return x3(e,t)}var A3=1/0,k3=Jl&&1/ky(new Jl([,-0]))[1]==A3?function(e){return new Jl(e)}:i$,O3=200;function M3(e,t,n){var i=-1,o=m$,s=e.length,r=!0,a=[],l=a;if(s>=O3){var c=t?null:k3(e);if(c)return ky(c);r=!1,o=W_,l=new Qu}else l=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var Jf=R$(function(e){var t=C3(e);return X_(t)&&(t=void 0),M3(qW(e,1,X_),g3(t))});const po=(e,t)=>{const n=Si();return{apiServices:j(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,s=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(s!=null&&s.apiServices))return s.apiServices})}},L3=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};class Ha extends Error{}class N3 extends Ha{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class V3 extends Ha{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class B3 extends Ha{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Ql extends Ha{}class J_ extends Ha{constructor(t){super(`Invalid unit ${t}`)}}class ci extends Ha{}class Mr extends Ha{constructor(){super("Zone is an abstract class")}}const et="numeric",Go="short",Ki="long",Qf={year:et,month:et,day:et},Q_={year:et,month:Go,day:et},H3={year:et,month:Go,day:et,weekday:Go},ex={year:et,month:Ki,day:et},tx={year:et,month:Ki,day:et,weekday:Ki},nx={hour:et,minute:et},ix={hour:et,minute:et,second:et},ox={hour:et,minute:et,second:et,timeZoneName:Go},sx={hour:et,minute:et,second:et,timeZoneName:Ki},rx={hour:et,minute:et,hourCycle:"h23"},ax={hour:et,minute:et,second:et,hourCycle:"h23"},lx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Go},cx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Ki},ux={year:et,month:et,day:et,hour:et,minute:et},dx={year:et,month:et,day:et,hour:et,minute:et,second:et},hx={year:et,month:Go,day:et,hour:et,minute:et},fx={year:et,month:Go,day:et,hour:et,minute:et,second:et},G3={year:et,month:Go,day:et,weekday:Go,hour:et,minute:et},px={year:et,month:Ki,day:et,hour:et,minute:et,timeZoneName:Go},gx={year:et,month:Ki,day:et,hour:et,minute:et,second:et,timeZoneName:Go},mx={year:et,month:Ki,day:et,weekday:Ki,hour:et,minute:et,timeZoneName:Ki},vx={year:et,month:Ki,day:et,weekday:Ki,hour:et,minute:et,second:et,timeZoneName:Ki};class ed{get type(){throw new Mr}get name(){throw new Mr}get ianaName(){return this.name}get isUniversal(){throw new Mr}offsetName(t,n){throw new Mr}formatOffset(t,n){throw new Mr}offset(t){throw new Mr}equals(t){throw new Mr}get isValid(){throw new Mr}}let Ny=null;class ep extends ed{static get instance(){return Ny===null&&(Ny=new ep),Ny}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Wx(t,n,i)}formatOffset(t,n){return od(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Vy=new Map;function $3(e){let t=Vy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Vy.set(e,t)),t}const W3={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function z3(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,s,r,a,l,c,u]=i;return[r,o,s,a,l,c,u]}function U3(e,t){const n=e.formatToParts(t),i=[];for(let o=0;o<n.length;o++){const{type:s,value:r}=n[o],a=W3[s];s==="era"?i[a]=r:Dt(a)||(i[a]=parseInt(r,10))}return i}const By=new Map;class Xs extends ed{static create(t){let n=By.get(t);return n===void 0&&By.set(t,n=new Xs(t)),n}static resetCache(){By.clear(),Vy.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Xs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Wx(t,n,i,this.name)}formatOffset(t,n){return od(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=$3(this.name);let[o,s,r,a,l,c,u]=i.formatToParts?U3(i,n):z3(i,n);a==="BC"&&(o=-Math.abs(o)+1);const h=sp({year:o,month:s,day:r,hour:l===24?0:l,minute:c,second:u,millisecond:0});let f=+n;const g=f%1e3;return f-=g>=0?g:1e3+g,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let yx={};function j3(e,t={}){const n=JSON.stringify([e,t]);let i=yx[n];return i||(i=new Intl.ListFormat(e,t),yx[n]=i),i}const Hy=new Map;function Gy(e,t={}){const n=JSON.stringify([e,t]);let i=Hy.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Hy.set(n,i)),i}const $y=new Map;function K3(e,t={}){const n=JSON.stringify([e,t]);let i=$y.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),$y.set(n,i)),i}const Wy=new Map;function q3(e,t={}){const{base:n,...i}=t,o=JSON.stringify([e,i]);let s=Wy.get(o);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),Wy.set(o,s)),s}let td=null;function Y3(){return td||(td=new Intl.DateTimeFormat().resolvedOptions().locale,td)}const zy=new Map;function Cx(e){let t=zy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),zy.set(e,t)),t}const Uy=new Map;function Z3(e){let t=Uy.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...wx,...t}),Uy.set(e,t)}return t}function X3(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,o;try{i=Gy(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);i=Gy(l).resolvedOptions(),o=l}const{numberingSystem:s,calendar:r}=i;return[o,s,r]}}function J3(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Q3(e){const t=[];for(let n=1;n<=12;n++){const i=tt.utc(2009,n,1);t.push(e(i))}return t}function e4(e){const t=[];for(let n=1;n<=7;n++){const i=tt.utc(2016,11,13+n);t.push(e(i))}return t}function tp(e,t,n,i){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):i(t)}function t4(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||Cx(e.locale).numberingSystem==="latn"}class n4{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:o,floor:s,...r}=i;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=K3(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):eC(t,3);return $n(n,this.padTo)}}}class i4{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&Xs.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||o,this.dtf=Gy(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class o4{constructor(t,n,i){this.opts={style:"long",...i},!n&&Bx()&&(this.rtf=q3(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):_4(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const wx={firstDay:1,minimalDays:4,weekend:[6,7]};class en{static fromOpts(t){return en.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,o,s=!1){const r=t||Fn.defaultLocale,a=r||(s?"en-US":Y3()),l=n||Fn.defaultNumberingSystem,c=i||Fn.defaultOutputCalendar,u=Jy(o)||Fn.defaultWeekSettings;return new en(a,l,c,u,r)}static resetCache(){td=null,Hy.clear(),$y.clear(),Wy.clear(),zy.clear(),Uy.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:o}={}){return en.create(t,n,i,o)}constructor(t,n,i,o,s){const[r,a,l]=X3(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=o,this.intl=J3(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=t4(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:en.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Jy(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return tp(this,t,jx,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const o=n?{month:t,day:"numeric"}:{month:t},s=n?"format":"standalone";if(!this.monthsCache[s][t]){const r=i?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[s][t]=Q3(r)}return this.monthsCache[s][t]})}weekdays(t,n=!1){return tp(this,t,Yx,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=e4(s=>this.extract(s,i,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return tp(this,void 0,()=>Zx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return tp(this,t,Xx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[tt.utc(-40,1,1),tt.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const o=this.dtFormatter(t,n),s=o.formatToParts(),r=s.find(a=>a.type.toLowerCase()===i);return r?r.value:null}numberFormatter(t={}){return new n4(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new i4(t,this.intl,n)}relFormatter(t={}){return new o4(this.intl,this.isEnglish(),t)}listFormatter(t={}){return j3(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Cx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Hx()?Z3(this.locale):wx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let jy=null;class Ei extends ed{static get utcInstance(){return jy===null&&(jy=new Ei(0)),jy}static instance(t){return t===0?Ei.utcInstance:new Ei(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ei(rp(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${od(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${od(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return od(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class s4 extends ed{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Lr(e,t){if(Dt(e)||e===null)return t;if(e instanceof ed)return e;if(d4(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?ep.instance:n==="utc"||n==="gmt"?Ei.utcInstance:Ei.parseSpecifier(n)||Xs.create(e)}else return Nr(e)?Ei.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new s4(e)}const Ky={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},bx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},r4=Ky.hanidec.replace(/[\[|\]]/g,"").split("");function a4(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(Ky.hanidec)!==-1)t+=r4.indexOf(e[n]);else for(const o in bx){const[s,r]=bx[o];i>=s&&i<=r&&(t+=i-s)}}return parseInt(t,10)}else return t}const qy=new Map;function l4(){qy.clear()}function $o({numberingSystem:e},t=""){const n=e||"latn";let i=qy.get(n);i===void 0&&(i=new Map,qy.set(n,i));let o=i.get(t);return o===void 0&&(o=new RegExp(`${Ky[n]}${t}`),i.set(t,o)),o}let Sx=()=>Date.now(),Ex="system",Rx=null,Dx=null,_x=null,xx=60,Fx,Tx=null;class Fn{static get now(){return Sx}static set now(t){Sx=t}static set defaultZone(t){Ex=t}static get defaultZone(){return Lr(Ex,ep.instance)}static get defaultLocale(){return Rx}static set defaultLocale(t){Rx=t}static get defaultNumberingSystem(){return Dx}static set defaultNumberingSystem(t){Dx=t}static get defaultOutputCalendar(){return _x}static set defaultOutputCalendar(t){_x=t}static get defaultWeekSettings(){return Tx}static set defaultWeekSettings(t){Tx=Jy(t)}static get twoDigitCutoffYear(){return xx}static set twoDigitCutoffYear(t){xx=t%100}static get throwOnInvalid(){return Fx}static set throwOnInvalid(t){Fx=t}static resetCaches(){en.resetCache(),Xs.resetCache(),tt.resetCache(),l4()}}class Wo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Px=[0,31,59,90,120,151,181,212,243,273,304,334],Ix=[0,31,60,91,121,152,182,213,244,274,305,335];function go(e,t){return new Wo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Yy(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const o=i.getUTCDay();return o===0?7:o}function Ax(e,t,n){return n+(nd(e)?Ix:Px)[t-1]}function kx(e,t){const n=nd(e)?Ix:Px,i=n.findIndex(s=>s<t),o=t-n[i];return{month:i+1,day:o}}function Zy(e,t){return(e-t+7)%7+1}function np(e,t=4,n=1){const{year:i,month:o,day:s}=e,r=Ax(i,o,s),a=Zy(Yy(i,o,s),n);let l=Math.floor((r-a+14-t)/7),c;return l<1?(c=i-1,l=id(c,t,n)):l>id(i,t,n)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...lp(e)}}function Ox(e,t=4,n=1){const{weekYear:i,weekNumber:o,weekday:s}=e,r=Zy(Yy(i,1,t),n),a=tc(i);let l=o*7+s-r-7+t,c;l<1?(c=i-1,l+=tc(c)):l>a?(c=i+1,l-=tc(i)):c=i;const{month:u,day:d}=kx(c,l);return{year:c,month:u,day:d,...lp(e)}}function Xy(e){const{year:t,month:n,day:i}=e,o=Ax(t,n,i);return{year:t,ordinal:o,...lp(e)}}function Mx(e){const{year:t,ordinal:n}=e,{month:i,day:o}=kx(t,n);return{year:t,month:i,day:o,...lp(e)}}function Lx(e,t){if(!Dt(e.localWeekday)||!Dt(e.localWeekNumber)||!Dt(e.localWeekYear)){if(!Dt(e.weekday)||!Dt(e.weekNumber)||!Dt(e.weekYear))throw new Ql("Cannot mix locale-based week fields with ISO-based week fields");return Dt(e.localWeekday)||(e.weekday=e.localWeekday),Dt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Dt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function c4(e,t=4,n=1){const i=ip(e.weekYear),o=mo(e.weekNumber,1,id(e.weekYear,t,n)),s=mo(e.weekday,1,7);return i?o?s?!1:go("weekday",e.weekday):go("week",e.weekNumber):go("weekYear",e.weekYear)}function u4(e){const t=ip(e.year),n=mo(e.ordinal,1,tc(e.year));return t?n?!1:go("ordinal",e.ordinal):go("year",e.year)}function Nx(e){const t=ip(e.year),n=mo(e.month,1,12),i=mo(e.day,1,op(e.year,e.month));return t?n?i?!1:go("day",e.day):go("month",e.month):go("year",e.year)}function Vx(e){const{hour:t,minute:n,second:i,millisecond:o}=e,s=mo(t,0,23)||t===24&&n===0&&i===0&&o===0,r=mo(n,0,59),a=mo(i,0,59),l=mo(o,0,999);return s?r?a?l?!1:go("millisecond",o):go("second",i):go("minute",n):go("hour",t)}function Dt(e){return typeof e>"u"}function Nr(e){return typeof e=="number"}function ip(e){return typeof e=="number"&&e%1===0}function d4(e){return typeof e=="string"}function h4(e){return Object.prototype.toString.call(e)==="[object Date]"}function Bx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Hx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function f4(e){return Array.isArray(e)?e:[e]}function Gx(e,t,n){if(e.length!==0)return e.reduce((i,o)=>{const s=[t(o),o];return i&&n(i[0],s[0])===i[0]?i:s},null)[1]}function p4(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function ec(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Jy(e){if(e==null)return null;if(typeof e!="object")throw new ci("Week settings must be an object");if(!mo(e.firstDay,1,7)||!mo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!mo(t,1,7)))throw new ci("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function mo(e,t,n){return ip(e)&&e>=t&&e<=n}function g4(e,t){return e-t*Math.floor(e/t)}function $n(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function Vr(e){if(!(Dt(e)||e===null||e===""))return parseInt(e,10)}function Ga(e){if(!(Dt(e)||e===null||e===""))return parseFloat(e)}function Qy(e){if(!(Dt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function eC(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function nd(e){return e%4===0&&(e%100!==0||e%400===0)}function tc(e){return nd(e)?366:365}function op(e,t){const n=g4(t-1,12)+1,i=e+(t-n)/12;return n===2?nd(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function sp(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $x(e,t,n){return-Zy(Yy(e,1,t),n)+t-1}function id(e,t=4,n=1){const i=$x(e,t,n),o=$x(e+1,t,n);return(tc(e)-i+o)/7}function tC(e){return e>99?e:e>Fn.twoDigitCutoffYear?1900+e:2e3+e}function Wx(e,t,n,i=null){const o=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const r={timeZoneName:t,...s},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function rp(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-i:i;return n*60+o}function zx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new ci(`Invalid unit value ${e}`);return t}function ap(e,t){const n={};for(const i in e)if(ec(e,i)){const o=e[i];if(o==null)continue;n[t(i)]=zx(o)}return n}function od(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${$n(n,2)}:${$n(i,2)}`;case"narrow":return`${o}${n}${i>0?`:${i}`:""}`;case"techie":return`${o}${$n(n,2)}${$n(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function lp(e){return p4(e,["hour","minute","second","millisecond"])}const m4=["January","February","March","April","May","June","July","August","September","October","November","December"],Ux=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v4=["J","F","M","A","M","J","J","A","S","O","N","D"];function jx(e){switch(e){case"narrow":return[...v4];case"short":return[...Ux];case"long":return[...m4];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Kx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],y4=["M","T","W","T","F","S","S"];function Yx(e){switch(e){case"narrow":return[...y4];case"short":return[...qx];case"long":return[...Kx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Zx=["AM","PM"],C4=["Before Christ","Anno Domini"],w4=["BC","AD"],b4=["B","A"];function Xx(e){switch(e){case"narrow":return[...b4];case"short":return[...w4];case"long":return[...C4];default:return null}}function S4(e){return Zx[e.hour<12?0:1]}function E4(e,t){return Yx(t)[e.weekday-1]}function R4(e,t){return jx(t)[e.month-1]}function D4(e,t){return Xx(t)[e.year<0?0:1]}function _4(e,t,n="always",i=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=o[e],u=i?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return r?`${a} ${u} ago`:`in ${a} ${u}`}function Jx(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const x4={D:Qf,DD:Q_,DDD:ex,DDDD:tx,t:nx,tt:ix,ttt:ox,tttt:sx,T:rx,TT:ax,TTT:lx,TTTT:cx,f:ux,ff:hx,fff:px,ffff:mx,F:dx,FF:fx,FFF:gx,FFFF:vx};class ui{static create(t,n={}){return new ui(t,n)}static parseFormat(t){let n=null,i="",o=!1;const s=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((i.length>0||o)&&s.push({literal:o||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",o=!o):o||a===n?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,n=a)}return i.length>0&&s.push({literal:o||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(t){return x4[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return $n(t,n);const o={...this.opts};return n>0&&(o.padTo=n),i&&(o.signDisplay=i),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(f,g)=>this.loc.extract(t,f,g),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>i?S4(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,g)=>i?R4(t,f):s(g?{month:f}:{month:f,day:"numeric"},"month"),c=(f,g)=>i?E4(t,f):s(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const g=ui.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(t,g):f},d=f=>i?D4(t,f):s({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?s({day:"numeric"},"day"):this.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?s({month:"numeric"},"month"):this.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?s({year:"numeric"},"year"):this.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(f)}};return Jx(ui.parseFormat(n),h)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,o=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(u,d)=>h=>{const f=o(h);if(f){const g=d.isNegativeDuration&&f!==d.largestUnit?i:1;let m;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(u.get(f)*g,h.length,m)}else return h},r=ui.parseFormat(n),a=r.reduce((u,{literal:d,val:h})=>d?u:u.concat(h),[]),l=t.shiftTo(...a.map(o).filter(u=>u)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Jx(r,s(l,c))}}const Qx=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function nc(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function ic(...e){return t=>e.reduce(([n,i,o],s)=>{const[r,a,l]=s(t,o);return[{...n,...r},a||i,l]},[{},null,1]).slice(0,2)}function oc(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const o=n.exec(e);if(o)return i(o)}return[null,null]}function eF(...e){return(t,n)=>{const i={};let o;for(o=0;o<e.length;o++)i[e[o]]=Vr(t[n+o]);return[i,null,n+o]}}const tF=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,F4=`(?:${tF.source}?(?:\\[(${Qx.source})\\])?)?`,nC=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,nF=RegExp(`${nC.source}${F4}`),iC=RegExp(`(?:[Tt]${nF.source})?`),T4=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,P4=/(\d{4})-?W(\d\d)(?:-?(\d))?/,I4=/(\d{4})-?(\d{3})/,A4=eF("weekYear","weekNumber","weekDay"),k4=eF("year","ordinal"),O4=/(\d{4})-(\d\d)-(\d\d)/,iF=RegExp(`${nC.source} ?(?:${tF.source}|(${Qx.source}))?`),M4=RegExp(`(?: ${iF.source})?`);function sc(e,t,n){const i=e[t];return Dt(i)?n:Vr(i)}function L4(e,t){return[{year:sc(e,t),month:sc(e,t+1,1),day:sc(e,t+2,1)},null,t+3]}function rc(e,t){return[{hours:sc(e,t,0),minutes:sc(e,t+1,0),seconds:sc(e,t+2,0),milliseconds:Qy(e[t+3])},null,t+4]}function sd(e,t){const n=!e[t]&&!e[t+1],i=rp(e[t+1],e[t+2]),o=n?null:Ei.instance(i);return[{},o,t+3]}function rd(e,t){const n=e[t]?Xs.create(e[t]):null;return[{},n,t+1]}const N4=RegExp(`^T?${nC.source}$`),V4=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function B4(e){const[t,n,i,o,s,r,a,l,c]=e,u=t[0]==="-",d=l&&l[0]==="-",h=(f,g=!1)=>f!==void 0&&(g||f&&u)?-f:f;return[{years:h(Ga(n)),months:h(Ga(i)),weeks:h(Ga(o)),days:h(Ga(s)),hours:h(Ga(r)),minutes:h(Ga(a)),seconds:h(Ga(l),l==="-0"),milliseconds:h(Qy(c),d)}]}const H4={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function oC(e,t,n,i,o,s,r){const a={year:t.length===2?tC(Vr(t)):Vr(t),month:Ux.indexOf(n)+1,day:Vr(i),hour:Vr(o),minute:Vr(s)};return r&&(a.second=Vr(r)),e&&(a.weekday=e.length>3?Kx.indexOf(e)+1:qx.indexOf(e)+1),a}const G4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function $4(e){const[,t,n,i,o,s,r,a,l,c,u,d]=e,h=oC(t,o,i,n,s,r,a);let f;return l?f=H4[l]:c?f=0:f=rp(u,d),[h,new Ei(f)]}function W4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const z4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,U4=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,j4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function oF(e){const[,t,n,i,o,s,r,a]=e;return[oC(t,o,i,n,s,r,a),Ei.utcInstance]}function K4(e){const[,t,n,i,o,s,r,a]=e;return[oC(t,a,n,i,o,s,r),Ei.utcInstance]}const q4=nc(T4,iC),Y4=nc(P4,iC),Z4=nc(I4,iC),X4=nc(nF),sF=ic(L4,rc,sd,rd),J4=ic(A4,rc,sd,rd),Q4=ic(k4,rc,sd,rd),e6=ic(rc,sd,rd);function t6(e){return oc(e,[q4,sF],[Y4,J4],[Z4,Q4],[X4,e6])}function n6(e){return oc(W4(e),[G4,$4])}function i6(e){return oc(e,[z4,oF],[U4,oF],[j4,K4])}function o6(e){return oc(e,[V4,B4])}const s6=ic(rc);function r6(e){return oc(e,[N4,s6])}const a6=nc(O4,M4),l6=nc(iF),c6=ic(rc,sd,rd);function u6(e){return oc(e,[a6,sF],[l6,c6])}const rF="Invalid Duration",aF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},d6={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...aF},vo=146097/400,ac=146097/4800,h6={years:{quarters:4,months:12,weeks:vo/7,days:vo,hours:vo*24,minutes:vo*24*60,seconds:vo*24*60*60,milliseconds:vo*24*60*60*1e3},quarters:{months:3,weeks:vo/28,days:vo/4,hours:vo*24/4,minutes:vo*24*60/4,seconds:vo*24*60*60/4,milliseconds:vo*24*60*60*1e3/4},months:{weeks:ac/7,days:ac,hours:ac*24,minutes:ac*24*60,seconds:ac*24*60*60,milliseconds:ac*24*60*60*1e3},...aF},$a=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],f6=$a.slice(0).reverse();function Js(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Wt(i)}function lF(e,t){let n=t.milliseconds??0;for(const i of f6.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function cF(e,t){const n=lF(e,t)<0?-1:1;$a.reduceRight((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]*n,r=e[o][i],a=Math.floor(s/r);t[o]+=a*n,t[i]-=a*r*n}return o},null),$a.reduce((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]%1;t[i]-=s,t[o]+=s*e[i][o]}return o},null)}function uF(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Wt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?h6:d6;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||en.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Wt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ci(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Wt({values:ap(t,Wt.normalizeUnit),loc:en.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Nr(t))return Wt.fromMillis(t);if(Wt.isDuration(t))return t;if(typeof t=="object")return Wt.fromObject(t);throw new ci(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=o6(t);return i?Wt.fromObject(i,n):Wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=r6(t);return i?Wt.fromObject(i,n):Wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Duration is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new B3(i);return new Wt({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new J_(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?ui.create(this.loc,i).formatDurationFromString(this,t):rF}toHuman(t={}){if(!this.isValid)return rF;const n=t.showZeros!==!1,i=$a.map(o=>{const s=this.values[o];return Dt(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(s)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=eC(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},tt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?lF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t),i={};for(const o of $a)(ec(n.values,o)||ec(this.values,o))&&(i[o]=n.get(o)+this.get(o));return Js(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zx(t(this.values[i],i));return Js(this,{values:n},!0)}get(t){return this[Wt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...ap(t,Wt.normalizeUnit)};return Js(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:i};return Js(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return cF(this.matrix,t),Js(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=uF(this.normalize().shiftToAll().toObject());return Js(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>Wt.normalizeUnit(r));const n={},i={},o=this.toObject();let s;for(const r of $a)if(t.indexOf(r)>=0){s=r;let a=0;for(const c in i)a+=this.matrix[c][r]*i[c],i[c]=0;Nr(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else Nr(o[r])&&(i[r]=o[r]);for(const r in i)i[r]!==0&&(n[s]+=r===s?i[r]:i[r]/this.matrix[s][r]);return cF(this.matrix,n),Js(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Js(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=uF(this.values);return Js(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,o){return i===void 0||i===0?o===void 0||o===0:i===o}for(const i of $a)if(!n(this.values[i],t.values[i]))return!1;return!0}}const lc="Invalid Interval";function p6(e,t){return!e||!e.isValid?Tn.invalid("missing or invalid start"):!t||!t.isValid?Tn.invalid("missing or invalid end"):t<e?Tn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Tn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Interval is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new V3(i);return new Tn({invalid:i})}static fromDateTimes(t,n){const i=cd(t),o=cd(n),s=p6(i,o);return s??new Tn({start:i,end:o})}static after(t,n){const i=Wt.fromDurationLike(n),o=cd(t);return Tn.fromDateTimes(o,o.plus(i))}static before(t,n){const i=Wt.fromDurationLike(n),o=cd(t);return Tn.fromDateTimes(o.minus(i),o)}static fromISO(t,n){const[i,o]=(t||"").split("/",2);if(i&&o){let s,r;try{s=tt.fromISO(i,n),r=s.isValid}catch{r=!1}let a,l;try{a=tt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Tn.fromDateTimes(s,a);if(r){const c=Wt.fromISO(o,n);if(c.isValid)return Tn.after(s,c)}else if(l){const c=Wt.fromISO(i,n);if(c.isValid)return Tn.before(a,c)}}return Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:i.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(i,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Tn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(cd).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),i=[];let{s:o}=this,s=0;for(;o<this.e;){const r=n[s]||this.e,a=+r>+this.e?this.e:r;i.push(Tn.fromDateTimes(o,a)),o=a,s+=1}return i}splitBy(t){const n=Wt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,o=1,s;const r=[];for(;i<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));s=+a>+this.e?this.e:a,r.push(Tn.fromDateTimes(i,s)),i=s,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:Tn.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Tn.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((o,s)=>o.s-s.s).reduce(([o,s],r)=>s?s.overlaps(r)||s.abutsStart(r)?[o,s.union(r)]:[o.concat([s]),r]:[o,r],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const o=[],s=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...s),a=r.sort((l,c)=>l.time-c.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&o.push(Tn.fromDateTimes(n,l.time)),n=null);return Tn.merge(o)}difference(...t){return Tn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:lc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Qf,n={}){return this.isValid?ui.create(this.s.loc.clone(n),t).formatInterval(this):lc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:lc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:lc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:lc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:lc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Wt.invalid(this.invalidReason)}mapEndpoints(t){return Tn.fromDateTimes(t(this.s),t(this.e))}}class cc{static hasDST(t=Fn.defaultZone){const n=tt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Xs.isValidZone(t)}static normalizeZone(t){return Lr(t,Fn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||en.create(n,i,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||en.create(n,i,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||en.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||en.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return en.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return en.create(n,null,"gregory").eras(t)}static features(){return{relative:Bx(),localeWeek:Hx()}}}function dF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Wt.fromMillis(i).as("days"))}function g6(e,t,n){const i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=dF(l,c);return(u-u%7)/7}],["days",dF]],o={},s=e;let r,a;for(const[l,c]of i)n.indexOf(l)>=0&&(r=l,o[l]=c(e,t),a=s.plus(o),a>t?(o[l]--,e=s.plus(o),e>t&&(a=e,o[l]--,e=s.plus(o))):e=a);return[e,o,a,r]}function m6(e,t,n,i){let[o,s,r,a]=g6(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const u=Wt.fromObject(s,i);return c.length>0?Wt.fromMillis(l,i).shiftTo(...c).plus(u):u}const v6="missing Intl.DateTimeFormat.formatToParts support";function Yt(e,t=n=>n){return{regex:e,deser:([n])=>t(a4(n))}}const hF="[ ]",fF=new RegExp(hF,"g");function y6(e){return e.replace(/\./g,"\\.?").replace(fF,hF)}function pF(e){return e.replace(/\./g,"").replace(fF," ").toLowerCase()}function zo(e,t){return e===null?null:{regex:RegExp(e.map(y6).join("|")),deser:([n])=>e.findIndex(i=>pF(n)===pF(i))+t}}function gF(e,t){return{regex:e,deser:([,n,i])=>rp(n,i),groups:t}}function cp(e){return{regex:e,deser:([t])=>t}}function C6(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function w6(e,t){const n=$o(t),i=$o(t,"{2}"),o=$o(t,"{3}"),s=$o(t,"{4}"),r=$o(t,"{6}"),a=$o(t,"{1,2}"),l=$o(t,"{1,3}"),c=$o(t,"{1,6}"),u=$o(t,"{1,9}"),d=$o(t,"{2,4}"),h=$o(t,"{4,6}"),f=y=>({regex:RegExp(C6(y.val)),deser:([b])=>b,literal:!0}),m=(y=>{if(e.literal)return f(y);switch(y.val){case"G":return zo(t.eras("short"),0);case"GG":return zo(t.eras("long"),0);case"y":return Yt(c);case"yy":return Yt(d,tC);case"yyyy":return Yt(s);case"yyyyy":return Yt(h);case"yyyyyy":return Yt(r);case"M":return Yt(a);case"MM":return Yt(i);case"MMM":return zo(t.months("short",!0),1);case"MMMM":return zo(t.months("long",!0),1);case"L":return Yt(a);case"LL":return Yt(i);case"LLL":return zo(t.months("short",!1),1);case"LLLL":return zo(t.months("long",!1),1);case"d":return Yt(a);case"dd":return Yt(i);case"o":return Yt(l);case"ooo":return Yt(o);case"HH":return Yt(i);case"H":return Yt(a);case"hh":return Yt(i);case"h":return Yt(a);case"mm":return Yt(i);case"m":return Yt(a);case"q":return Yt(a);case"qq":return Yt(i);case"s":return Yt(a);case"ss":return Yt(i);case"S":return Yt(l);case"SSS":return Yt(o);case"u":return cp(u);case"uu":return cp(a);case"uuu":return Yt(n);case"a":return zo(t.meridiems(),0);case"kkkk":return Yt(s);case"kk":return Yt(d,tC);case"W":return Yt(a);case"WW":return Yt(i);case"E":case"c":return Yt(n);case"EEE":return zo(t.weekdays("short",!1),1);case"EEEE":return zo(t.weekdays("long",!1),1);case"ccc":return zo(t.weekdays("short",!0),1);case"cccc":return zo(t.weekdays("long",!0),1);case"Z":case"ZZ":return gF(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return gF(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return cp(/[a-z_+-/]{1,256}?/i);case" ":return cp(/[^\S\n\r]/);default:return f(y)}})(e)||{invalidReason:v6};return m.token=e,m}const b6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function S6(e,t,n){const{type:i,value:o}=e;if(i==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const s=t[i];let r=i;i==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=b6[r];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function E6(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function R6(e,t,n){const i=e.match(t);if(i){const o={};let s=1;for(const r in n)if(ec(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,o]}else return[i,{}]}function D6(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Dt(e.z)||(n=Xs.create(e.z)),Dt(e.Z)||(n||(n=new Ei(e.Z)),i=e.Z),Dt(e.q)||(e.M=(e.q-1)*3+1),Dt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Dt(e.u)||(e.S=Qy(e.u)),[Object.keys(e).reduce((s,r)=>{const a=t(r);return a&&(s[a]=e[r]),s},{}),n,i]}let sC=null;function _6(){return sC||(sC=tt.fromMillis(1555555555555)),sC}function x6(e,t){if(e.literal)return e;const n=ui.macroTokenToFormatOpts(e.val),i=CF(n,t);return i==null||i.includes(void 0)?e:i}function mF(e,t){return Array.prototype.concat(...e.map(n=>x6(n,t)))}class vF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=mF(ui.parseFormat(n),t),this.units=this.tokens.map(i=>w6(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,o]=E6(this.units);this.regex=RegExp(i,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,i]=R6(t,this.regex,this.handlers),[o,s,r]=i?D6(i):[null,null,void 0];if(ec(i,"a")&&ec(i,"H"))throw new Ql("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:o,zone:s,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function yF(e,t,n){return new vF(e,n).explainFromTokens(t)}function F6(e,t,n){const{result:i,zone:o,specificOffset:s,invalidReason:r}=yF(e,t,n);return[i,o,s,r]}function CF(e,t){if(!e)return null;const i=ui.create(t,e).dtFormatter(_6()),o=i.formatToParts(),s=i.resolvedOptions();return o.map(r=>S6(r,e,s))}const rC="Invalid DateTime",wF=864e13;function ad(e){return new Wo("unsupported zone",`the zone "${e.name}" is not supported`)}function aC(e){return e.weekData===null&&(e.weekData=np(e.c)),e.weekData}function lC(e){return e.localWeekData===null&&(e.localWeekData=np(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Wa(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new tt({...n,...t,old:n})}function bF(e,t,n){let i=e-t*60*1e3;const o=n.offset(i);if(t===o)return[i,t];i-=(o-t)*60*1e3;const s=n.offset(i);return o===s?[i,o]:[e-Math.min(o,s)*60*1e3,Math.max(o,s)]}function up(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function dp(e,t,n){return bF(sp(e),t,n)}function SF(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:i,month:o,day:Math.min(e.c.day,op(i,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=Wt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=sp(s);let[l,c]=bF(a,n,e.zone);return r!==0&&(l+=r,c=e.zone.offset(l)),{ts:l,o:c}}function uc(e,t,n,i,o,s){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=tt.fromObject(e,{...n,zone:l,specificOffset:s});return r?c:c.setZone(a)}else return tt.invalid(new Wo("unparsable",`the input "${o}" can't be parsed as ${i}`))}function hp(e,t,n=!0){return e.isValid?ui.create(en.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function cC(e,t,n){const i=e.c.year>9999||e.c.year<0;let o="";if(i&&e.c.year>=0&&(o+="+"),o+=$n(e.c.year,i?6:4),n==="year")return o;if(t){if(o+="-",o+=$n(e.c.month),n==="month")return o;o+="-"}else if(o+=$n(e.c.month),n==="month")return o;return o+=$n(e.c.day),o}function EF(e,t,n,i,o,s,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=$n(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=$n(e.c.minute),r==="minute")break;a&&(l+=":",l+=$n(e.c.second))}else{if(l+=$n(e.c.minute),r==="minute")break;a&&(l+=$n(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=$n(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!s?l+="Z":e.o<0?(l+="-",l+=$n(Math.trunc(-e.o/60)),l+=":",l+=$n(Math.trunc(-e.o%60))):(l+="+",l+=$n(Math.trunc(e.o/60)),l+=":",l+=$n(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const RF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},T6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},P6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fp=["year","month","day","hour","minute","second","millisecond"],I6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],A6=["year","ordinal","hour","minute","second","millisecond"];function pp(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new J_(e);return t}function DF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return pp(e)}}function k6(e){if(ld===void 0&&(ld=Fn.now()),e.type!=="iana")return e.offset(ld);const t=e.name;let n=uC.get(t);return n===void 0&&(n=e.offset(ld),uC.set(t,n)),n}function _F(e,t){const n=Lr(t.zone,Fn.defaultZone);if(!n.isValid)return tt.invalid(ad(n));const i=en.fromObject(t);let o,s;if(Dt(e.year))o=Fn.now();else{for(const l of fp)Dt(e[l])&&(e[l]=RF[l]);const r=Nx(e)||Vx(e);if(r)return tt.invalid(r);const a=k6(n);[o,s]=dp(e,a,n)}return new tt({ts:o,zone:n,loc:i,o:s})}function xF(e,t,n){const i=Dt(n.round)?!0:n.round,o=Dt(n.rounding)?"trunc":n.rounding,s=(a,l)=>(a=eC(a,i||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return s(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return s(l,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function FF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let ld;const uC=new Map;class tt{constructor(t){const n=t.zone||Fn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Wo("invalid input"):null)||(n.isValid?null:ad(n));this.ts=Dt(t.ts)?Fn.now():t.ts;let o=null,s=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,s]=[t.old.c,t.old.o];else{const a=Nr(t.o)&&!t.old?t.o:n.offset(this.ts);o=up(this.ts,a),i=Number.isNaN(o.year)?new Wo("invalid input"):null,o=i?null:o,s=i?null:a}this._zone=n,this.loc=t.loc||en.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=o,this.o=s,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[t,n]=FF(arguments),[i,o,s,r,a,l,c]=n;return _F({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static utc(){const[t,n]=FF(arguments),[i,o,s,r,a,l,c]=n;return t.zone=Ei.utcInstance,_F({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const i=h4(t)?t.valueOf():NaN;if(Number.isNaN(i))return tt.invalid("invalid input");const o=Lr(n.zone,Fn.defaultZone);return o.isValid?new tt({ts:i,zone:o,loc:en.fromObject(n)}):tt.invalid(ad(o))}static fromMillis(t,n={}){if(Nr(t))return t<-wF||t>wF?tt.invalid("Timestamp out of range"):new tt({ts:t,zone:Lr(n.zone,Fn.defaultZone),loc:en.fromObject(n)});throw new ci(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Nr(t))return new tt({ts:t*1e3,zone:Lr(n.zone,Fn.defaultZone),loc:en.fromObject(n)});throw new ci("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=Lr(n.zone,Fn.defaultZone);if(!i.isValid)return tt.invalid(ad(i));const o=en.fromObject(n),s=ap(t,DF),{minDaysInFirstWeek:r,startOfWeek:a}=Lx(s,o),l=Fn.now(),c=Dt(n.specificOffset)?i.offset(l):n.specificOffset,u=!Dt(s.ordinal),d=!Dt(s.year),h=!Dt(s.month)||!Dt(s.day),f=d||h,g=s.weekYear||s.weekNumber;if((f||u)&&g)throw new Ql("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new Ql("Can't mix ordinal dates with month/day");const m=g||s.weekday&&!f;let y,b,S=up(l,c);m?(y=I6,b=T6,S=np(S,r,a)):u?(y=A6,b=P6,S=Xy(S)):(y=fp,b=RF);let F=!1;for(const k of y){const x=s[k];Dt(x)?F?s[k]=b[k]:s[k]=S[k]:F=!0}const C=m?c4(s,r,a):u?u4(s):Nx(s),R=C||Vx(s);if(R)return tt.invalid(R);const E=m?Ox(s,r,a):u?Mx(s):s,[_,I]=dp(E,c,i),O=new tt({ts:_,zone:i,o:I,loc:o});return s.weekday&&f&&t.weekday!==O.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${O.toISO()}`):O.isValid?O:tt.invalid(O.invalid)}static fromISO(t,n={}){const[i,o]=t6(t);return uc(i,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,o]=n6(t);return uc(i,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,o]=i6(t);return uc(i,o,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),[a,l,c,u]=F6(r,t,n);return u?tt.invalid(u):uc(a,l,i,`format ${n}`,t,c)}static fromString(t,n,i={}){return tt.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,o]=u6(t);return uc(i,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the DateTime is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new N3(i);return new tt({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=CF(t,en.fromObject(n));return i?i.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return mF(ui.parseFormat(t),en.fromObject(n)).map(o=>o.val).join("")}static resetCache(){ld=void 0,uC.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?aC(this).weekYear:NaN}get weekNumber(){return this.isValid?aC(this).weekNumber:NaN}get weekday(){return this.isValid?aC(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?lC(this).weekday:NaN}get localWeekNumber(){return this.isValid?lC(this).weekNumber:NaN}get localWeekYear(){return this.isValid?lC(this).weekYear:NaN}get ordinal(){return this.isValid?Xy(this.c).ordinal:NaN}get monthShort(){return this.isValid?cc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?cc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?cc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?cc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=sp(this.c),o=this.zone.offset(i-t),s=this.zone.offset(i+t),r=this.zone.offset(i-o*n),a=this.zone.offset(i-s*n);if(r===a)return[this];const l=i-r*n,c=i-a*n,u=up(l,r),d=up(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[Wa(this,{ts:l}),Wa(this,{ts:c})]:[this]}get isInLeapYear(){return nd(this.year)}get daysInMonth(){return op(this.year,this.month)}get daysInYear(){return this.isValid?tc(this.year):NaN}get weeksInWeekYear(){return this.isValid?id(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?id(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:o}=ui.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Ei.instance(t),n)}toLocal(){return this.setZone(Fn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=Lr(t,Fn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||i){const s=t.offset(this.ts),r=this.toObject();[o]=dp(r,s,t)}return Wa(this,{ts:o,zone:t})}else return tt.invalid(ad(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return Wa(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=ap(t,DF),{minDaysInFirstWeek:i,startOfWeek:o}=Lx(n,this.loc),s=!Dt(n.weekYear)||!Dt(n.weekNumber)||!Dt(n.weekday),r=!Dt(n.ordinal),a=!Dt(n.year),l=!Dt(n.month)||!Dt(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||r)&&u)throw new Ql("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Ql("Can't mix ordinal dates with month/day");let d;s?d=Ox({...np(this.c,i,o),...n},i,o):Dt(n.ordinal)?(d={...this.toObject(),...n},Dt(n.day)&&(d.day=Math.min(op(d.year,d.month),d.day))):d=Mx({...Xy(this.c),...n});const[h,f]=dp(d,this.o,this.zone);return Wa(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t);return Wa(this,SF(this,n))}minus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t).negate();return Wa(this,SF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},o=Wt.normalizeUnit(t);switch(o){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(o==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:r}=this;r<s&&(i.weekNumber=this.weekNumber-1),i.weekday=s}else i.weekday=1;if(o==="quarters"){const s=Math.ceil(this.month/3);i.month=(s-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?ui.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):rC}toLocaleString(t=Qf,n={}){return this.isValid?ui.create(this.loc.clone(n),t).formatDateTime(this):rC}toLocaleParts(t={}){return this.isValid?ui.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:o=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=pp(r);const a=t==="extended";let l=cC(this,a,r);return fp.indexOf(r)>=3&&(l+="T"),l+=EF(this,a,n,i,o,s,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?cC(this,t==="extended",pp(n)):null}toISOWeekDate(){return hp(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:o=!1,extendedZone:s=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=pp(a),(o&&fp.indexOf(a)>=3?"T":"")+EF(this,r==="extended",n,t,i,s,a)):null}toRFC2822(){return hp(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return hp(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?cC(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(i&&(o+=" "),n?o+="z":t&&(o+="ZZ")),hp(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():rC}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return Wt.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=f4(n).map(Wt.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,c=m6(a,l,s,o);return r?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(tt.now(),t,n)}until(t){return this.isValid?Tn.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const o=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,i)<=o&&o<=s.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||tt.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(o=t.unit,s=void 0),xF(n,this.plus(i),{...t,numeric:"always",units:o,unit:s})}toRelativeCalendar(t={}){return this.isValid?xF(t.base||tt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(tt.isDateTime))throw new ci("min requires all arguments be DateTimes");return Gx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(tt.isDateTime))throw new ci("max requires all arguments be DateTimes");return Gx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});return yF(r,t,n)}static fromStringExplain(t,n,i={}){return tt.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:o=null}=n,s=en.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return new vF(s,t)}static fromFormatParser(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});if(!r.equals(n.locale))throw new ci(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?tt.invalid(u):uc(a,l,i,`format ${n.format}`,t,c)}static get DATE_SHORT(){return Qf}static get DATE_MED(){return Q_}static get DATE_MED_WITH_WEEKDAY(){return H3}static get DATE_FULL(){return ex}static get DATE_HUGE(){return tx}static get TIME_SIMPLE(){return nx}static get TIME_WITH_SECONDS(){return ix}static get TIME_WITH_SHORT_OFFSET(){return ox}static get TIME_WITH_LONG_OFFSET(){return sx}static get TIME_24_SIMPLE(){return rx}static get TIME_24_WITH_SECONDS(){return ax}static get TIME_24_WITH_SHORT_OFFSET(){return lx}static get TIME_24_WITH_LONG_OFFSET(){return cx}static get DATETIME_SHORT(){return ux}static get DATETIME_SHORT_WITH_SECONDS(){return dx}static get DATETIME_MED(){return hx}static get DATETIME_MED_WITH_SECONDS(){return fx}static get DATETIME_MED_WITH_WEEKDAY(){return G3}static get DATETIME_FULL(){return px}static get DATETIME_FULL_WITH_SECONDS(){return gx}static get DATETIME_HUGE(){return mx}static get DATETIME_HUGE_WITH_SECONDS(){return vx}}function cd(e){if(tt.isDateTime(e))return e;if(e&&e.valueOf&&Nr(e.valueOf()))return tt.fromJSDate(e);if(e&&typeof e=="object")return tt.fromObject(e);throw new ci(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const TF="account.last_prefered_timezone",gp=300;function ud(e){if(!e)return null;if(tt.isDateTime(e))return e;if(e instanceof Date){const t=tt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=tt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=tt.fromISO(e);return t.isValid||(t=tt.fromRFC2822(e)),t.isValid?t:null}return null}function PF(e,t,n){const i=ud(e);if(!i)return"";const o=n?i.setZone(n):i;return o.isValid?o.toFormat(t):""}function O6(e,t){if(!e)return"";const n=tt.now().setZone(e);return n.isValid?n.toFormat(t):""}function M6(e,t){return O6(e,t)}const L6=e=>{const t=tt.now().setZone(e);if(!t.isValid)return"GMT+0";const n=t.offset,i=n>=0?"+":"-",o=Math.floor(Math.abs(n)/60),s=Math.abs(n)%60;return`GMT${i}${o}:${s.toString().padStart(2,"0")}`},dC=()=>L3(TF)||"UTC",IF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),mp=e=>e!=null&&e.length?e.map(IF):[],N6=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},AF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},V6=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),kF=(e,t)=>{var i,o,s,r;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[AF(e.start_date),AF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:((i=e==null?void 0:e.last_updated_by)==null?void 0:i.length)>0?"by "+((o=e.last_updated_by)==null?void 0:o.map(a=>a.display_name).join(", ")):"",value:PF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date?void 0:"Pending completion",value:PF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:(s=e.bulk_process)==null?void 0:s.message,isArchived:((r=e.property)==null?void 0:r.is_archived)===1||e.status==0};return V6(n)},OF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},hC=e=>e.toLowerCase().trim(),B6=e=>hC(e).split(/\s+/).filter(Boolean),MF=e=>e.replace(/(ing|ed|s)$/i,"");function H6(e){const t=new Set;for(const n of e){const i=MF(n);if(t.add(i),t.add(n),OF[i])for(const o of OF[i])t.add(MF(o))}return Array.from(t)}function G6(e,t){const n=hC(e),i=H6(B6(t));let o=0;for(const s of i)s&&(n.includes(s)&&(o+=s.length*2),n.startsWith(s)&&(o+=3));return o}function $6(e,t){const n=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t.split(/\s+/).filter(Boolean).map(n);if(!i.length)return e;const o=new RegExp(`(${i.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const vp=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?tt.fromISO(e,{zone:t}):e,o=tt.now().setZone(t||"local"),s=i.setZone(t||"local"),r=o.startOf("day"),l=s.startOf("day").diff(r,"days").days;let c="";if(l===0?c="Today":l===-1?c="Yesterday":l===1&&(c="Tomorrow"),c&&(n!=null&&n.includes("HH:mm"))){const u=s.toFormat("HH:mm");return`${c} at ${u}`}else if(c)return c;return s.toFormat(n)},fC=()=>"Asia/Saigon",LF=e=>`${tt.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,NF=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),W6=e=>{var R;const t=Z(((R=e.value)==null?void 0:R.map(E=>E.id))??[]),n=Z([]),i=Z(!1),o=_r(e,"workspaceId"),s=_r(e,"entityId"),r=_r(e,"id"),a=_r(e,"ids"),l=e.updateRowData,c=Z([]),{apiServices:u}=po(!!e.params,e),d=j(()=>{var O,k;const E=new Set(((O=e.value)==null?void 0:O.map(x=>x.id))??[]),_=((k=e.value)==null?void 0:k.map(x=>({...NF(x),selected:!0})))??[],I=n.value.filter(x=>!E.has(x.id));return Jf(_,I,"id")}),h=E=>{const _=d.value.find(I=>I.id===E);return _==null?void 0:_.data},f=()=>{var E;return(E=a.value)!=null&&E.length?a.value:[String(r.value)]},g=async(E,_,I)=>{if(i.value||!u.value)return!1;i.value=!0;try{const O=await E();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return _(),!0}catch(O){return console.error("API call error:",O),!1}finally{i.value=!1}},m=async()=>await g(()=>u.value.unAssignAll(String(o.value),String(s.value),f()),()=>{l({assignees:[],type:"removeAll"}),t.value=[]}),y=async E=>await g(()=>u.value.replaceAssignee(String(o.value),f(),[E]),()=>{t.value=[E];const I=h(E);I&&l({assignees:mp([I]),type:"overwrite"})}),b=async E=>await g(()=>u.value.addAssignee(String(o.value),f(),[E]),()=>{var O,k,x;t.value.push(E);const I=h(E);if(I){const P=(x=(k=(O=e.params)==null?void 0:O.api)==null?void 0:k.getRowNode(String(e.id)))==null?void 0:x.data,N=(P==null?void 0:P.assignees)||[],G=Jf([...N,...mp([I])],"id");l({assignees:G,type:"add"})}}),S=async E=>await g(()=>u.value.removeAssignee(String(o.value),f(),[E]),()=>{var k,x,P;const I=(P=(x=(k=e.params)==null?void 0:k.api)==null?void 0:x.getRowNode(String(e.id)))==null?void 0:P.data;t.value=t.value.filter(N=>N!==E);const O=mp(((I==null?void 0:I.assignees)||[]).filter(N=>N.id!==E));l({assignees:O,type:"remove"})});return{isSubmitting:i,options:c,unAssignAll:m,replaceAssignees:y,addAssignee:b,removeAssignee:S,handleSelect:E=>{const _=String(E.id);t.value.includes(_)?S(_):b(_)},openPeopleInsight:E=>{if(!E||!o.value)return;const _=Vo({type:"people_insight",config:{user_id:E,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(_,"_blank")},assigneeList:n,mergedOptions:d,selectedUserIds:t}},z6={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function U6(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Qs(e={}){const t={...z6,...e},n=Z(null),i=Z(null),o=Z(null),s=Z(!1),r=m=>{(m.key==="Escape"||m.key==="Esc")&&d()},a=()=>{o.value&&(o.value.destroy(),o.value=null,s.value=!1),document.removeEventListener("keydown",r)},l=m=>{const{showOnInit:y,alwaysShow:b,showArrow:S,debug:F,...C}=t;return{...C,content:m,theme:t.theme,trigger:b?"manual":t.trigger,placement:t.placement||"bottom-start",arrow:!1,offset:t.offset,interactive:t.interactive,appendTo:t.appendTo,animation:"fade",maxWidth:t.maxWidth||350,onShow:R=>{if(s.value=!0,document.addEventListener("keydown",r),e.onShow)return e.onShow(R)},onHide:R=>{if(b)return!1;if(s.value=!1,document.removeEventListener("keydown",r),e.onHide)return e.onHide(R)},onClickOutside:(R,E)=>{if(e.onClickOutside)return e.onClickOutside(R,E);b||R.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},c=()=>{var b;a();const m=U6(n),y=i.value;if(!(!m||!y)){y.style.display==="none"&&(y.style.display="");try{const S=l(y),F=Ar(m,S);o.value=Array.isArray(F)?F[0]:F,(t.showOnInit||t.alwaysShow)&&((b=o.value)==null||b.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}}},u=()=>{o.value&&o.value.show()},d=()=>{t.alwaysShow||o.value&&o.value.hide()},h=()=>{s.value?d():u()},f=m=>{o.value&&o.value.setContent(m)},g=m=>{o.value&&o.value.setProps(m)};return ct([n,i],c,{flush:"post"}),Yn(()=>{a()}),{instance:o,isVisible:s,show:u,hide:d,toggle:h,triggerRef:n,popupRef:i,destroyTippy:a,setContent:f,setProps:g}}const pC=(e,t,n)=>{const i=Z(n?"Copy link":"Copy"),o=()=>{setTimeout(()=>{i.value=n?"Copy link":"Copy"},3e3)};return{copyToClipboard:async()=>{try{return await navigator.clipboard.writeText(e),i.value="Copied",t&&t(),o(),!0}catch(r){return console.error("Failed to copy text to clipboard:",r),i.value="Copy failed",o(),!1}},tooltip:i}},j6=(e,t,n)=>{const i={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=Ao({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});hv(()=>{var E;((E=e.value)==null?void 0:E.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const s=()=>{var k,x,P,N,G,ie,B,H;t("tracing",JSON.parse(JSON.stringify(n.value)));const E=((x=(k=o.startDate)==null?void 0:k.getTime)==null?void 0:x.call(k))!==((N=(P=o.cacheStartDate)==null?void 0:P.getTime)==null?void 0:N.call(P)),_=((ie=(G=o.endDate)==null?void 0:G.getTime)==null?void 0:ie.call(G))!==((H=(B=o.cacheEndDate)==null?void 0:B.getTime)==null?void 0:H.call(B)),I=o.startDate===null,O=o.endDate===null;E&&_&&I&&O?t("clearAll"):E&&!_?I?t("clearStart"):t("update:start",o.startDate):_&&!E?O?t("clearDue"):t("update:end",o.endDate):E&&_&&t("update",[o.startDate,o.endDate]),t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=E||_},r=(E,_)=>{const I=tt.fromObject({year:E.year,month:E.month,day:E.day},{zone:o.timezone});return(_==="start"?I.startOf("day"):I.endOf("day")).toJSDate()},a=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},l=E=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=E,o.rangeFeedback.message=E==="swap"?i.swap:i.truncate)},c=E=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&a();return}if(E==="select-start"){const _={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",_),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,l("truncate")}else{const _={start:o.startDate,end:o.endDate},I=o.startDate;o.startDate=o.endDate,o.endDate=I,t("range:invalid",_),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),l("swap")}}},u=(E,_=!0)=>{e.disabled||e.readOnly||(o.startDate=r(E,"start"),_?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),c("select-start"))},d=E=>{e.disabled||e.readOnly||(o.endDate=r(E,"end"),c("select-end"))},h=()=>{e.disabled||e.readOnly||(o.startDate=null,a())},f=()=>{e.disabled||e.readOnly||(o.endDate=null,a())},g=()=>{e.disabled||e.readOnly||(o.startDate=null,o.endDate=null,a(),y())},m=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},y=()=>{e.disabled||e.readOnly||(s(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},b=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,a(),o.isDirty=!1)},S=j(()=>o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),F=j(()=>o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),C=j(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),R=j(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:S,displayEndDate:F,tooltipStartDate:C,tooltipEndDate:R,selectEndDate:d,selectStartDate:u,clearDue:f,clearStart:h,clearAll:g,beginInteraction:m,confirmSelection:y,cancelSelection:b}},VF="MMM dd",K6=e=>{const t=e.timezone,n=j(()=>e.start?vp({date:ud(e.start),timezone:t,format:VF}):"No start"),i=j(()=>e.end?vp({date:ud(e.end),timezone:t,format:VF}):"No due"),o=d=>{if(!d)return null;const h=tt.now().setZone(t).startOf("day"),f=tt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const g=f.diff(h,"days").days;return g===0?"today":g===1?"tomorrow":g===-1?"yesterday":g<-1?"past":"future"},s=j(()=>o(e.start)),r=j(()=>o(e.end)),a=j(()=>{if(n.value==="No start")return["empty"];const d=[];return s.value&&d.push(`start-${s.value}`),e.isStarted&&d.push("actual"),d}),l=j(()=>{if(i.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),c=j(()=>e.start?vp({date:ud(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=j(()=>e.end?vp({date:ud(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:i,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},q6="UserCache",Y6="user",Z6=()=>{const e=Z({}),{getCachedValue:t,setCachedValue:n}=Uu({dbName:q6,storeName:Y6}),i=async c=>c?await t(c):null;return{getCachedUser:i,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>i(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=Jf(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},X6={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let dd=0,qi=null;function J6(e){return qi||(qi=document.createElement("div"),qi.className="popup-overlay",qi.style.cssText=`
|
|
57
|
+
*/function OD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OD(Object(n),!0).forEach(function(i){RH(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function SH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MD(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,LD(i.key),i)}}function EH(e,t,n){return t&&MD(e.prototype,t),n&&MD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RH(e,t,n){return t=LD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Of.apply(this,arguments)}function DH(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function LD(e){var t=DH(e,"string");return typeof t=="symbol"?t:String(t)}var ND={exports:{}};(function(e){typeof window>"u"||function(t){var n=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,i=t.Blob&&function(){try{return!!new Blob}catch{return!1}}(),o=i&&t.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,r=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,a=(i||s)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(l){var c,u,d,h,f,g,m,y,b;if(c=l.match(r),!c)throw new Error("invalid data URI");for(u=c[2]?c[1]:"text/plain"+(c[3]||";charset=US-ASCII"),d=!!c[4],h=l.slice(c[0].length),d?f=atob(h):f=decodeURIComponent(h),g=new ArrayBuffer(f.length),m=new Uint8Array(g),y=0;y<f.length;y+=1)m[y]=f.charCodeAt(y);return i?new Blob([o?m:g],{type:u}):(b=new s,b.append(g),b.getBlob(u))};t.HTMLCanvasElement&&!n.toBlob&&(n.mozGetAsFile?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){u&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.mozGetAsFile("blob",c))})}:n.toDataURL&&a&&(n.msToBlob?n.toBlob=function(l,c,u){var d=this;setTimeout(function(){(c&&c!=="image/png"||u)&&n.toDataURL&&a?l(a(d.toDataURL(c,u))):l(d.msToBlob(c))})}:n.toBlob=function(l,c,u){var d=this;setTimeout(function(){l(a(d.toDataURL(c,u)))})})),e.exports?e.exports=a:t.dataURLtoBlob=a}(window)})(ND);var VD=ND.exports,_H=function(t){return typeof Blob>"u"?!1:t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"},BD={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},xH=typeof window<"u"&&typeof window.document<"u",kr=xH?window:{},Mf=function(t){return t>0&&t<1/0},FH=Array.prototype.slice;function ay(e){return Array.from?Array.from(e):FH.call(e)}var TH=/^image\/.+$/;function ly(e){return TH.test(e)}function PH(e){var t=ly(e)?e.substr(6):"";return t==="jpeg"&&(t="jpg"),".".concat(t)}var HD=String.fromCharCode;function IH(e,t,n){var i="",o;for(n+=t,o=t;o<n;o+=1)i+=HD(e.getUint8(o));return i}var AH=kr.btoa;function GD(e,t){for(var n=[],i=8192,o=new Uint8Array(e);o.length>0;)n.push(HD.apply(null,ay(o.subarray(0,i)))),o=o.subarray(i);return"data:".concat(t,";base64,").concat(AH(n.join("")))}function kH(e){var t=new DataView(e),n;try{var i,o,s;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var r=t.byteLength,a=2;a+1<r;){if(t.getUint8(a)===255&&t.getUint8(a+1)===225){o=a;break}a+=1}if(o){var l=o+4,c=o+10;if(IH(t,l,4)==="Exif"){var u=t.getUint16(c);if(i=u===18761,(i||u===19789)&&t.getUint16(c+2,i)===42){var d=t.getUint32(c+4,i);d>=8&&(s=c+d)}}}if(s){var h=t.getUint16(s,i),f,g;for(g=0;g<h;g+=1)if(f=s+g*12+2,t.getUint16(f,i)===274){f+=8,n=t.getUint16(f,i),t.setUint16(f,1,i);break}}}catch{n=1}return n}function OH(e){var t=0,n=1,i=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:i=-1;break;case 5:t=90,i=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:n,scaleY:i}}var MH=/\.\d*(?:0|9){12}\d*$/;function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return MH.test(e)?Math.round(e*t)/t:e}function Wu(e){var t=e.aspectRatio,n=e.height,i=e.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=Mf(i),r=Mf(n);if(s&&r){var a=n*t;(o==="contain"||o==="none")&&a>i||o==="cover"&&a<i?n=i/t:i=n*t}else s?n=i/t:r&&(i=n*t);return{width:i,height:n}}function LH(e){for(var t=ay(new Uint8Array(e)),n=t.length,i=[],o=0;o+3<n;){var s=t[o],r=t[o+1];if(s===255&&r===218)break;if(s===255&&r===216)o+=2;else{var a=t[o+2]*256+t[o+3],l=o+a+2,c=t.slice(o,l);i.push(c),o=l}}return i.reduce(function(u,d){return d[0]===255&&d[1]===225?u.concat(d):u},[])}function NH(e,t){var n=ay(new Uint8Array(e));if(n[2]!==255||n[3]!==224)return e;var i=n[4]*256+n[5],o=[255,216].concat(t,n.slice(4+i));return new Uint8Array(o)}var VH=kr.ArrayBuffer,cy=kr.FileReader,Ma=kr.URL||kr.webkitURL,BH=/\.\w+$/,HH=kr.Compressor,GH=function(){function e(t,n){SH(this,e),this.file=t,this.exif=[],this.image=new Image,this.options=kf(kf({},BD),n),this.aborted=!1,this.result=null,this.init()}return EH(e,[{key:"init",value:function(){var n=this,i=this.file,o=this.options;if(!_H(i)){this.fail(new Error("The first argument must be a File or Blob object."));return}var s=i.type;if(!ly(s)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!Ma||!cy){this.fail(new Error("The current browser does not support image compression."));return}VH||(o.checkOrientation=!1,o.retainExif=!1);var r=s==="image/jpeg",a=r&&o.checkOrientation,l=r&&o.retainExif;if(Ma&&!a&&!l)this.load({url:Ma.createObjectURL(i)});else{var c=new cy;this.reader=c,c.onload=function(u){var d=u.target,h=d.result,f={},g=1;a&&(g=kH(h),g>1&&Of(f,OH(g))),l&&(n.exif=LH(h)),a||l?!Ma||g>1?f.url=GD(h,s):f.url=Ma.createObjectURL(i):f.url=h,n.load(f)},c.onabort=function(){n.fail(new Error("Aborted to read the image with FileReader."))},c.onerror=function(){n.fail(new Error("Failed to read the image with FileReader."))},c.onloadend=function(){n.reader=null},a||l?c.readAsArrayBuffer(i):c.readAsDataURL(i)}}},{key:"load",value:function(n){var i=this,o=this.file,s=this.image;s.onload=function(){i.draw(kf(kf({},n),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){i.fail(new Error("Aborted to load the image."))},s.onerror=function(){i.fail(new Error("Failed to load the image."))},kr.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(kr.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=o.name,s.src=n.url}},{key:"draw",value:function(n){var i=this,o=n.naturalWidth,s=n.naturalHeight,r=n.rotate,a=r===void 0?0:r,l=n.scaleX,c=l===void 0?1:l,u=n.scaleY,d=u===void 0?1:u,h=this.file,f=this.image,g=this.options,m=document.createElement("canvas"),y=m.getContext("2d"),b=Math.abs(a)%180===90,S=(g.resize==="contain"||g.resize==="cover")&&Mf(g.width)&&Mf(g.height),F=Math.max(g.maxWidth,0)||1/0,C=Math.max(g.maxHeight,0)||1/0,R=Math.max(g.minWidth,0)||0,E=Math.max(g.minHeight,0)||0,_=o/s,I=g.width,O=g.height;if(b){var k=[C,F];F=k[0],C=k[1];var x=[E,R];R=x[0],E=x[1];var P=[O,I];I=P[0],O=P[1]}S&&(_=I/O);var N=Wu({aspectRatio:_,width:F,height:C},"contain");F=N.width,C=N.height;var G=Wu({aspectRatio:_,width:R,height:E},"cover");if(R=G.width,E=G.height,S){var ie=Wu({aspectRatio:_,width:I,height:O},g.resize);I=ie.width,O=ie.height}else{var B=Wu({aspectRatio:_,width:I,height:O}),H=B.width;I=H===void 0?o:H;var X=B.height;O=X===void 0?s:X}I=Math.floor($D(Math.min(Math.max(I,R),F))),O=Math.floor($D(Math.min(Math.max(O,E),C)));var $=-I/2,ce=-O/2,ue=I,De=O,ae=[];if(S){var Fe=0,Me=0,Je=o,pt=s,Mt=Wu({aspectRatio:_,width:o,height:s},{contain:"cover",cover:"contain"}[g.resize]);Je=Mt.width,pt=Mt.height,Fe=(o-Je)/2,Me=(s-pt)/2,ae.push(Fe,Me,Je,pt)}if(ae.push($,ce,ue,De),b){var Be=[O,I];I=Be[0],O=Be[1]}m.width=I,m.height=O,ly(g.mimeType)||(g.mimeType=h.type);var jt="transparent";h.size>g.convertSize&&g.convertTypes.indexOf(g.mimeType)>=0&&(g.mimeType="image/jpeg");var nn=g.mimeType==="image/jpeg";if(nn&&(jt="#fff"),y.fillStyle=jt,y.fillRect(0,0,I,O),g.beforeDraw&&g.beforeDraw.call(this,y,m),!this.aborted&&(y.save(),y.translate(I/2,O/2),y.rotate(a*Math.PI/180),y.scale(c,d),y.drawImage.apply(y,[f].concat(ae)),y.restore(),g.drew&&g.drew.call(this,y,m),!this.aborted)){var Ot=function(Y){if(!i.aborted){var pe=function(Ve){return i.done({naturalWidth:o,naturalHeight:s,result:Ve})};if(Y&&nn&&g.retainExif&&i.exif&&i.exif.length>0){var Te=function(Ve){return pe(VD(GD(NH(Ve,i.exif),g.mimeType)))};if(Y.arrayBuffer)Y.arrayBuffer().then(Te).catch(function(){i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var Ee=new cy;i.reader=Ee,Ee.onload=function(_e){var Ve=_e.target;Te(Ve.result)},Ee.onabort=function(){i.fail(new Error("Aborted to read the compressed image with FileReader."))},Ee.onerror=function(){i.fail(new Error("Failed to read the compressed image with FileReader."))},Ee.onloadend=function(){i.reader=null},Ee.readAsArrayBuffer(Y)}}else pe(Y)}};m.toBlob?m.toBlob(Ot,g.mimeType,g.quality):Ot(VD(m.toDataURL(g.mimeType,g.quality)))}}},{key:"done",value:function(n){var i=n.naturalWidth,o=n.naturalHeight,s=n.result,r=this.file,a=this.image,l=this.options;if(Ma&&a.src.indexOf("blob:")===0&&Ma.revokeObjectURL(a.src),s)if(l.strict&&!l.retainExif&&s.size>r.size&&l.mimeType===r.type&&!(l.width>i||l.height>o||l.minWidth>i||l.minHeight>o||l.maxWidth<i||l.maxHeight<o))s=r;else{var c=new Date;s.lastModified=c.getTime(),s.lastModifiedDate=c,s.name=r.name,s.name&&s.type!==r.type&&(s.name=s.name.replace(BH,PH(s.type)))}else s=r;this.result=s,l.success&&l.success.call(this,s)}},{key:"fail",value:function(n){var i=this.options;if(i.error)i.error.call(this,n);else throw n}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=HH,e}},{key:"setDefaults",value:function(n){Of(BD,n)}}]),e}(),WD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zD={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(WD,function(){var n=function(p,v){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var T in D)Object.prototype.hasOwnProperty.call(D,T)&&(w[T]=D[T])})(p,v)},i=function(){return(i=Object.assign||function(p){for(var v,w=1,D=arguments.length;w<D;w++)for(var T in v=arguments[w])Object.prototype.hasOwnProperty.call(v,T)&&(p[T]=v[T]);return p}).apply(this,arguments)};function o(p,v,w){for(var D,T=0,A=v.length;T<A;T++)!D&&T in v||((D=D||Array.prototype.slice.call(v,0,T))[T]=v[T]);return p.concat(D||Array.prototype.slice.call(v))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:WD,r=Object.keys,a=Array.isArray;function l(p,v){return typeof v!="object"||r(v).forEach(function(w){p[w]=v[w]}),p}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var c=Object.getPrototypeOf,u={}.hasOwnProperty;function d(p,v){return u.call(p,v)}function h(p,v){typeof v=="function"&&(v=v(c(p))),(typeof Reflect>"u"?r:Reflect.ownKeys)(v).forEach(function(w){g(p,w,v[w])})}var f=Object.defineProperty;function g(p,v,w,D){f(p,v,l(w&&d(w,"get")&&typeof w.get=="function"?{get:w.get,set:w.set,configurable:!0}:{value:w,configurable:!0,writable:!0},D))}function m(p){return{from:function(v){return p.prototype=Object.create(v.prototype),g(p.prototype,"constructor",p),{extend:h.bind(null,p.prototype)}}}}var y=Object.getOwnPropertyDescriptor,b=[].slice;function S(p,v,w){return b.call(p,v,w)}function F(p,v){return v(p)}function C(p){if(!p)throw new Error("Assertion Failed")}function R(p){s.setImmediate?setImmediate(p):setTimeout(p,0)}function E(p,v){if(typeof v=="string"&&d(p,v))return p[v];if(!v)return p;if(typeof v!="string"){for(var w=[],D=0,T=v.length;D<T;++D){var A=E(p,v[D]);w.push(A)}return w}var L=v.indexOf(".");if(L!==-1){var W=p[v.substr(0,L)];return W==null?void 0:E(W,v.substr(L+1))}}function _(p,v,w){if(p&&v!==void 0&&!("isFrozen"in Object&&Object.isFrozen(p)))if(typeof v!="string"&&"length"in v){C(typeof w!="string"&&"length"in w);for(var D=0,T=v.length;D<T;++D)_(p,v[D],w[D])}else{var A,L,W=v.indexOf(".");W!==-1?(A=v.substr(0,W),(L=v.substr(W+1))===""?w===void 0?a(p)&&!isNaN(parseInt(A))?p.splice(A,1):delete p[A]:p[A]=w:_(W=!(W=p[A])||!d(p,A)?p[A]={}:W,L,w)):w===void 0?a(p)&&!isNaN(parseInt(v))?p.splice(v,1):delete p[v]:p[v]=w}}function I(p){var v,w={};for(v in p)d(p,v)&&(w[v]=p[v]);return w}var O=[].concat;function k(p){return O.apply([],p)}var br="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(k([8,16,32,64].map(function(p){return["Int","Uint","Float"].map(function(v){return v+p+"Array"})}))).filter(function(p){return s[p]}),x=new Set(br.map(function(p){return s[p]})),P=null;function N(p){return P=new WeakMap,p=function v(w){if(!w||typeof w!="object")return w;var D=P.get(w);if(D)return D;if(a(w)){D=[],P.set(w,D);for(var T=0,A=w.length;T<A;++T)D.push(v(w[T]))}else if(x.has(w.constructor))D=w;else{var L,W=c(w);for(L in D=W===Object.prototype?{}:Object.create(W),P.set(w,D),w)d(w,L)&&(D[L]=v(w[L]))}return D}(p),P=null,p}var G={}.toString;function ie(p){return G.call(p).slice(8,-1)}var B=typeof Symbol<"u"?Symbol.iterator:"@@iterator",H=typeof B=="symbol"?function(p){var v;return p!=null&&(v=p[B])&&v.apply(p)}:function(){return null};function X(p,v){return v=p.indexOf(v),0<=v&&p.splice(v,1),0<=v}var $={};function ce(p){var v,w,D,T;if(arguments.length===1){if(a(p))return p.slice();if(this===$&&typeof p=="string")return[p];if(T=H(p)){for(w=[];!(D=T.next()).done;)w.push(D.value);return w}if(p==null)return[p];if(typeof(v=p.length)!="number")return[p];for(w=new Array(v);v--;)w[v]=p[v];return w}for(v=arguments.length,w=new Array(v);v--;)w[v]=arguments[v];return w}var ue=typeof Symbol<"u"?function(p){return p[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},at=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Fo=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(at),De={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ae(p,v){this.name=p,this.message=v}function Fe(p,v){return p+". Errors: "+Object.keys(v).map(function(w){return v[w].toString()}).filter(function(w,D,T){return T.indexOf(w)===D}).join(`
|
|
58
|
+
`)}function Me(p,v,w,D){this.failures=v,this.failedKeys=D,this.successCount=w,this.message=Fe(p,v)}function Je(p,v){this.name="BulkError",this.failures=Object.keys(v).map(function(w){return v[w]}),this.failuresByPos=v,this.message=Fe(p,this.failures)}m(ae).from(Error).extend({toString:function(){return this.name+": "+this.message}}),m(Me).from(ae),m(Je).from(ae);var pt=Fo.reduce(function(p,v){return p[v]=v+"Error",p},{}),Mt=ae,Be=Fo.reduce(function(p,v){var w=v+"Error";function D(T,A){this.name=w,T?typeof T=="string"?(this.message="".concat(T).concat(A?`
|
|
59
|
+
`+A:""),this.inner=A||null):typeof T=="object"&&(this.message="".concat(T.name," ").concat(T.message),this.inner=T):(this.message=De[v]||w,this.inner=null)}return m(D).from(Mt),p[v]=D,p},{});Be.Syntax=SyntaxError,Be.Type=TypeError,Be.Range=RangeError;var jt=at.reduce(function(p,v){return p[v+"Error"]=Be[v],p},{}),nn=Fo.reduce(function(p,v){return["Syntax","Type","Range"].indexOf(v)===-1&&(p[v+"Error"]=Be[v]),p},{});function Ot(){}function V(p){return p}function Y(p,v){return p==null||p===V?v:function(w){return v(p(w))}}function pe(p,v){return function(){p.apply(this,arguments),v.apply(this,arguments)}}function Te(p,v){return p===Ot?v:function(){var w=p.apply(this,arguments);w!==void 0&&(arguments[0]=w);var D=this.onsuccess,T=this.onerror;this.onsuccess=null,this.onerror=null;var A=v.apply(this,arguments);return D&&(this.onsuccess=this.onsuccess?pe(D,this.onsuccess):D),T&&(this.onerror=this.onerror?pe(T,this.onerror):T),A!==void 0?A:w}}function Ee(p,v){return p===Ot?v:function(){p.apply(this,arguments);var w=this.onsuccess,D=this.onerror;this.onsuccess=this.onerror=null,v.apply(this,arguments),w&&(this.onsuccess=this.onsuccess?pe(w,this.onsuccess):w),D&&(this.onerror=this.onerror?pe(D,this.onerror):D)}}function _e(p,v){return p===Ot?v:function(w){var D=p.apply(this,arguments);l(w,D);var T=this.onsuccess,A=this.onerror;return this.onsuccess=null,this.onerror=null,w=v.apply(this,arguments),T&&(this.onsuccess=this.onsuccess?pe(T,this.onsuccess):T),A&&(this.onerror=this.onerror?pe(A,this.onerror):A),D===void 0?w===void 0?void 0:w:l(D,w)}}function Ve(p,v){return p===Ot?v:function(){return v.apply(this,arguments)!==!1&&p.apply(this,arguments)}}function Ae(p,v){return p===Ot?v:function(){var w=p.apply(this,arguments);if(w&&typeof w.then=="function"){for(var D=this,T=arguments.length,A=new Array(T);T--;)A[T]=arguments[T];return w.then(function(){return v.apply(D,A)})}return v.apply(this,arguments)}}nn.ModifyError=Me,nn.DexieError=ae,nn.BulkError=Je;var Pe=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function xe(p){Pe=p}var it={},We=100,br=typeof Promise>"u"?[]:function(){var p=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[p,c(p),p];var v=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[v,c(v),p]}(),at=br[0],Fo=br[1],br=br[2],Fo=Fo&&Fo.then,dt=at&&at.constructor,xt=!!br,Lt=function(p,v){$e.push([p,v]),Dn&&(queueMicrotask(aa),Dn=!1)},Ht=!0,Dn=!0,cn=[],qn=[],ke=V,q={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Ot,pgp:!1,env:{},finalize:Ot},fe=q,$e=[],vt=0,Ft=[];function Le(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var v=this._PSD=fe;if(typeof p!="function"){if(p!==it)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&ra(this,this._value))}this._state=null,this._value=null,++v.ref,function w(D,T){try{T(function(A){if(D._state===null){if(A===D)throw new TypeError("A promise cannot be resolved with itself.");var L=D._lib&&la();A&&typeof A.then=="function"?w(D,function(W,Q){A instanceof Le?A._then(W,Q):A.then(W,Q)}):(D._state=!0,D._value=A,xo(D)),L&&Ms()}},ra.bind(null,D))}catch(A){ra(D,A)}}(this,p)}var An={get:function(){var p=fe,v=Cm;function w(D,T){var A=this,L=!p.global&&(p!==fe||v!==Cm),W=L&&!da(),Q=new Le(function(te,se){Os(A,new ks($M(D,p,L,W),$M(T,p,L,W),te,se,p))});return this._consoleTask&&(Q._consoleTask=this._consoleTask),Q}return w.prototype=it,w},set:function(p){g(this,"then",p&&p.prototype===it?An:{get:function(){return p},set:An.set})}};function ks(p,v,w,D,T){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof v=="function"?v:null,this.resolve=w,this.reject=D,this.psd=T}function ra(p,v){var w,D;qn.push(v),p._state===null&&(w=p._lib&&la(),v=ke(v),p._state=!1,p._value=v,D=p,cn.some(function(T){return T._value===D._value})||cn.push(D),xo(p),w&&Ms())}function xo(p){var v=p._listeners;p._listeners=[];for(var w=0,D=v.length;w<D;++w)Os(p,v[w]);var T=p._PSD;--T.ref||T.finalize(),vt===0&&(++vt,Lt(function(){--vt==0&&ca()},[]))}function Os(p,v){if(p._state!==null){var w=p._state?v.onFulfilled:v.onRejected;if(w===null)return(p._state?v.resolve:v.reject)(p._value);++v.psd.ref,++vt,Lt(Qo,[w,p,v])}else p._listeners.push(v)}function Qo(p,v,w){try{var D,T=v._value;!v._state&&qn.length&&(qn=[]),D=Pe&&v._consoleTask?v._consoleTask.run(function(){return p(T)}):p(T),v._state||qn.indexOf(T)!==-1||function(A){for(var L=cn.length;L;)if(cn[--L]._value===A._value)return cn.splice(L,1)}(v),w.resolve(D)}catch(A){w.reject(A)}finally{--vt==0&&ca(),--w.psd.ref||w.psd.finalize()}}function aa(){bl(q,function(){la()&&Ms()})}function la(){var p=Ht;return Dn=Ht=!1,p}function Ms(){var p,v,w;do for(;0<$e.length;)for(p=$e,$e=[],w=p.length,v=0;v<w;++v){var D=p[v];D[0].apply(null,D[1])}while(0<$e.length);Dn=Ht=!0}function ca(){var p=cn;cn=[],p.forEach(function(D){D._PSD.onunhandled.call(null,D._value,D)});for(var v=Ft.slice(0),w=v.length;w;)v[--w]()}function mm(p){return new Le(it,!1,p)}function Sn(p,v){var w=fe;return function(){var D=la(),T=fe;try{return ha(w,!0),p.apply(this,arguments)}catch(A){v&&v(A)}finally{ha(T,!1),D&&Ms()}}}h(Le.prototype,{then:An,_then:function(p,v){Os(this,new ks(null,null,p,v,fe))},catch:function(p){if(arguments.length===1)return this.then(null,p);var v=p,w=arguments[1];return typeof v=="function"?this.then(null,function(D){return(D instanceof v?w:mm)(D)}):this.then(null,function(D){return(D&&D.name===v?w:mm)(D)})},finally:function(p){return this.then(function(v){return Le.resolve(p()).then(function(){return v})},function(v){return Le.resolve(p()).then(function(){return mm(v)})})},timeout:function(p,v){var w=this;return p<1/0?new Le(function(D,T){var A=setTimeout(function(){return T(new Be.Timeout(v))},p);w.then(D,T).finally(clearTimeout.bind(null,A))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Le.prototype,Symbol.toStringTag,"Dexie.Promise"),q.env=GM(),h(Le,{all:function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.length===0&&v([]);var D=p.length;p.forEach(function(T,A){return Le.resolve(T).then(function(L){p[A]=L,--D||v(p)},w)})})},resolve:function(p){return p instanceof Le?p:p&&typeof p.then=="function"?new Le(function(v,w){p.then(v,w)}):new Le(it,!0,p)},reject:mm,race:function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.map(function(D){return Le.resolve(D).then(v,w)})})},PSD:{get:function(){return fe},set:function(p){return fe=p}},totalEchoes:{get:function(){return Cm}},newPSD:ua,usePSD:bl,scheduler:{get:function(){return Lt},set:function(p){Lt=p}},rejectionMapper:{get:function(){return ke},set:function(p){ke=p}},follow:function(p,v){return new Le(function(w,D){return ua(function(T,A){var L=fe;L.unhandleds=[],L.onunhandled=A,L.finalize=pe(function(){var W,Q=this;W=function(){Q.unhandleds.length===0?T():A(Q.unhandleds[0])},Ft.push(function te(){W(),Ft.splice(Ft.indexOf(te),1)}),++vt,Lt(function(){--vt==0&&ca()},[])},L.finalize),p()},v,w,D)})}}),dt&&(dt.allSettled&&g(Le,"allSettled",function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v){p.length===0&&v([]);var w=p.length,D=new Array(w);p.forEach(function(T,A){return Le.resolve(T).then(function(L){return D[A]={status:"fulfilled",value:L}},function(L){return D[A]={status:"rejected",reason:L}}).then(function(){return--w||v(D)})})})}),dt.any&&typeof AggregateError<"u"&&g(Le,"any",function(){var p=ce.apply(null,arguments).map(wm);return new Le(function(v,w){p.length===0&&w(new AggregateError([]));var D=p.length,T=new Array(D);p.forEach(function(A,L){return Le.resolve(A).then(function(W){return v(W)},function(W){T[L]=W,--D||w(new AggregateError(T))})})})}),dt.withResolvers&&(Le.withResolvers=dt.withResolvers));var Qn={awaits:0,echoes:0,id:0},Vde=0,vm=[],ym=0,Cm=0,Bde=0;function ua(p,v,w,D){var T=fe,A=Object.create(T);return A.parent=T,A.ref=0,A.global=!1,A.id=++Bde,q.env,A.env=xt?{Promise:Le,PromiseProp:{value:Le,configurable:!0,writable:!0},all:Le.all,race:Le.race,allSettled:Le.allSettled,any:Le.any,resolve:Le.resolve,reject:Le.reject}:{},v&&l(A,v),++T.ref,A.finalize=function(){--this.parent.ref||this.parent.finalize()},D=bl(A,p,w,D),A.ref===0&&A.finalize(),D}function iu(){return Qn.id||(Qn.id=++Vde),++Qn.awaits,Qn.echoes+=We,Qn.id}function da(){return!!Qn.awaits&&(--Qn.awaits==0&&(Qn.id=0),Qn.echoes=Qn.awaits*We,!0)}function wm(p){return Qn.echoes&&p&&p.constructor===dt?(iu(),p.then(function(v){return da(),v},function(v){return da(),Nn(v)})):p}function Hde(){var p=vm[vm.length-1];vm.pop(),ha(p,!1)}function ha(p,v){var w,D=fe;(v?!Qn.echoes||ym++&&p===fe:!ym||--ym&&p===fe)||queueMicrotask(v?(function(T){++Cm,Qn.echoes&&--Qn.echoes!=0||(Qn.echoes=Qn.awaits=Qn.id=0),vm.push(fe),ha(T,!0)}).bind(null,p):Hde),p!==fe&&(fe=p,D===q&&(q.env=GM()),xt&&(w=q.env.Promise,v=p.env,(D.global||p.global)&&(Object.defineProperty(s,"Promise",v.PromiseProp),w.all=v.all,w.race=v.race,w.resolve=v.resolve,w.reject=v.reject,v.allSettled&&(w.allSettled=v.allSettled),v.any&&(w.any=v.any))))}function GM(){var p=s.Promise;return xt?{Promise:p,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:p.all,race:p.race,allSettled:p.allSettled,any:p.any,resolve:p.resolve,reject:p.reject}:{}}function bl(p,v,w,D,T){var A=fe;try{return ha(p,!0),v(w,D,T)}finally{ha(A,!1)}}function $M(p,v,w,D){return typeof p!="function"?p:function(){var T=fe;w&&iu(),ha(v,!0);try{return p.apply(this,arguments)}finally{ha(T,!1),D&&queueMicrotask(da)}}}function GS(p){Promise===dt&&Qn.echoes===0?ym===0?p():enqueueNativeMicroTask(p):setTimeout(p,0)}(""+Fo).indexOf("[native code]")===-1&&(iu=da=Ot);var Nn=Le.reject,Sl="",wr="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",WM="String expected.",ou=[],bm="__dbnames",$S="readonly",WS="readwrite";function El(p,v){return p?v?function(){return p.apply(this,arguments)&&v.apply(this,arguments)}:p:v}var zM={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Sm(p){return typeof p!="string"||/\./.test(p)?function(v){return v}:function(v){return v[p]===void 0&&p in v&&delete(v=N(v))[p],v}}function UM(){throw Be.Type()}function Gt(p,v){try{var w=jM(p),D=jM(v);if(w!==D)return w==="Array"?1:D==="Array"?-1:w==="binary"?1:D==="binary"?-1:w==="string"?1:D==="string"?-1:w==="Date"?1:D!=="Date"?NaN:-1;switch(w){case"number":case"Date":case"string":return v<p?1:p<v?-1:0;case"binary":return function(T,A){for(var L=T.length,W=A.length,Q=L<W?L:W,te=0;te<Q;++te)if(T[te]!==A[te])return T[te]<A[te]?-1:1;return L===W?0:L<W?-1:1}(KM(p),KM(v));case"Array":return function(T,A){for(var L=T.length,W=A.length,Q=L<W?L:W,te=0;te<Q;++te){var se=Gt(T[te],A[te]);if(se!==0)return se}return L===W?0:L<W?-1:1}(p,v)}}catch{}return NaN}function jM(p){var v=typeof p;return v!="object"?v:ArrayBuffer.isView(p)?"binary":(p=ie(p),p==="ArrayBuffer"?"binary":p)}function KM(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):new Uint8Array(p)}var qM=(gn.prototype._trans=function(p,v,w){var D=this._tx||fe.trans,T=this.name,A=Pe&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(p==="readonly"?"read":"write"," ").concat(this.name));function L(te,se,U){if(!U.schema[T])throw new Be.NotFound("Table "+T+" not part of transaction");return v(U.idbtrans,U)}var W=la();try{var Q=D&&D.db._novip===this.db._novip?D===fe.trans?D._promise(p,L,w):ua(function(){return D._promise(p,L,w)},{trans:D,transless:fe.transless||fe}):function te(se,U,le,ee){if(se.idbdb&&(se._state.openComplete||fe.letThrough||se._vip)){var oe=se._createTransaction(U,le,se._dbSchema);try{oe.create(),se._state.PR1398_maxLoop=3}catch(re){return re.name===pt.InvalidState&&se.isOpen()&&0<--se._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),se.close({disableAutoOpen:!1}),se.open().then(function(){return te(se,U,le,ee)})):Nn(re)}return oe._promise(U,function(re,ne){return ua(function(){return fe.trans=oe,ee(re,ne,oe)})}).then(function(re){if(U==="readwrite")try{oe.idbtrans.commit()}catch{}return U==="readonly"?re:oe._completion.then(function(){return re})})}if(se._state.openComplete)return Nn(new Be.DatabaseClosed(se._state.dbOpenError));if(!se._state.isBeingOpened){if(!se._state.autoOpen)return Nn(new Be.DatabaseClosed);se.open().catch(Ot)}return se._state.dbReadyPromise.then(function(){return te(se,U,le,ee)})}(this.db,p,[this.name],L);return A&&(Q._consoleTask=A,Q=Q.catch(function(te){return console.trace(te),Nn(te)})),Q}finally{W&&Ms()}},gn.prototype.get=function(p,v){var w=this;return p&&p.constructor===Object?this.where(p).first(v):p==null?Nn(new Be.Type("Invalid argument to Table.get()")):this._trans("readonly",function(D){return w.core.get({trans:D,key:p}).then(function(T){return w.hook.reading.fire(T)})}).then(v)},gn.prototype.where=function(p){if(typeof p=="string")return new this.db.WhereClause(this,p);if(a(p))return new this.db.WhereClause(this,"[".concat(p.join("+"),"]"));var v=r(p);if(v.length===1)return this.where(v[0]).equals(p[v[0]]);var w=this.schema.indexes.concat(this.schema.primKey).filter(function(W){if(W.compound&&v.every(function(te){return 0<=W.keyPath.indexOf(te)})){for(var Q=0;Q<v.length;++Q)if(v.indexOf(W.keyPath[Q])===-1)return!1;return!0}return!1}).sort(function(W,Q){return W.keyPath.length-Q.keyPath.length})[0];if(w&&this.db._maxKey!==Sl){var A=w.keyPath.slice(0,v.length);return this.where(A).equals(A.map(function(Q){return p[Q]}))}!w&&Pe&&console.warn("The query ".concat(JSON.stringify(p)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(v.join("+"),"]"));var D=this.schema.idxByName;function T(W,Q){return Gt(W,Q)===0}var L=v.reduce(function(U,Q){var te=U[0],se=U[1],U=D[Q],le=p[Q];return[te||U,te||!U?El(se,U&&U.multi?function(ee){return ee=E(ee,Q),a(ee)&&ee.some(function(oe){return T(le,oe)})}:function(ee){return T(le,E(ee,Q))}):se]},[null,null]),A=L[0],L=L[1];return A?this.where(A.name).equals(p[A.keyPath]).filter(L):w?this.filter(L):this.where(v).equals("")},gn.prototype.filter=function(p){return this.toCollection().and(p)},gn.prototype.count=function(p){return this.toCollection().count(p)},gn.prototype.offset=function(p){return this.toCollection().offset(p)},gn.prototype.limit=function(p){return this.toCollection().limit(p)},gn.prototype.each=function(p){return this.toCollection().each(p)},gn.prototype.toArray=function(p){return this.toCollection().toArray(p)},gn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},gn.prototype.orderBy=function(p){return new this.db.Collection(new this.db.WhereClause(this,a(p)?"[".concat(p.join("+"),"]"):p))},gn.prototype.reverse=function(){return this.toCollection().reverse()},gn.prototype.mapToClass=function(p){var v,w=this.db,D=this.name;function T(){return v!==null&&v.apply(this,arguments)||this}(this.schema.mappedClass=p).prototype instanceof UM&&(function(Q,te){if(typeof te!="function"&&te!==null)throw new TypeError("Class extends value "+String(te)+" is not a constructor or null");function se(){this.constructor=Q}n(Q,te),Q.prototype=te===null?Object.create(te):(se.prototype=te.prototype,new se)}(T,v=p),Object.defineProperty(T.prototype,"db",{get:function(){return w},enumerable:!1,configurable:!0}),T.prototype.table=function(){return D},p=T);for(var A=new Set,L=p.prototype;L;L=c(L))Object.getOwnPropertyNames(L).forEach(function(Q){return A.add(Q)});function W(Q){if(!Q)return Q;var te,se=Object.create(p.prototype);for(te in Q)if(!A.has(te))try{se[te]=Q[te]}catch{}return se}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=W,this.hook("reading",W),p},gn.prototype.defineClass=function(){return this.mapToClass(function(p){l(this,p)})},gn.prototype.add=function(p,v){var w=this,D=this.schema.primKey,T=D.auto,A=D.keyPath,L=p;return A&&T&&(L=Sm(A)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"add",keys:v!=null?[v]:null,values:[L]})}).then(function(W){return W.numFailures?Le.reject(W.failures[0]):W.lastResult}).then(function(W){if(A)try{_(p,A,W)}catch{}return W})},gn.prototype.update=function(p,v){return typeof p!="object"||a(p)?this.where(":id").equals(p).modify(v):(p=E(p,this.schema.primKey.keyPath),p===void 0?Nn(new Be.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(p).modify(v))},gn.prototype.put=function(p,v){var w=this,D=this.schema.primKey,T=D.auto,A=D.keyPath,L=p;return A&&T&&(L=Sm(A)(p)),this._trans("readwrite",function(W){return w.core.mutate({trans:W,type:"put",values:[L],keys:v!=null?[v]:null})}).then(function(W){return W.numFailures?Le.reject(W.failures[0]):W.lastResult}).then(function(W){if(A)try{_(p,A,W)}catch{}return W})},gn.prototype.delete=function(p){var v=this;return this._trans("readwrite",function(w){return v.core.mutate({trans:w,type:"delete",keys:[p]})}).then(function(w){return w.numFailures?Le.reject(w.failures[0]):void 0})},gn.prototype.clear=function(){var p=this;return this._trans("readwrite",function(v){return p.core.mutate({trans:v,type:"deleteRange",range:zM})}).then(function(v){return v.numFailures?Le.reject(v.failures[0]):void 0})},gn.prototype.bulkGet=function(p){var v=this;return this._trans("readonly",function(w){return v.core.getMany({keys:p,trans:w}).then(function(D){return D.map(function(T){return v.hook.reading.fire(T)})})})},gn.prototype.bulkAdd=function(p,v,w){var D=this,T=Array.isArray(v)?v:void 0,A=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var te=D.schema.primKey,W=te.auto,te=te.keyPath;if(te&&T)throw new Be.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");var Q=p.length,te=te&&W?p.map(Sm(te)):p;return D.core.mutate({trans:L,type:"add",keys:T,values:te,wantResults:A}).then(function(oe){var U=oe.numFailures,le=oe.results,ee=oe.lastResult,oe=oe.failures;if(U===0)return A?le:ee;throw new Je("".concat(D.name,".bulkAdd(): ").concat(U," of ").concat(Q," operations failed"),oe)})})},gn.prototype.bulkPut=function(p,v,w){var D=this,T=Array.isArray(v)?v:void 0,A=(w=w||(T?void 0:v))?w.allKeys:void 0;return this._trans("readwrite",function(L){var te=D.schema.primKey,W=te.auto,te=te.keyPath;if(te&&T)throw new Be.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(T&&T.length!==p.length)throw new Be.InvalidArgument("Arguments objects and keys must have the same length");var Q=p.length,te=te&&W?p.map(Sm(te)):p;return D.core.mutate({trans:L,type:"put",keys:T,values:te,wantResults:A}).then(function(oe){var U=oe.numFailures,le=oe.results,ee=oe.lastResult,oe=oe.failures;if(U===0)return A?le:ee;throw new Je("".concat(D.name,".bulkPut(): ").concat(U," of ").concat(Q," operations failed"),oe)})})},gn.prototype.bulkUpdate=function(p){var v=this,w=this.core,D=p.map(function(L){return L.key}),T=p.map(function(L){return L.changes}),A=[];return this._trans("readwrite",function(L){return w.getMany({trans:L,keys:D,cache:"clone"}).then(function(W){var Q=[],te=[];p.forEach(function(U,le){var ee=U.key,oe=U.changes,re=W[le];if(re){for(var ne=0,he=Object.keys(oe);ne<he.length;ne++){var me=he[ne],ve=oe[me];if(me===v.schema.primKey.keyPath){if(Gt(ve,ee)!==0)throw new Be.Constraint("Cannot update primary key in bulkUpdate()")}else _(re,me,ve)}A.push(le),Q.push(ee),te.push(re)}});var se=Q.length;return w.mutate({trans:L,type:"put",keys:Q,values:te,updates:{keys:D,changeSpecs:T}}).then(function(U){var le=U.numFailures,ee=U.failures;if(le===0)return se;for(var oe=0,re=Object.keys(ee);oe<re.length;oe++){var ne,he=re[oe],me=A[Number(he)];me!=null&&(ne=ee[he],delete ee[he],ee[me]=ne)}throw new Je("".concat(v.name,".bulkUpdate(): ").concat(le," of ").concat(se," operations failed"),ee)})})})},gn.prototype.bulkDelete=function(p){var v=this,w=p.length;return this._trans("readwrite",function(D){return v.core.mutate({trans:D,type:"delete",keys:p})}).then(function(L){var T=L.numFailures,A=L.lastResult,L=L.failures;if(T===0)return A;throw new Je("".concat(v.name,".bulkDelete(): ").concat(T," of ").concat(w," operations failed"),L)})},gn);function gn(){}function Eh(p){function v(L,W){if(W){for(var Q=arguments.length,te=new Array(Q-1);--Q;)te[Q-1]=arguments[Q];return w[L].subscribe.apply(null,te),p}if(typeof L=="string")return w[L]}var w={};v.addEventType=A;for(var D=1,T=arguments.length;D<T;++D)A(arguments[D]);return v;function A(L,W,Q){if(typeof L!="object"){var te;W=W||Ve;var se={subscribers:[],fire:Q=Q||Ot,subscribe:function(U){se.subscribers.indexOf(U)===-1&&(se.subscribers.push(U),se.fire=W(se.fire,U))},unsubscribe:function(U){se.subscribers=se.subscribers.filter(function(le){return le!==U}),se.fire=se.subscribers.reduce(W,Q)}};return w[L]=v[L]=se}r(te=L).forEach(function(U){var le=te[U];if(a(le))A(U,te[U][0],te[U][1]);else{if(le!=="asap")throw new Be.InvalidArgument("Invalid event config");var ee=A(U,V,function(){for(var oe=arguments.length,re=new Array(oe);oe--;)re[oe]=arguments[oe];ee.subscribers.forEach(function(ne){R(function(){ne.apply(null,re)})})})}})}}function Rh(p,v){return m(v).from({prototype:p}),v}function su(p,v){return!(p.filter||p.algorithm||p.or)&&(v?p.justLimit:!p.replayFilter)}function zS(p,v){p.filter=El(p.filter,v)}function US(p,v,w){var D=p.replayFilter;p.replayFilter=D?function(){return El(D(),v())}:v,p.justLimit=w&&!D}function Em(p,v){if(p.isPrimKey)return v.primaryKey;var w=v.getIndexByKeyPath(p.index);if(!w)throw new Be.Schema("KeyPath "+p.index+" on object store "+v.name+" is not indexed");return w}function YM(p,v,w){var D=Em(p,v.schema);return v.openCursor({trans:w,values:!p.keysOnly,reverse:p.dir==="prev",unique:!!p.unique,query:{index:D,range:p.range}})}function Rm(p,v,w,D){var T=p.replayFilter?El(p.filter,p.replayFilter()):p.filter;if(p.or){var A={},L=function(W,Q,te){var se,U;T&&!T(Q,te,function(le){return Q.stop(le)},function(le){return Q.fail(le)})||((U=""+(se=Q.primaryKey))=="[object ArrayBuffer]"&&(U=""+new Uint8Array(se)),d(A,U)||(A[U]=!0,v(W,Q,te)))};return Promise.all([p.or._iterate(L,w),ZM(YM(p,D,w),p.algorithm,L,!p.keysOnly&&p.valueMapper)])}return ZM(YM(p,D,w),El(p.algorithm,T),v,!p.keysOnly&&p.valueMapper)}function ZM(p,v,w,D){var T=Sn(D?function(A,L,W){return w(D(A),L,W)}:w);return p.then(function(A){if(A)return A.start(function(){var L=function(){return A.continue()};v&&!v(A,function(W){return L=W},function(W){A.stop(W),L=Ot},function(W){A.fail(W),L=Ot})||T(A.value,A,function(W){return L=W}),L()})})}var br=Symbol(),Dh=(XM.prototype.execute=function(p){if(this.add!==void 0){var v=this.add;if(a(v))return o(o([],a(p)?p:[],!0),v).sort();if(typeof v=="number")return(Number(p)||0)+v;if(typeof v=="bigint")try{return BigInt(p)+v}catch{return BigInt(0)+v}throw new TypeError("Invalid term ".concat(v))}if(this.remove!==void 0){var w=this.remove;if(a(w))return a(p)?p.filter(function(D){return!w.includes(D)}).sort():[];if(typeof w=="number")return Number(p)-w;if(typeof w=="bigint")try{return BigInt(p)-w}catch{return BigInt(0)-w}throw new TypeError("Invalid subtrahend ".concat(w))}return v=(v=this.replacePrefix)===null||v===void 0?void 0:v[0],v&&typeof p=="string"&&p.startsWith(v)?this.replacePrefix[1]+p.substring(v.length):p},XM);function XM(p){Object.assign(this,p)}var Gde=(Kt.prototype._read=function(p,v){var w=this._ctx;return w.error?w.table._trans(null,Nn.bind(null,w.error)):w.table._trans("readonly",p).then(v)},Kt.prototype._write=function(p){var v=this._ctx;return v.error?v.table._trans(null,Nn.bind(null,v.error)):v.table._trans("readwrite",p,"locked")},Kt.prototype._addAlgorithm=function(p){var v=this._ctx;v.algorithm=El(v.algorithm,p)},Kt.prototype._iterate=function(p,v){return Rm(this._ctx,p,v,this._ctx.table.core)},Kt.prototype.clone=function(p){var v=Object.create(this.constructor.prototype),w=Object.create(this._ctx);return p&&l(w,p),v._ctx=w,v},Kt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Kt.prototype.each=function(p){var v=this._ctx;return this._read(function(w){return Rm(v,p,w,v.table.core)})},Kt.prototype.count=function(p){var v=this;return this._read(function(w){var D=v._ctx,T=D.table.core;if(su(D,!0))return T.count({trans:w,query:{index:Em(D,T.schema),range:D.range}}).then(function(L){return Math.min(L,D.limit)});var A=0;return Rm(D,function(){return++A,!1},w,T).then(function(){return A})}).then(p)},Kt.prototype.sortBy=function(p,v){var w=p.split(".").reverse(),D=w[0],T=w.length-1;function A(Q,te){return te?A(Q[w[te]],te-1):Q[D]}var L=this._ctx.dir==="next"?1:-1;function W(Q,te){return Gt(A(Q,T),A(te,T))*L}return this.toArray(function(Q){return Q.sort(W)}).then(v)},Kt.prototype.toArray=function(p){var v=this;return this._read(function(w){var D=v._ctx;if(D.dir==="next"&&su(D,!0)&&0<D.limit){var T=D.valueMapper,A=Em(D,D.table.core.schema);return D.table.core.query({trans:w,limit:D.limit,values:!0,query:{index:A,range:D.range}}).then(function(W){return W=W.result,T?W.map(T):W})}var L=[];return Rm(D,function(W){return L.push(W)},w,D.table.core).then(function(){return L})},p)},Kt.prototype.offset=function(p){var v=this._ctx;return p<=0||(v.offset+=p,su(v)?US(v,function(){var w=p;return function(D,T){return w===0||(w===1?--w:T(function(){D.advance(w),w=0}),!1)}}):US(v,function(){var w=p;return function(){return--w<0}})),this},Kt.prototype.limit=function(p){return this._ctx.limit=Math.min(this._ctx.limit,p),US(this._ctx,function(){var v=p;return function(w,D,T){return--v<=0&&D(T),0<=v}},!0),this},Kt.prototype.until=function(p,v){return zS(this._ctx,function(w,D,T){return!p(w.value)||(D(T),v)}),this},Kt.prototype.first=function(p){return this.limit(1).toArray(function(v){return v[0]}).then(p)},Kt.prototype.last=function(p){return this.reverse().first(p)},Kt.prototype.filter=function(p){var v;return zS(this._ctx,function(w){return p(w.value)}),(v=this._ctx).isMatch=El(v.isMatch,p),this},Kt.prototype.and=function(p){return this.filter(p)},Kt.prototype.or=function(p){return new this.db.WhereClause(this._ctx.table,p,this)},Kt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Kt.prototype.desc=function(){return this.reverse()},Kt.prototype.eachKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,D){p(D.key,D)})},Kt.prototype.eachUniqueKey=function(p){return this._ctx.unique="unique",this.eachKey(p)},Kt.prototype.eachPrimaryKey=function(p){var v=this._ctx;return v.keysOnly=!v.isMatch,this.each(function(w,D){p(D.primaryKey,D)})},Kt.prototype.keys=function(p){var v=this._ctx;v.keysOnly=!v.isMatch;var w=[];return this.each(function(D,T){w.push(T.key)}).then(function(){return w}).then(p)},Kt.prototype.primaryKeys=function(p){var v=this._ctx;if(v.dir==="next"&&su(v,!0)&&0<v.limit)return this._read(function(D){var T=Em(v,v.table.core.schema);return v.table.core.query({trans:D,values:!1,limit:v.limit,query:{index:T,range:v.range}})}).then(function(D){return D.result}).then(p);v.keysOnly=!v.isMatch;var w=[];return this.each(function(D,T){w.push(T.primaryKey)}).then(function(){return w}).then(p)},Kt.prototype.uniqueKeys=function(p){return this._ctx.unique="unique",this.keys(p)},Kt.prototype.firstKey=function(p){return this.limit(1).keys(function(v){return v[0]}).then(p)},Kt.prototype.lastKey=function(p){return this.reverse().firstKey(p)},Kt.prototype.distinct=function(){var p=this._ctx,p=p.index&&p.table.schema.idxByName[p.index];if(!p||!p.multi)return this;var v={};return zS(this._ctx,function(T){var D=T.primaryKey.toString(),T=d(v,D);return v[D]=!0,!T}),this},Kt.prototype.modify=function(p){var v=this,w=this._ctx;return this._write(function(D){var T,A,L;L=typeof p=="function"?p:(T=r(p),A=T.length,function(ne){for(var he=!1,me=0;me<A;++me){var ve=T[me],Re=p[ve],He=E(ne,ve);Re instanceof Dh?(_(ne,ve,Re.execute(He)),he=!0):He!==Re&&(_(ne,ve,Re),he=!0)}return he});var W=w.table.core,U=W.schema.primaryKey,Q=U.outbound,te=U.extractKey,se=200,U=v.db._options.modifyChunkSize;U&&(se=typeof U=="object"?U[W.name]||U["*"]||200:U);function le(ne,ve){var me=ve.failures,ve=ve.numFailures;oe+=ne-ve;for(var Re=0,He=r(me);Re<He.length;Re++){var Ze=He[Re];ee.push(me[Ze])}}var ee=[],oe=0,re=[];return v.clone().primaryKeys().then(function(ne){function he(ve){var Re=Math.min(se,ne.length-ve);return W.getMany({trans:D,keys:ne.slice(ve,ve+Re),cache:"immutable"}).then(function(He){for(var Ze=[],Ge=[],ze=Q?[]:null,Qe=[],qe=0;qe<Re;++qe){var st=He[qe],At={value:N(st),primKey:ne[ve+qe]};L.call(At,At.value,At)!==!1&&(At.value==null?Qe.push(ne[ve+qe]):Q||Gt(te(st),te(At.value))===0?(Ge.push(At.value),Q&&ze.push(ne[ve+qe])):(Qe.push(ne[ve+qe]),Ze.push(At.value)))}return Promise.resolve(0<Ze.length&&W.mutate({trans:D,type:"add",values:Ze}).then(function(Vt){for(var Bt in Vt.failures)Qe.splice(parseInt(Bt),1);le(Ze.length,Vt)})).then(function(){return(0<Ge.length||me&&typeof p=="object")&&W.mutate({trans:D,type:"put",keys:ze,values:Ge,criteria:me,changeSpec:typeof p!="function"&&p,isAdditionalChunk:0<ve}).then(function(Vt){return le(Ge.length,Vt)})}).then(function(){return(0<Qe.length||me&&p===jS)&&W.mutate({trans:D,type:"delete",keys:Qe,criteria:me,isAdditionalChunk:0<ve}).then(function(Vt){return le(Qe.length,Vt)})}).then(function(){return ne.length>ve+Re&&he(ve+se)})})}var me=su(w)&&w.limit===1/0&&(typeof p!="function"||p===jS)&&{index:w.index,range:w.range};return he(0).then(function(){if(0<ee.length)throw new Me("Error modifying one or more objects",ee,oe,re);return ne.length})})})},Kt.prototype.delete=function(){var p=this._ctx,v=p.range;return su(p)&&(p.isPrimKey||v.type===3)?this._write(function(w){var D=p.table.core.schema.primaryKey,T=v;return p.table.core.count({trans:w,query:{index:D,range:T}}).then(function(A){return p.table.core.mutate({trans:w,type:"deleteRange",range:T}).then(function(L){var W=L.failures;if(L.lastResult,L.results,L=L.numFailures,L)throw new Me("Could not delete some values",Object.keys(W).map(function(Q){return W[Q]}),A-L);return A-L})})}):this.modify(jS)},Kt);function Kt(){}var jS=function(p,v){return v.value=null};function $de(p,v){return p<v?-1:p===v?0:1}function Wde(p,v){return v<p?-1:p===v?0:1}function no(p,v,w){return p=p instanceof QM?new p.Collection(p):p,p._ctx.error=new(w||TypeError)(v),p}function ru(p){return new p.Collection(p,function(){return JM("")}).limit(0)}function Dm(p,v,w,D){var T,A,L,W,Q,te,se,U=w.length;if(!w.every(function(oe){return typeof oe=="string"}))return no(p,WM);function le(oe){T=oe==="next"?function(ne){return ne.toUpperCase()}:function(ne){return ne.toLowerCase()},A=oe==="next"?function(ne){return ne.toLowerCase()}:function(ne){return ne.toUpperCase()},L=oe==="next"?$de:Wde;var re=w.map(function(ne){return{lower:A(ne),upper:T(ne)}}).sort(function(ne,he){return L(ne.lower,he.lower)});W=re.map(function(ne){return ne.upper}),Q=re.map(function(ne){return ne.lower}),se=(te=oe)==="next"?"":D}le("next"),p=new p.Collection(p,function(){return fa(W[0],Q[U-1]+D)}),p._ondirectionchange=function(oe){le(oe)};var ee=0;return p._addAlgorithm(function(oe,re,ne){var he=oe.key;if(typeof he!="string")return!1;var me=A(he);if(v(me,Q,ee))return!0;for(var ve=null,Re=ee;Re<U;++Re){var He=function(Ze,Ge,ze,Qe,qe,st){for(var At=Math.min(Ze.length,Qe.length),Vt=-1,Bt=0;Bt<At;++Bt){var io=Ge[Bt];if(io!==Qe[Bt])return qe(Ze[Bt],ze[Bt])<0?Ze.substr(0,Bt)+ze[Bt]+ze.substr(Bt+1):qe(Ze[Bt],Qe[Bt])<0?Ze.substr(0,Bt)+Qe[Bt]+ze.substr(Bt+1):0<=Vt?Ze.substr(0,Vt)+Ge[Vt]+ze.substr(Vt+1):null;qe(Ze[Bt],io)<0&&(Vt=Bt)}return At<Qe.length&&st==="next"?Ze+ze.substr(Ze.length):At<Ze.length&&st==="prev"?Ze.substr(0,ze.length):Vt<0?null:Ze.substr(0,Vt)+Qe[Vt]+ze.substr(Vt+1)}(he,me,W[Re],Q[Re],L,te);He===null&&ve===null?ee=Re+1:(ve===null||0<L(ve,He))&&(ve=He)}return re(ve!==null?function(){oe.continue(ve+se)}:ne),!1}),p}function fa(p,v,w,D){return{type:2,lower:p,upper:v,lowerOpen:w,upperOpen:D}}function JM(p){return{type:1,lower:p,upper:p}}var QM=(Object.defineProperty(ei.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ei.prototype.between=function(p,v,w,D){w=w!==!1,D=D===!0;try{return 0<this._cmp(p,v)||this._cmp(p,v)===0&&(w||D)&&(!w||!D)?ru(this):new this.Collection(this,function(){return fa(p,v,!w,!D)})}catch{return no(this,wr)}},ei.prototype.equals=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return JM(p)})},ei.prototype.above=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(p,void 0,!0)})},ei.prototype.aboveOrEqual=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(p,void 0,!1)})},ei.prototype.below=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(void 0,p,!1,!0)})},ei.prototype.belowOrEqual=function(p){return p==null?no(this,wr):new this.Collection(this,function(){return fa(void 0,p)})},ei.prototype.startsWith=function(p){return typeof p!="string"?no(this,WM):this.between(p,p+Sl,!0,!0)},ei.prototype.startsWithIgnoreCase=function(p){return p===""?this.startsWith(p):Dm(this,function(v,w){return v.indexOf(w[0])===0},[p],Sl)},ei.prototype.equalsIgnoreCase=function(p){return Dm(this,function(v,w){return v===w[0]},[p],"")},ei.prototype.anyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?ru(this):Dm(this,function(v,w){return w.indexOf(v)!==-1},p,"")},ei.prototype.startsWithAnyOfIgnoreCase=function(){var p=ce.apply($,arguments);return p.length===0?ru(this):Dm(this,function(v,w){return w.some(function(D){return v.indexOf(D)===0})},p,Sl)},ei.prototype.anyOf=function(){var p=this,v=ce.apply($,arguments),w=this._cmp;try{v.sort(w)}catch{return no(this,wr)}if(v.length===0)return ru(this);var D=new this.Collection(this,function(){return fa(v[0],v[v.length-1])});D._ondirectionchange=function(A){w=A==="next"?p._ascending:p._descending,v.sort(w)};var T=0;return D._addAlgorithm(function(A,L,W){for(var Q=A.key;0<w(Q,v[T]);)if(++T===v.length)return L(W),!1;return w(Q,v[T])===0||(L(function(){A.continue(v[T])}),!1)}),D},ei.prototype.notEqual=function(p){return this.inAnyRange([[-1/0,p],[p,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ei.prototype.noneOf=function(){var p=ce.apply($,arguments);if(p.length===0)return new this.Collection(this);try{p.sort(this._ascending)}catch{return no(this,wr)}var v=p.reduce(function(w,D){return w?w.concat([[w[w.length-1][1],D]]):[[-1/0,D]]},null);return v.push([p[p.length-1],this.db._maxKey]),this.inAnyRange(v,{includeLowers:!1,includeUppers:!1})},ei.prototype.inAnyRange=function(he,v){var w=this,D=this._cmp,T=this._ascending,A=this._descending,L=this._min,W=this._max;if(he.length===0)return ru(this);if(!he.every(function(me){return me[0]!==void 0&&me[1]!==void 0&&T(me[0],me[1])<=0}))return no(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Be.InvalidArgument);var Q=!v||v.includeLowers!==!1,te=v&&v.includeUppers===!0,se,U=T;function le(me,ve){return U(me[0],ve[0])}try{(se=he.reduce(function(me,ve){for(var Re=0,He=me.length;Re<He;++Re){var Ze=me[Re];if(D(ve[0],Ze[1])<0&&0<D(ve[1],Ze[0])){Ze[0]=L(Ze[0],ve[0]),Ze[1]=W(Ze[1],ve[1]);break}}return Re===He&&me.push(ve),me},[])).sort(le)}catch{return no(this,wr)}var ee=0,oe=te?function(me){return 0<T(me,se[ee][1])}:function(me){return 0<=T(me,se[ee][1])},re=Q?function(me){return 0<A(me,se[ee][0])}:function(me){return 0<=A(me,se[ee][0])},ne=oe,he=new this.Collection(this,function(){return fa(se[0][0],se[se.length-1][1],!Q,!te)});return he._ondirectionchange=function(me){U=me==="next"?(ne=oe,T):(ne=re,A),se.sort(le)},he._addAlgorithm(function(me,ve,Re){for(var He,Ze=me.key;ne(Ze);)if(++ee===se.length)return ve(Re),!1;return!oe(He=Ze)&&!re(He)||(w._cmp(Ze,se[ee][1])===0||w._cmp(Ze,se[ee][0])===0||ve(function(){U===T?me.continue(se[ee][0]):me.continue(se[ee][1])}),!1)}),he},ei.prototype.startsWithAnyOf=function(){var p=ce.apply($,arguments);return p.every(function(v){return typeof v=="string"})?p.length===0?ru(this):this.inAnyRange(p.map(function(v){return[v,v+Sl]})):no(this,"startsWithAnyOf() only works with strings")},ei);function ei(){}function Ls(p){return Sn(function(v){return _h(v),p(v.target.error),!1})}function _h(p){p.stopPropagation&&p.stopPropagation(),p.preventDefault&&p.preventDefault()}var xh="storagemutated",KS="x-storagemutated-1",pa=Eh(null,xh),zde=(Ns.prototype._lock=function(){return C(!fe.global),++this._reculock,this._reculock!==1||fe.global||(fe.lockOwnerFor=this),this},Ns.prototype._unlock=function(){if(C(!fe.global),--this._reculock==0)for(fe.global||(fe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var p=this._blockedFuncs.shift();try{bl(p[1],p[0])}catch{}}return this},Ns.prototype._locked=function(){return this._reculock&&fe.lockOwnerFor!==this},Ns.prototype.create=function(p){var v=this;if(!this.mode)return this;var w=this.db.idbdb,D=this.db._state.dbOpenError;if(C(!this.idbtrans),!p&&!w)switch(D&&D.name){case"DatabaseClosedError":throw new Be.DatabaseClosed(D);case"MissingAPIError":throw new Be.MissingAPI(D.message,D);default:throw new Be.OpenFailed(D)}if(!this.active)throw new Be.TransactionInactive;return C(this._completion._state===null),(p=this.idbtrans=p||(this.db.core||w).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Sn(function(T){_h(T),v._reject(p.error)}),p.onabort=Sn(function(T){_h(T),v.active&&v._reject(new Be.Abort(p.error)),v.active=!1,v.on("abort").fire(T)}),p.oncomplete=Sn(function(){v.active=!1,v._resolve(),"mutatedParts"in p&&pa.storagemutated.fire(p.mutatedParts)}),this},Ns.prototype._promise=function(p,v,w){var D=this;if(p==="readwrite"&&this.mode!=="readwrite")return Nn(new Be.ReadOnly("Transaction is readonly"));if(!this.active)return Nn(new Be.TransactionInactive);if(this._locked())return new Le(function(A,L){D._blockedFuncs.push([function(){D._promise(p,v,w).then(A,L)},fe])});if(w)return ua(function(){var A=new Le(function(L,W){D._lock();var Q=v(L,W,D);Q&&Q.then&&Q.then(L,W)});return A.finally(function(){return D._unlock()}),A._lib=!0,A});var T=new Le(function(A,L){var W=v(A,L,D);W&&W.then&&W.then(A,L)});return T._lib=!0,T},Ns.prototype._root=function(){return this.parent?this.parent._root():this},Ns.prototype.waitFor=function(p){var v,w=this._root(),D=Le.resolve(p);w._waitingFor?w._waitingFor=w._waitingFor.then(function(){return D}):(w._waitingFor=D,w._waitingQueue=[],v=w.idbtrans.objectStore(w.storeNames[0]),function A(){for(++w._spinCount;w._waitingQueue.length;)w._waitingQueue.shift()();w._waitingFor&&(v.get(-1/0).onsuccess=A)}());var T=w._waitingFor;return new Le(function(A,L){D.then(function(W){return w._waitingQueue.push(Sn(A.bind(null,W)))},function(W){return w._waitingQueue.push(Sn(L.bind(null,W)))}).finally(function(){w._waitingFor===T&&(w._waitingFor=null)})})},Ns.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Be.Abort))},Ns.prototype.table=function(p){var v=this._memoizedTables||(this._memoizedTables={});if(d(v,p))return v[p];var w=this.schema[p];if(!w)throw new Be.NotFound("Table "+p+" not part of transaction");return w=new this.db.Table(p,w,this),w.core=this.db.core.table(p),v[p]=w},Ns);function Ns(){}function qS(p,v,w,D,T,A,L){return{name:p,keyPath:v,unique:w,multi:D,auto:T,compound:A,src:(w&&!L?"&":"")+(D?"*":"")+(T?"++":"")+eL(v)}}function eL(p){return typeof p=="string"?p:p?"["+[].join.call(p,"+")+"]":""}function YS(p,v,w){return{name:p,primKey:v,indexes:w,mappedClass:null,idxByName:(D=function(T){return[T.name,T]},w.reduce(function(T,A,L){return L=D(A,L),L&&(T[L[0]]=L[1]),T},{}))};var D}var Fh=function(p){try{return p.only([[]]),Fh=function(){return[[]]},[[]]}catch{return Fh=function(){return Sl},Sl}};function ZS(p){return p==null?function(){}:typeof p=="string"?(v=p).split(".").length===1?function(w){return w[v]}:function(w){return E(w,v)}:function(w){return E(w,p)};var v}function tL(p){return[].slice.call(p)}var Ude=0;function Th(p){return p==null?":id":typeof p=="string"?p:"[".concat(p.join("+"),"]")}function jde(p,v,Q){function D(ne){if(ne.type===3)return null;if(ne.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var ee=ne.lower,oe=ne.upper,re=ne.lowerOpen,ne=ne.upperOpen;return ee===void 0?oe===void 0?null:v.upperBound(oe,!!ne):oe===void 0?v.lowerBound(ee,!!re):v.bound(ee,oe,!!re,!!ne)}function T(le){var ee,oe=le.name;return{name:oe,schema:le,mutate:function(re){var ne=re.trans,he=re.type,me=re.keys,ve=re.values,Re=re.range;return new Promise(function(He,Ze){He=Sn(He);var Ge=ne.objectStore(oe),ze=Ge.keyPath==null,Qe=he==="put"||he==="add";if(!Qe&&he!=="delete"&&he!=="deleteRange")throw new Error("Invalid operation type: "+he);var qe,st=(me||ve||{length:1}).length;if(me&&ve&&me.length!==ve.length)throw new Error("Given keys array must have same length as given values array.");if(st===0)return He({numFailures:0,failures:{},results:[],lastResult:void 0});function At(xi){++io,_h(xi)}var Vt=[],Bt=[],io=0;if(he==="deleteRange"){if(Re.type===4)return He({numFailures:io,failures:Bt,results:[],lastResult:void 0});Re.type===3?Vt.push(qe=Ge.clear()):Vt.push(qe=Ge.delete(D(Re)))}else{var ze=Qe?ze?[ve,me]:[ve,null]:[me,null],Tt=ze[0],vi=ze[1];if(Qe)for(var yi=0;yi<st;++yi)Vt.push(qe=vi&&vi[yi]!==void 0?Ge[he](Tt[yi],vi[yi]):Ge[he](Tt[yi])),qe.onerror=At;else for(yi=0;yi<st;++yi)Vt.push(qe=Ge[he](Tt[yi])),qe.onerror=At}function Vm(xi){xi=xi.target.result,Vt.forEach(function(_l,p0){return _l.error!=null&&(Bt[p0]=_l.error)}),He({numFailures:io,failures:Bt,results:he==="delete"?me:Vt.map(function(_l){return _l.result}),lastResult:xi})}qe.onerror=function(xi){At(xi),Vm(xi)},qe.onsuccess=Vm})},getMany:function(re){var ne=re.trans,he=re.keys;return new Promise(function(me,ve){me=Sn(me);for(var Re,He=ne.objectStore(oe),Ze=he.length,Ge=new Array(Ze),ze=0,Qe=0,qe=function(Vt){Vt=Vt.target,Ge[Vt._pos]=Vt.result,++Qe===ze&&me(Ge)},st=Ls(ve),At=0;At<Ze;++At)he[At]!=null&&((Re=He.get(he[At]))._pos=At,Re.onsuccess=qe,Re.onerror=st,++ze);ze===0&&me(Ge)})},get:function(re){var ne=re.trans,he=re.key;return new Promise(function(me,ve){me=Sn(me);var Re=ne.objectStore(oe).get(he);Re.onsuccess=function(He){return me(He.target.result)},Re.onerror=Ls(ve)})},query:(ee=te,function(re){return new Promise(function(ne,he){ne=Sn(ne);var me,ve,Re,ze=re.trans,He=re.values,Ze=re.limit,qe=re.query,Ge=Ze===1/0?void 0:Ze,Qe=qe.index,qe=qe.range,ze=ze.objectStore(oe),Qe=Qe.isPrimaryKey?ze:ze.index(Qe.name),qe=D(qe);if(Ze===0)return ne({result:[]});ee?((Ge=He?Qe.getAll(qe,Ge):Qe.getAllKeys(qe,Ge)).onsuccess=function(st){return ne({result:st.target.result})},Ge.onerror=Ls(he)):(me=0,ve=!He&&"openKeyCursor"in Qe?Qe.openKeyCursor(qe):Qe.openCursor(qe),Re=[],ve.onsuccess=function(st){var At=ve.result;return At?(Re.push(He?At.value:At.primaryKey),++me===Ze?ne({result:Re}):void At.continue()):ne({result:Re})},ve.onerror=Ls(he))})}),openCursor:function(re){var ne=re.trans,he=re.values,me=re.query,ve=re.reverse,Re=re.unique;return new Promise(function(He,Ze){He=Sn(He);var Qe=me.index,Ge=me.range,ze=ne.objectStore(oe),ze=Qe.isPrimaryKey?ze:ze.index(Qe.name),Qe=ve?Re?"prevunique":"prev":Re?"nextunique":"next",qe=!he&&"openKeyCursor"in ze?ze.openKeyCursor(D(Ge),Qe):ze.openCursor(D(Ge),Qe);qe.onerror=Ls(Ze),qe.onsuccess=Sn(function(st){var At,Vt,Bt,io,Tt=qe.result;Tt?(Tt.___id=++Ude,Tt.done=!1,At=Tt.continue.bind(Tt),Vt=(Vt=Tt.continuePrimaryKey)&&Vt.bind(Tt),Bt=Tt.advance.bind(Tt),io=function(){throw new Error("Cursor not stopped")},Tt.trans=ne,Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=function(){throw new Error("Cursor not started")},Tt.fail=Sn(Ze),Tt.next=function(){var vi=this,yi=1;return this.start(function(){return yi--?vi.continue():vi.stop()}).then(function(){return vi})},Tt.start=function(vi){function yi(){if(qe.result)try{vi()}catch(xi){Tt.fail(xi)}else Tt.done=!0,Tt.start=function(){throw new Error("Cursor behind last entry")},Tt.stop()}var Vm=new Promise(function(xi,_l){xi=Sn(xi),qe.onerror=Ls(_l),Tt.fail=_l,Tt.stop=function(p0){Tt.stop=Tt.continue=Tt.continuePrimaryKey=Tt.advance=io,xi(p0)}});return qe.onsuccess=Sn(function(xi){qe.onsuccess=yi,yi()}),Tt.continue=At,Tt.continuePrimaryKey=Vt,Tt.advance=Bt,yi(),Vm},He(Tt)):He(null)},Ze)})},count:function(re){var ne=re.query,he=re.trans,me=ne.index,ve=ne.range;return new Promise(function(Re,He){var Ze=he.objectStore(oe),Ge=me.isPrimaryKey?Ze:Ze.index(me.name),Ze=D(ve),Ge=Ze?Ge.count(Ze):Ge.count();Ge.onsuccess=Sn(function(ze){return Re(ze.target.result)}),Ge.onerror=Ls(He)})}}}var A,L,W,se=(L=Q,W=tL((A=p).objectStoreNames),{schema:{name:A.name,tables:W.map(function(le){return L.objectStore(le)}).map(function(le){var ee=le.keyPath,ne=le.autoIncrement,oe=a(ee),re={},ne={name:le.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:ee==null,compound:oe,keyPath:ee,autoIncrement:ne,unique:!0,extractKey:ZS(ee)},indexes:tL(le.indexNames).map(function(he){return le.index(he)}).map(function(Re){var me=Re.name,ve=Re.unique,He=Re.multiEntry,Re=Re.keyPath,He={name:me,compound:a(Re),keyPath:Re,unique:ve,multiEntry:He,extractKey:ZS(Re)};return re[Th(Re)]=He}),getIndexByKeyPath:function(he){return re[Th(he)]}};return re[":id"]=ne.primaryKey,ee!=null&&(re[Th(ee)]=ne.primaryKey),ne})},hasGetAll:0<W.length&&"getAll"in L.objectStore(W[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),Q=se.schema,te=se.hasGetAll,se=Q.tables.map(T),U={};return se.forEach(function(le){return U[le.name]=le}),{stack:"dbcore",transaction:p.transaction.bind(p),table:function(le){if(!U[le])throw new Error("Table '".concat(le,"' not found"));return U[le]},MIN_KEY:-1/0,MAX_KEY:Fh(v),schema:Q}}function Kde(p,v,w,D){var T=w.IDBKeyRange;return w.indexedDB,{dbcore:(D=jde(v,T,D),p.dbcore.reduce(function(A,L){return L=L.create,i(i({},A),L(A))},D))}}function _m(p,D){var w=D.db,D=Kde(p._middlewares,w,p._deps,D);p.core=D.dbcore,p.tables.forEach(function(T){var A=T.name;p.core.schema.tables.some(function(L){return L.name===A})&&(T.core=p.core.table(A),p[A]instanceof p.Table&&(p[A].core=T.core))})}function xm(p,v,w,D){w.forEach(function(T){var A=D[T];v.forEach(function(L){var W=function Q(te,se){return y(te,se)||(te=c(te))&&Q(te,se)}(L,T);(!W||"value"in W&&W.value===void 0)&&(L===p.Transaction.prototype||L instanceof p.Transaction?g(L,T,{get:function(){return this.table(T)},set:function(Q){f(this,T,{value:Q,writable:!0,configurable:!0,enumerable:!0})}}):L[T]=new p.Table(T,A))})})}function XS(p,v){v.forEach(function(w){for(var D in w)w[D]instanceof p.Table&&delete w[D]})}function qde(p,v){return p._cfg.version-v._cfg.version}function Yde(p,v,w,D){var T=p._dbSchema;w.objectStoreNames.contains("$meta")&&!T.$meta&&(T.$meta=YS("$meta",iL("")[0],[]),p._storeNames.push("$meta"));var A=p._createTransaction("readwrite",p._storeNames,T);A.create(w),A._completion.catch(D);var L=A._reject.bind(A),W=fe.transless||fe;ua(function(){return fe.trans=A,fe.transless=W,v!==0?(_m(p,w),te=v,((Q=A).storeNames.includes("$meta")?Q.table("$meta").get("version").then(function(se){return se??te}):Le.resolve(te)).then(function(se){return le=se,ee=A,oe=w,re=[],se=(U=p)._versions,ne=U._dbSchema=Tm(0,U.idbdb,oe),(se=se.filter(function(he){return he._cfg.version>=le})).length!==0?(se.forEach(function(he){re.push(function(){var me=ne,ve=he._cfg.dbschema;Pm(U,me,oe),Pm(U,ve,oe),ne=U._dbSchema=ve;var Re=JS(me,ve);Re.add.forEach(function(Qe){QS(oe,Qe[0],Qe[1].primKey,Qe[1].indexes)}),Re.change.forEach(function(Qe){if(Qe.recreate)throw new Be.Upgrade("Not yet support for changing primary key");var qe=oe.objectStore(Qe.name);Qe.add.forEach(function(st){return Fm(qe,st)}),Qe.change.forEach(function(st){qe.deleteIndex(st.name),Fm(qe,st)}),Qe.del.forEach(function(st){return qe.deleteIndex(st)})});var He=he._cfg.contentUpgrade;if(He&&he._cfg.version>le){_m(U,oe),ee._memoizedTables={};var Ze=I(ve);Re.del.forEach(function(Qe){Ze[Qe]=me[Qe]}),XS(U,[U.Transaction.prototype]),xm(U,[U.Transaction.prototype],r(Ze),Ze),ee.schema=Ze;var Ge,ze=ue(He);return ze&&iu(),Re=Le.follow(function(){var Qe;(Ge=He(ee))&&ze&&(Qe=da.bind(null,null),Ge.then(Qe,Qe))}),Ge&&typeof Ge.then=="function"?Le.resolve(Ge):Re.then(function(){return Ge})}}),re.push(function(me){var ve,Re,He=he._cfg.dbschema;ve=He,Re=me,[].slice.call(Re.db.objectStoreNames).forEach(function(Ze){return ve[Ze]==null&&Re.db.deleteObjectStore(Ze)}),XS(U,[U.Transaction.prototype]),xm(U,[U.Transaction.prototype],U._storeNames,U._dbSchema),ee.schema=U._dbSchema}),re.push(function(me){U.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(U.idbdb.version/10)===he._cfg.version?(U.idbdb.deleteObjectStore("$meta"),delete U._dbSchema.$meta,U._storeNames=U._storeNames.filter(function(ve){return ve!=="$meta"})):me.objectStore("$meta").put(he._cfg.version,"version"))})}),function he(){return re.length?Le.resolve(re.shift()(ee.idbtrans)).then(he):Le.resolve()}().then(function(){nL(ne,oe)})):Le.resolve();var U,le,ee,oe,re,ne}).catch(L)):(r(T).forEach(function(se){QS(w,se,T[se].primKey,T[se].indexes)}),_m(p,w),void Le.follow(function(){return p.on.populate.fire(A)}).catch(L));var Q,te})}function Zde(p,v){nL(p._dbSchema,v),v.db.version%10!=0||v.objectStoreNames.contains("$meta")||v.db.createObjectStore("$meta").add(Math.ceil(v.db.version/10-1),"version");var w=Tm(0,p.idbdb,v);Pm(p,p._dbSchema,v);for(var D=0,T=JS(w,p._dbSchema).change;D<T.length;D++){var A=function(L){if(L.change.length||L.recreate)return console.warn("Unable to patch indexes of table ".concat(L.name," because it has changes on the type of index or primary key.")),{value:void 0};var W=v.objectStore(L.name);L.add.forEach(function(Q){Pe&&console.debug("Dexie upgrade patch: Creating missing index ".concat(L.name,".").concat(Q.src)),Fm(W,Q)})}(T[D]);if(typeof A=="object")return A.value}}function JS(p,v){var w,D={del:[],add:[],change:[]};for(w in p)v[w]||D.del.push(w);for(w in v){var T=p[w],A=v[w];if(T){var L={name:w,def:A,recreate:!1,del:[],add:[],change:[]};if(""+(T.primKey.keyPath||"")!=""+(A.primKey.keyPath||"")||T.primKey.auto!==A.primKey.auto)L.recreate=!0,D.change.push(L);else{var W=T.idxByName,Q=A.idxByName,te=void 0;for(te in W)Q[te]||L.del.push(te);for(te in Q){var se=W[te],U=Q[te];se?se.src!==U.src&&L.change.push(U):L.add.push(U)}(0<L.del.length||0<L.add.length||0<L.change.length)&&D.change.push(L)}}else D.add.push([w,A])}return D}function QS(p,v,w,D){var T=p.db.createObjectStore(v,w.keyPath?{keyPath:w.keyPath,autoIncrement:w.auto}:{autoIncrement:w.auto});return D.forEach(function(A){return Fm(T,A)}),T}function nL(p,v){r(p).forEach(function(w){v.db.objectStoreNames.contains(w)||(Pe&&console.debug("Dexie: Creating missing table",w),QS(v,w,p[w].primKey,p[w].indexes))})}function Fm(p,v){p.createIndex(v.name,v.keyPath,{unique:v.unique,multiEntry:v.multi})}function Tm(p,v,w){var D={};return S(v.objectStoreNames,0).forEach(function(T){for(var A=w.objectStore(T),L=qS(eL(te=A.keyPath),te||"",!0,!1,!!A.autoIncrement,te&&typeof te!="string",!0),W=[],Q=0;Q<A.indexNames.length;++Q){var se=A.index(A.indexNames[Q]),te=se.keyPath,se=qS(se.name,te,!!se.unique,!!se.multiEntry,!1,te&&typeof te!="string",!1);W.push(se)}D[T]=YS(T,L,W)}),D}function Pm(p,v,w){for(var D=w.db.objectStoreNames,T=0;T<D.length;++T){var A=D[T],L=w.objectStore(A);p._hasGetAll="getAll"in L;for(var W=0;W<L.indexNames.length;++W){var Q=L.indexNames[W],te=L.index(Q).keyPath,se=typeof te=="string"?te:"["+S(te).join("+")+"]";!v[A]||(te=v[A].idxByName[se])&&(te.name=Q,delete v[A].idxByName[se],v[A].idxByName[Q]=te)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(p._hasGetAll=!1)}function iL(p){return p.split(",").map(function(v,w){var D=(v=v.trim()).replace(/([&*]|\+\+)/g,""),T=/^\[/.test(D)?D.match(/^\[(.*)\]$/)[1].split("+"):D;return qS(D,T||null,/\&/.test(v),/\*/.test(v),/\+\+/.test(v),a(T),w===0)})}var Xde=(Im.prototype._parseStoresSpec=function(p,v){r(p).forEach(function(w){if(p[w]!==null){var D=iL(p[w]),T=D.shift();if(T.unique=!0,T.multi)throw new Be.Schema("Primary key cannot be multi-valued");D.forEach(function(A){if(A.auto)throw new Be.Schema("Only primary key can be marked as autoIncrement (++)");if(!A.keyPath)throw new Be.Schema("Index must have a name and cannot be an empty string")}),v[w]=YS(w,T,D)}})},Im.prototype.stores=function(w){var v=this.db;this._cfg.storesSource=this._cfg.storesSource?l(this._cfg.storesSource,w):w;var w=v._versions,D={},T={};return w.forEach(function(A){l(D,A._cfg.storesSource),T=A._cfg.dbschema={},A._parseStoresSpec(D,T)}),v._dbSchema=T,XS(v,[v._allTables,v,v.Transaction.prototype]),xm(v,[v._allTables,v,v.Transaction.prototype,this._cfg.tables],r(T),T),v._storeNames=r(T),this},Im.prototype.upgrade=function(p){return this._cfg.contentUpgrade=Ae(this._cfg.contentUpgrade||Ot,p),this},Im);function Im(){}function e0(p,v){var w=p._dbNamesDB;return w||(w=p._dbNamesDB=new Sr(bm,{addons:[],indexedDB:p,IDBKeyRange:v})).version(1).stores({dbnames:"name"}),w.table("dbnames")}function t0(p){return p&&typeof p.databases=="function"}function n0(p){return ua(function(){return fe.letThrough=!0,p()})}function i0(p){return!("from"in p)}var mi=function(p,v){if(!this){var w=new mi;return p&&"d"in p&&l(w,p),w}l(this,arguments.length?{d:1,from:p,to:1<arguments.length?v:p}:{d:0})};function Ph(p,v,w){var D=Gt(v,w);if(!isNaN(D)){if(0<D)throw RangeError();if(i0(p))return l(p,{from:v,to:w,d:1});var T=p.l,D=p.r;if(Gt(w,p.from)<0)return T?Ph(T,v,w):p.l={from:v,to:w,d:1,l:null,r:null},sL(p);if(0<Gt(v,p.to))return D?Ph(D,v,w):p.r={from:v,to:w,d:1,l:null,r:null},sL(p);Gt(v,p.from)<0&&(p.from=v,p.l=null,p.d=D?D.d+1:1),0<Gt(w,p.to)&&(p.to=w,p.r=null,p.d=p.l?p.l.d+1:1),w=!p.r,T&&!p.l&&Ih(p,T),D&&w&&Ih(p,D)}}function Ih(p,v){i0(v)||function w(D,Q){var A=Q.from,L=Q.to,W=Q.l,Q=Q.r;Ph(D,A,L),W&&w(D,W),Q&&w(D,Q)}(p,v)}function oL(p,v){var w=Am(v),D=w.next();if(D.done)return!1;for(var T=D.value,A=Am(p),L=A.next(T.from),W=L.value;!D.done&&!L.done;){if(Gt(W.from,T.to)<=0&&0<=Gt(W.to,T.from))return!0;Gt(T.from,W.from)<0?T=(D=w.next(W.from)).value:W=(L=A.next(T.from)).value}return!1}function Am(p){var v=i0(p)?null:{s:0,n:p};return{next:function(w){for(var D=0<arguments.length;v;)switch(v.s){case 0:if(v.s=1,D)for(;v.n.l&&Gt(w,v.n.from)<0;)v={up:v,n:v.n.l,s:1};else for(;v.n.l;)v={up:v,n:v.n.l,s:1};case 1:if(v.s=2,!D||Gt(w,v.n.to)<=0)return{value:v.n,done:!1};case 2:if(v.n.r){v.s=3,v={up:v,n:v.n.r,s:0};continue}case 3:v=v.up}return{done:!0}}}}function sL(p){var v,w,D=(((v=p.r)===null||v===void 0?void 0:v.d)||0)-(((w=p.l)===null||w===void 0?void 0:w.d)||0),T=1<D?"r":D<-1?"l":"";T&&(v=T=="r"?"l":"r",w=i({},p),D=p[T],p.from=D.from,p.to=D.to,p[T]=D[T],w[T]=D[v],(p[v]=w).d=rL(w)),p.d=rL(p)}function rL(w){var v=w.r,w=w.l;return(v?w?Math.max(v.d,w.d):v.d:w?w.d:0)+1}function km(p,v){return r(v).forEach(function(w){p[w]?Ih(p[w],v[w]):p[w]=function D(T){var A,L,W={};for(A in T)d(T,A)&&(L=T[A],W[A]=!L||typeof L!="object"||x.has(L.constructor)?L:D(L));return W}(v[w])}),p}function o0(p,v){return p.all||v.all||Object.keys(p).some(function(w){return v[w]&&oL(v[w],p[w])})}h(mi.prototype,((Fo={add:function(p){return Ih(this,p),this},addKey:function(p){return Ph(this,p,p),this},addKeys:function(p){var v=this;return p.forEach(function(w){return Ph(v,w,w)}),this},hasKey:function(p){var v=Am(this).next(p).value;return v&&Gt(v.from,p)<=0&&0<=Gt(v.to,p)}})[B]=function(){return Am(this)},Fo));var Rl={},s0={},r0=!1;function Om(p){km(s0,p),r0||(r0=!0,setTimeout(function(){r0=!1,a0(s0,!(s0={}))},0))}function a0(p,v){v===void 0&&(v=!1);var w=new Set;if(p.all)for(var D=0,T=Object.values(Rl);D<T.length;D++)aL(L=T[D],p,w,v);else for(var A in p){var L,W=/^idb\:\/\/(.*)\/(.*)\//.exec(A);W&&(A=W[1],W=W[2],(L=Rl["idb://".concat(A,"/").concat(W)])&&aL(L,p,w,v))}w.forEach(function(Q){return Q()})}function aL(p,v,w,D){for(var T=[],A=0,L=Object.entries(p.queries.query);A<L.length;A++){for(var W=L[A],Q=W[0],te=[],se=0,U=W[1];se<U.length;se++){var le=U[se];o0(v,le.obsSet)?le.subscribers.forEach(function(ne){return w.add(ne)}):D&&te.push(le)}D&&T.push([Q,te])}if(D)for(var ee=0,oe=T;ee<oe.length;ee++){var re=oe[ee],Q=re[0],te=re[1];p.queries.query[Q]=te}}function Jde(p){var v=p._state,w=p._deps.indexedDB;if(v.isBeingOpened||p.idbdb)return v.dbReadyPromise.then(function(){return v.dbOpenError?Nn(v.dbOpenError):p});v.isBeingOpened=!0,v.dbOpenError=null,v.openComplete=!1;var D=v.openCanceller,T=Math.round(10*p.verno),A=!1;function L(){if(v.openCanceller!==D)throw new Be.DatabaseClosed("db.open() was cancelled")}function W(){return new Le(function(le,ee){if(L(),!w)throw new Be.MissingAPI;var oe=p.name,re=v.autoSchema||!T?w.open(oe):w.open(oe,T);if(!re)throw new Be.MissingAPI;re.onerror=Ls(ee),re.onblocked=Sn(p._fireOnBlocked),re.onupgradeneeded=Sn(function(ne){var he;se=re.transaction,v.autoSchema&&!p._options.allowEmptyDB?(re.onerror=_h,se.abort(),re.result.close(),(he=w.deleteDatabase(oe)).onsuccess=he.onerror=Sn(function(){ee(new Be.NoSuchDatabase("Database ".concat(oe," doesnt exist")))})):(se.onerror=Ls(ee),ne=ne.oldVersion>Math.pow(2,62)?0:ne.oldVersion,U=ne<1,p.idbdb=re.result,A&&Zde(p,se),Yde(p,ne/10,se,ee))},ee),re.onsuccess=Sn(function(){se=null;var ne,he,me,ve,Re,He=p.idbdb=re.result,Ze=S(He.objectStoreNames);if(0<Ze.length)try{var Ge=He.transaction((ve=Ze).length===1?ve[0]:ve,"readonly");if(v.autoSchema)he=He,me=Ge,(ne=p).verno=he.version/10,me=ne._dbSchema=Tm(0,he,me),ne._storeNames=S(he.objectStoreNames,0),xm(ne,[ne._allTables],r(me),me);else if(Pm(p,p._dbSchema,Ge),((Re=JS(Tm(0,(Re=p).idbdb,Ge),Re._dbSchema)).add.length||Re.change.some(function(ze){return ze.add.length||ze.change.length}))&&!A)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),He.close(),T=He.version+1,A=!0,le(W());_m(p,Ge)}catch{}ou.push(p),He.onversionchange=Sn(function(ze){v.vcFired=!0,p.on("versionchange").fire(ze)}),He.onclose=Sn(function(ze){p.on("close").fire(ze)}),U&&(Re=p._deps,Ge=oe,He=Re.indexedDB,Re=Re.IDBKeyRange,t0(He)||Ge===bm||e0(He,Re).put({name:Ge}).catch(Ot)),le()},ee)}).catch(function(le){switch(le==null?void 0:le.name){case"UnknownError":if(0<v.PR1398_maxLoop)return v.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),W();break;case"VersionError":if(0<T)return T=0,W()}return Le.reject(le)})}var Q,te=v.dbReadyResolve,se=null,U=!1;return Le.race([D,(typeof navigator>"u"?Le.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(le){function ee(){return indexedDB.databases().finally(le)}Q=setInterval(ee,100),ee()}).finally(function(){return clearInterval(Q)}):Promise.resolve()).then(W)]).then(function(){return L(),v.onReadyBeingFired=[],Le.resolve(n0(function(){return p.on.ready.fire(p.vip)})).then(function le(){if(0<v.onReadyBeingFired.length){var ee=v.onReadyBeingFired.reduce(Ae,Ot);return v.onReadyBeingFired=[],Le.resolve(n0(function(){return ee(p.vip)})).then(le)}})}).finally(function(){v.openCanceller===D&&(v.onReadyBeingFired=null,v.isBeingOpened=!1)}).catch(function(le){v.dbOpenError=le;try{se&&se.abort()}catch{}return D===v.openCanceller&&p._close(),Nn(le)}).finally(function(){v.openComplete=!0,te()}).then(function(){var le;return U&&(le={},p.tables.forEach(function(ee){ee.schema.indexes.forEach(function(oe){oe.name&&(le["idb://".concat(p.name,"/").concat(ee.name,"/").concat(oe.name)]=new mi(-1/0,[[[]]]))}),le["idb://".concat(p.name,"/").concat(ee.name,"/")]=le["idb://".concat(p.name,"/").concat(ee.name,"/:dels")]=new mi(-1/0,[[[]]])}),pa(xh).fire(le),a0(le,!0)),p})}function l0(p){function v(A){return p.next(A)}var w=T(v),D=T(function(A){return p.throw(A)});function T(A){return function(Q){var W=A(Q),Q=W.value;return W.done?Q:Q&&typeof Q.then=="function"?Q.then(w,D):a(Q)?Promise.all(Q).then(w,D):w(Q)}}return T(v)()}function Mm(p,v,w){for(var D=a(p)?p.slice():[p],T=0;T<w;++T)D.push(v);return D}var Qde={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),D=w.schema,T={},A=[];function L(U,le,ee){var oe=Th(U),re=T[oe]=T[oe]||[],ne=U==null?0:typeof U=="string"?1:U.length,he=0<le,he=i(i({},ee),{name:he?"".concat(oe,"(virtual-from:").concat(ee.name,")"):ee.name,lowLevelIndex:ee,isVirtual:he,keyTail:le,keyLength:ne,extractKey:ZS(U),unique:!he&&ee.unique});return re.push(he),he.isPrimaryKey||A.push(he),1<ne&&L(ne===2?U[0]:U.slice(0,ne-1),le+1,ee),re.sort(function(me,ve){return me.keyTail-ve.keyTail}),he}v=L(D.primaryKey.keyPath,0,D.primaryKey),T[":id"]=[v];for(var W=0,Q=D.indexes;W<Q.length;W++){var te=Q[W];L(te.keyPath,0,te)}function se(U){var le,ee=U.query.index;return ee.isVirtual?i(i({},U),{query:{index:ee.lowLevelIndex,range:(le=U.query.range,ee=ee.keyTail,{type:le.type===1?2:le.type,lower:Mm(le.lower,le.lowerOpen?p.MAX_KEY:p.MIN_KEY,ee),lowerOpen:!0,upper:Mm(le.upper,le.upperOpen?p.MIN_KEY:p.MAX_KEY,ee),upperOpen:!0})}}):U}return i(i({},w),{schema:i(i({},D),{primaryKey:v,indexes:A,getIndexByKeyPath:function(U){return(U=T[Th(U)])&&U[0]}}),count:function(U){return w.count(se(U))},query:function(U){return w.query(se(U))},openCursor:function(U){var le=U.query.index,ee=le.keyTail,oe=le.isVirtual,re=le.keyLength;return oe?w.openCursor(se(U)).then(function(he){return he&&ne(he)}):w.openCursor(U);function ne(he){return Object.create(he,{continue:{value:function(me){me!=null?he.continue(Mm(me,U.reverse?p.MAX_KEY:p.MIN_KEY,ee)):U.unique?he.continue(he.key.slice(0,re).concat(U.reverse?p.MIN_KEY:p.MAX_KEY,ee)):he.continue()}},continuePrimaryKey:{value:function(me,ve){he.continuePrimaryKey(Mm(me,p.MAX_KEY,ee),ve)}},primaryKey:{get:function(){return he.primaryKey}},key:{get:function(){var me=he.key;return re===1?me[0]:me.slice(0,re)}},value:{get:function(){return he.value}}})}}})}})}};function c0(p,v,w,D){return w=w||{},D=D||"",r(p).forEach(function(T){var A,L,W;d(v,T)?(A=p[T],L=v[T],typeof A=="object"&&typeof L=="object"&&A&&L?(W=ie(A))!==ie(L)?w[D+T]=v[T]:W==="Object"?c0(A,L,w,D+T+"."):A!==L&&(w[D+T]=v[T]):A!==L&&(w[D+T]=v[T])):w[D+T]=void 0}),r(v).forEach(function(T){d(p,T)||(w[D+T]=v[T])}),w}function u0(p,v){return v.type==="delete"?v.keys:v.keys||v.values.map(p.extractKey)}var ehe={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(p){return i(i({},p),{table:function(v){var w=p.table(v),D=w.schema.primaryKey;return i(i({},w),{mutate:function(T){var A=fe.trans,L=A.table(v).hook,W=L.deleting,Q=L.creating,te=L.updating;switch(T.type){case"add":if(Q.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"put":if(Q.fire===Ot&&te.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"delete":if(W.fire===Ot)break;return A._promise("readwrite",function(){return se(T)},!0);case"deleteRange":if(W.fire===Ot)break;return A._promise("readwrite",function(){return function U(le,ee,oe){return w.query({trans:le,values:!1,query:{index:D,range:ee},limit:oe}).then(function(re){var ne=re.result;return se({type:"delete",keys:ne,trans:le}).then(function(he){return 0<he.numFailures?Promise.reject(he.failures[0]):ne.length<oe?{failures:[],numFailures:0,lastResult:void 0}:U(le,i(i({},ee),{lower:ne[ne.length-1],lowerOpen:!0}),oe)})})}(T.trans,T.range,1e4)},!0)}return w.mutate(T);function se(U){var le,ee,oe,re=fe.trans,ne=U.keys||u0(D,U);if(!ne)throw new Error("Keys missing");return(U=U.type==="add"||U.type==="put"?i(i({},U),{keys:ne}):i({},U)).type!=="delete"&&(U.values=o([],U.values)),U.keys&&(U.keys=o([],U.keys)),le=w,oe=ne,((ee=U).type==="add"?Promise.resolve([]):le.getMany({trans:ee.trans,keys:oe,cache:"immutable"})).then(function(he){var me=ne.map(function(ve,Re){var He,Ze,Ge,ze=he[Re],Qe={onerror:null,onsuccess:null};return U.type==="delete"?W.fire.call(Qe,ve,ze,re):U.type==="add"||ze===void 0?(He=Q.fire.call(Qe,ve,U.values[Re],re),ve==null&&He!=null&&(U.keys[Re]=ve=He,D.outbound||_(U.values[Re],D.keyPath,ve))):(He=c0(ze,U.values[Re]),(Ze=te.fire.call(Qe,He,ve,ze,re))&&(Ge=U.values[Re],Object.keys(Ze).forEach(function(qe){d(Ge,qe)?Ge[qe]=Ze[qe]:_(Ge,qe,Ze[qe])}))),Qe});return w.mutate(U).then(function(ve){for(var Re=ve.failures,He=ve.results,Ze=ve.numFailures,ve=ve.lastResult,Ge=0;Ge<ne.length;++Ge){var ze=(He||ne)[Ge],Qe=me[Ge];ze==null?Qe.onerror&&Qe.onerror(Re[Ge]):Qe.onsuccess&&Qe.onsuccess(U.type==="put"&&he[Ge]?U.values[Ge]:ze)}return{failures:Re,results:He,numFailures:Ze,lastResult:ve}}).catch(function(ve){return me.forEach(function(Re){return Re.onerror&&Re.onerror(ve)}),Promise.reject(ve)})})}}})}})}};function lL(p,v,w){try{if(!v||v.keys.length<p.length)return null;for(var D=[],T=0,A=0;T<v.keys.length&&A<p.length;++T)Gt(v.keys[T],p[A])===0&&(D.push(w?N(v.values[T]):v.values[T]),++A);return D.length===p.length?D:null}catch{return null}}var the={stack:"dbcore",level:-1,create:function(p){return{table:function(v){var w=p.table(v);return i(i({},w),{getMany:function(D){if(!D.cache)return w.getMany(D);var T=lL(D.keys,D.trans._cache,D.cache==="clone");return T?Le.resolve(T):w.getMany(D).then(function(A){return D.trans._cache={keys:D.keys,values:D.cache==="clone"?N(A):A},A})},mutate:function(D){return D.type!=="add"&&(D.trans._cache=null),w.mutate(D)}})}}}};function cL(p,v){return p.trans.mode==="readonly"&&!!p.subscr&&!p.trans.explicit&&p.trans.db._options.cache!=="disabled"&&!v.schema.primaryKey.outbound}function uL(p,v){switch(p){case"query":return v.values&&!v.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var nhe={stack:"dbcore",level:0,name:"Observability",create:function(p){var v=p.schema.name,w=new mi(p.MIN_KEY,p.MAX_KEY);return i(i({},p),{transaction:function(D,T,A){if(fe.subscr&&T!=="readonly")throw new Be.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(fe.querier));return p.transaction(D,T,A)},table:function(D){var T=p.table(D),A=T.schema,L=A.primaryKey,U=A.indexes,W=L.extractKey,Q=L.outbound,te=L.autoIncrement&&U.filter(function(ee){return ee.compound&&ee.keyPath.includes(L.keyPath)}),se=i(i({},T),{mutate:function(ee){function oe(qe){return qe="idb://".concat(v,"/").concat(D,"/").concat(qe),ve[qe]||(ve[qe]=new mi)}var re,ne,he,me=ee.trans,ve=ee.mutatedParts||(ee.mutatedParts={}),Re=oe(""),He=oe(":dels"),Ze=ee.type,Qe=ee.type==="deleteRange"?[ee.range]:ee.type==="delete"?[ee.keys]:ee.values.length<50?[u0(L,ee).filter(function(qe){return qe}),ee.values]:[],Ge=Qe[0],ze=Qe[1],Qe=ee.trans._cache;return a(Ge)?(Re.addKeys(Ge),(Qe=Ze==="delete"||Ge.length===ze.length?lL(Ge,Qe):null)||He.addKeys(Ge),(Qe||ze)&&(re=oe,ne=Qe,he=ze,A.indexes.forEach(function(qe){var st=re(qe.name||"");function At(Bt){return Bt!=null?qe.extractKey(Bt):null}function Vt(Bt){return qe.multiEntry&&a(Bt)?Bt.forEach(function(io){return st.addKey(io)}):st.addKey(Bt)}(ne||he).forEach(function(Bt,vi){var Tt=ne&&At(ne[vi]),vi=he&&At(he[vi]);Gt(Tt,vi)!==0&&(Tt!=null&&Vt(Tt),vi!=null&&Vt(vi))})}))):Ge?(ze={from:(ze=Ge.lower)!==null&&ze!==void 0?ze:p.MIN_KEY,to:(ze=Ge.upper)!==null&&ze!==void 0?ze:p.MAX_KEY},He.add(ze),Re.add(ze)):(Re.add(w),He.add(w),A.indexes.forEach(function(qe){return oe(qe.name).add(w)})),T.mutate(ee).then(function(qe){return!Ge||ee.type!=="add"&&ee.type!=="put"||(Re.addKeys(qe.results),te&&te.forEach(function(st){for(var At=ee.values.map(function(Tt){return st.extractKey(Tt)}),Vt=st.keyPath.findIndex(function(Tt){return Tt===L.keyPath}),Bt=0,io=qe.results.length;Bt<io;++Bt)At[Bt][Vt]=qe.results[Bt];oe(st.name).addKeys(At)})),me.mutatedParts=km(me.mutatedParts||{},ve),qe})}}),U=function(oe){var re=oe.query,oe=re.index,re=re.range;return[oe,new mi((oe=re.lower)!==null&&oe!==void 0?oe:p.MIN_KEY,(re=re.upper)!==null&&re!==void 0?re:p.MAX_KEY)]},le={get:function(ee){return[L,new mi(ee.key)]},getMany:function(ee){return[L,new mi().addKeys(ee.keys)]},count:U,query:U,openCursor:U};return r(le).forEach(function(ee){se[ee]=function(oe){var re=fe.subscr,ne=!!re,he=cL(fe,T)&&uL(ee,oe)?oe.obsSet={}:re;if(ne){var me=function(ze){return ze="idb://".concat(v,"/").concat(D,"/").concat(ze),he[ze]||(he[ze]=new mi)},ve=me(""),Re=me(":dels"),re=le[ee](oe),ne=re[0],re=re[1];if((ee==="query"&&ne.isPrimaryKey&&!oe.values?Re:me(ne.name||"")).add(re),!ne.isPrimaryKey){if(ee!=="count"){var He=ee==="query"&&Q&&oe.values&&T.query(i(i({},oe),{values:!1}));return T[ee].apply(this,arguments).then(function(ze){if(ee==="query"){if(Q&&oe.values)return He.then(function(At){return At=At.result,ve.addKeys(At),ze});var Qe=oe.values?ze.result.map(W):ze.result;(oe.values?ve:Re).addKeys(Qe)}else if(ee==="openCursor"){var qe=ze,st=oe.values;return qe&&Object.create(qe,{key:{get:function(){return Re.addKey(qe.primaryKey),qe.key}},primaryKey:{get:function(){var At=qe.primaryKey;return Re.addKey(At),At}},value:{get:function(){return st&&ve.addKey(qe.primaryKey),qe.value}}})}return ze})}Re.add(w)}}return T[ee].apply(this,arguments)}}),se}})}};function dL(p,v,w){if(w.numFailures===0)return v;if(v.type==="deleteRange")return null;var D=v.keys?v.keys.length:"values"in v&&v.values?v.values.length:1;return w.numFailures===D?null:(v=i({},v),a(v.keys)&&(v.keys=v.keys.filter(function(T,A){return!(A in w.failures)})),"values"in v&&a(v.values)&&(v.values=v.values.filter(function(T,A){return!(A in w.failures)})),v)}function d0(p,v){return w=p,((D=v).lower===void 0||(D.lowerOpen?0<Gt(w,D.lower):0<=Gt(w,D.lower)))&&(p=p,(v=v).upper===void 0||(v.upperOpen?Gt(p,v.upper)<0:Gt(p,v.upper)<=0));var w,D}function hL(p,v,le,D,T,A){if(!le||le.length===0)return p;var L=v.query.index,W=L.multiEntry,Q=v.query.range,te=D.schema.primaryKey.extractKey,se=L.extractKey,U=(L.lowLevelIndex||L).extractKey,le=le.reduce(function(ee,oe){var re=ee,ne=[];if(oe.type==="add"||oe.type==="put")for(var he=new mi,me=oe.values.length-1;0<=me;--me){var ve,Re=oe.values[me],He=te(Re);he.hasKey(He)||(ve=se(Re),(W&&a(ve)?ve.some(function(qe){return d0(qe,Q)}):d0(ve,Q))&&(he.addKey(He),ne.push(Re)))}switch(oe.type){case"add":var Ze=new mi().addKeys(v.values?ee.map(function(st){return te(st)}):ee),re=ee.concat(v.values?ne.filter(function(st){return st=te(st),!Ze.hasKey(st)&&(Ze.addKey(st),!0)}):ne.map(function(st){return te(st)}).filter(function(st){return!Ze.hasKey(st)&&(Ze.addKey(st),!0)}));break;case"put":var Ge=new mi().addKeys(oe.values.map(function(st){return te(st)}));re=ee.filter(function(st){return!Ge.hasKey(v.values?te(st):st)}).concat(v.values?ne:ne.map(function(st){return te(st)}));break;case"delete":var ze=new mi().addKeys(oe.keys);re=ee.filter(function(st){return!ze.hasKey(v.values?te(st):st)});break;case"deleteRange":var Qe=oe.range;re=ee.filter(function(st){return!d0(te(st),Qe)})}return re},p);return le===p?p:(le.sort(function(ee,oe){return Gt(U(ee),U(oe))||Gt(te(ee),te(oe))}),v.limit&&v.limit<1/0&&(le.length>v.limit?le.length=v.limit:p.length===v.limit&&le.length<v.limit&&(T.dirty=!0)),A?Object.freeze(le):le)}function fL(p,v){return Gt(p.lower,v.lower)===0&&Gt(p.upper,v.upper)===0&&!!p.lowerOpen==!!v.lowerOpen&&!!p.upperOpen==!!v.upperOpen}function ihe(p,v){return function(w,D,T,A){if(w===void 0)return D!==void 0?-1:0;if(D===void 0)return 1;if((D=Gt(w,D))===0){if(T&&A)return 0;if(T)return 1;if(A)return-1}return D}(p.lower,v.lower,p.lowerOpen,v.lowerOpen)<=0&&0<=function(w,D,T,A){if(w===void 0)return D!==void 0?1:0;if(D===void 0)return-1;if((D=Gt(w,D))===0){if(T&&A)return 0;if(T)return-1;if(A)return 1}return D}(p.upper,v.upper,p.upperOpen,v.upperOpen)}function ohe(p,v,w,D){p.subscribers.add(w),D.addEventListener("abort",function(){var T,A;p.subscribers.delete(w),p.subscribers.size===0&&(T=p,A=v,setTimeout(function(){T.subscribers.size===0&&X(A,T)},3e3))})}var she={stack:"dbcore",level:0,name:"Cache",create:function(p){var v=p.schema.name;return i(i({},p),{transaction:function(w,D,T){var A,L,W=p.transaction(w,D,T);return D==="readwrite"&&(L=(A=new AbortController).signal,T=function(Q){return function(){if(A.abort(),D==="readwrite"){for(var te=new Set,se=0,U=w;se<U.length;se++){var le=U[se],ee=Rl["idb://".concat(v,"/").concat(le)];if(ee){var oe=p.table(le),re=ee.optimisticOps.filter(function(st){return st.trans===W});if(W._explicit&&Q&&W.mutatedParts)for(var ne=0,he=Object.values(ee.queries.query);ne<he.length;ne++)for(var me=0,ve=(Ze=he[ne]).slice();me<ve.length;me++)o0((Ge=ve[me]).obsSet,W.mutatedParts)&&(X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)}));else if(0<re.length){ee.optimisticOps=ee.optimisticOps.filter(function(st){return st.trans!==W});for(var Re=0,He=Object.values(ee.queries.query);Re<He.length;Re++)for(var Ze,Ge,ze,Qe=0,qe=(Ze=He[Re]).slice();Qe<qe.length;Qe++)(Ge=qe[Qe]).res!=null&&W.mutatedParts&&(Q&&!Ge.dirty?(ze=Object.isFrozen(Ge.res),ze=hL(Ge.res,Ge.req,re,oe,Ge,ze),Ge.dirty?(X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)})):ze!==Ge.res&&(Ge.res=ze,Ge.promise=Le.resolve({result:ze}))):(Ge.dirty&&X(Ze,Ge),Ge.subscribers.forEach(function(st){return te.add(st)})))}}}te.forEach(function(st){return st()})}}},W.addEventListener("abort",T(!1),{signal:L}),W.addEventListener("error",T(!1),{signal:L}),W.addEventListener("complete",T(!0),{signal:L})),W},table:function(w){var D=p.table(w),T=D.schema.primaryKey;return i(i({},D),{mutate:function(A){var L=fe.trans;if(T.outbound||L.db._options.cache==="disabled"||L.explicit||L.idbtrans.mode!=="readwrite")return D.mutate(A);var W=Rl["idb://".concat(v,"/").concat(w)];return W?(L=D.mutate(A),A.type!=="add"&&A.type!=="put"||!(50<=A.values.length||u0(T,A).some(function(Q){return Q==null}))?(W.optimisticOps.push(A),A.mutatedParts&&Om(A.mutatedParts),L.then(function(Q){0<Q.numFailures&&(X(W.optimisticOps,A),(Q=dL(0,A,Q))&&W.optimisticOps.push(Q),A.mutatedParts&&Om(A.mutatedParts))}),L.catch(function(){X(W.optimisticOps,A),A.mutatedParts&&Om(A.mutatedParts)})):L.then(function(Q){var te=dL(0,i(i({},A),{values:A.values.map(function(se,U){var le;return Q.failures[U]?se:(se=(le=T.keyPath)!==null&&le!==void 0&&le.includes(".")?N(se):i({},se),_(se,T.keyPath,Q.results[U]),se)})}),Q);W.optimisticOps.push(te),queueMicrotask(function(){return A.mutatedParts&&Om(A.mutatedParts)})}),L):D.mutate(A)},query:function(A){if(!cL(fe,D)||!uL("query",A))return D.query(A);var L=((te=fe.trans)===null||te===void 0?void 0:te.db._options.cache)==="immutable",U=fe,W=U.requery,Q=U.signal,te=function(oe,re,ne,he){var me=Rl["idb://".concat(oe,"/").concat(re)];if(!me)return[];if(!(re=me.queries[ne]))return[null,!1,me,null];var ve=re[(he.query?he.query.index.name:null)||""];if(!ve)return[null,!1,me,null];switch(ne){case"query":var Re=ve.find(function(He){return He.req.limit===he.limit&&He.req.values===he.values&&fL(He.req.query.range,he.query.range)});return Re?[Re,!0,me,ve]:[ve.find(function(He){return("limit"in He.req?He.req.limit:1/0)>=he.limit&&(!he.values||He.req.values)&&ihe(He.req.query.range,he.query.range)}),!1,me,ve];case"count":return Re=ve.find(function(He){return fL(He.req.query.range,he.query.range)}),[Re,!!Re,me,ve]}}(v,w,"query",A),se=te[0],U=te[1],le=te[2],ee=te[3];return se&&U?se.obsSet=A.obsSet:(U=D.query(A).then(function(oe){var re=oe.result;if(se&&(se.res=re),L){for(var ne=0,he=re.length;ne<he;++ne)Object.freeze(re[ne]);Object.freeze(re)}else oe.result=N(re);return oe}).catch(function(oe){return ee&&se&&X(ee,se),Promise.reject(oe)}),se={obsSet:A.obsSet,promise:U,subscribers:new Set,type:"query",req:A,dirty:!1},ee?ee.push(se):(ee=[se],(le=le||(Rl["idb://".concat(v,"/").concat(w)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[A.query.index.name||""]=ee)),ohe(se,ee,W,Q),se.promise.then(function(oe){return{result:hL(oe.result,A,le==null?void 0:le.optimisticOps,D,se,L)}})}})}})}};function Lm(p,v){return new Proxy(p,{get:function(w,D,T){return D==="db"?v:Reflect.get(w,D,T)}})}var Sr=(Vn.prototype.version=function(p){if(isNaN(p)||p<.1)throw new Be.Type("Given version is not a positive number");if(p=Math.round(10*p)/10,this.idbdb||this._state.isBeingOpened)throw new Be.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,p);var v=this._versions,w=v.filter(function(D){return D._cfg.version===p})[0];return w||(w=new this.Version(p),v.push(w),v.sort(qde),w.stores({}),this._state.autoSchema=!1,w)},Vn.prototype._whenReady=function(p){var v=this;return this.idbdb&&(this._state.openComplete||fe.letThrough||this._vip)?p():new Le(function(w,D){if(v._state.openComplete)return D(new Be.DatabaseClosed(v._state.dbOpenError));if(!v._state.isBeingOpened){if(!v._state.autoOpen)return void D(new Be.DatabaseClosed);v.open().catch(Ot)}v._state.dbReadyPromise.then(w,D)}).then(p)},Vn.prototype.use=function(p){var v=p.stack,w=p.create,D=p.level,T=p.name;return T&&this.unuse({stack:v,name:T}),p=this._middlewares[v]||(this._middlewares[v]=[]),p.push({stack:v,create:w,level:D??10,name:T}),p.sort(function(A,L){return A.level-L.level}),this},Vn.prototype.unuse=function(p){var v=p.stack,w=p.name,D=p.create;return v&&this._middlewares[v]&&(this._middlewares[v]=this._middlewares[v].filter(function(T){return D?T.create!==D:!!w&&T.name!==w})),this},Vn.prototype.open=function(){var p=this;return bl(q,function(){return Jde(p)})},Vn.prototype._close=function(){var p=this._state,v=ou.indexOf(this);if(0<=v&&ou.splice(v,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}p.isBeingOpened||(p.dbReadyPromise=new Le(function(w){p.dbReadyResolve=w}),p.openCanceller=new Le(function(w,D){p.cancelOpen=D}))},Vn.prototype.close=function(w){var v=(w===void 0?{disableAutoOpen:!0}:w).disableAutoOpen,w=this._state;v?(w.isBeingOpened&&w.cancelOpen(new Be.DatabaseClosed),this._close(),w.autoOpen=!1,w.dbOpenError=new Be.DatabaseClosed):(this._close(),w.autoOpen=this._options.autoOpen||w.isBeingOpened,w.openComplete=!1,w.dbOpenError=null)},Vn.prototype.delete=function(p){var v=this;p===void 0&&(p={disableAutoOpen:!0});var w=0<arguments.length&&typeof arguments[0]!="object",D=this._state;return new Le(function(T,A){function L(){v.close(p);var W=v._deps.indexedDB.deleteDatabase(v.name);W.onsuccess=Sn(function(){var Q,te,se;Q=v._deps,te=v.name,se=Q.indexedDB,Q=Q.IDBKeyRange,t0(se)||te===bm||e0(se,Q).delete(te).catch(Ot),T()}),W.onerror=Ls(A),W.onblocked=v._fireOnBlocked}if(w)throw new Be.InvalidArgument("Invalid closeOptions argument to db.delete()");D.isBeingOpened?D.dbReadyPromise.then(L):L()})},Vn.prototype.backendDB=function(){return this.idbdb},Vn.prototype.isOpen=function(){return this.idbdb!==null},Vn.prototype.hasBeenClosed=function(){var p=this._state.dbOpenError;return p&&p.name==="DatabaseClosed"},Vn.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Vn.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Vn.prototype,"tables",{get:function(){var p=this;return r(this._allTables).map(function(v){return p._allTables[v]})},enumerable:!1,configurable:!0}),Vn.prototype.transaction=function(){var p=(function(v,w,D){var T=arguments.length;if(T<2)throw new Be.InvalidArgument("Too few arguments");for(var A=new Array(T-1);--T;)A[T-1]=arguments[T];return D=A.pop(),[v,k(A),D]}).apply(this,arguments);return this._transaction.apply(this,p)},Vn.prototype._transaction=function(p,v,w){var D=this,T=fe.trans;T&&T.db===this&&p.indexOf("!")===-1||(T=null);var A,L,W=p.indexOf("?")!==-1;p=p.replace("!","").replace("?","");try{if(L=v.map(function(te){if(te=te instanceof D.Table?te.name:te,typeof te!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return te}),p=="r"||p===$S)A=$S;else{if(p!="rw"&&p!=WS)throw new Be.InvalidArgument("Invalid transaction mode: "+p);A=WS}if(T){if(T.mode===$S&&A===WS){if(!W)throw new Be.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");T=null}T&&L.forEach(function(te){if(T&&T.storeNames.indexOf(te)===-1){if(!W)throw new Be.SubTransaction("Table "+te+" not included in parent transaction.");T=null}}),W&&T&&!T.active&&(T=null)}}catch(te){return T?T._promise(null,function(se,U){U(te)}):Nn(te)}var Q=(function te(se,U,le,ee,oe){return Le.resolve().then(function(){var re=fe.transless||fe,ne=se._createTransaction(U,le,se._dbSchema,ee);if(ne.explicit=!0,re={trans:ne,transless:re},ee)ne.idbtrans=ee.idbtrans;else try{ne.create(),ne.idbtrans._explicit=!0,se._state.PR1398_maxLoop=3}catch(ve){return ve.name===pt.InvalidState&&se.isOpen()&&0<--se._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),se.close({disableAutoOpen:!1}),se.open().then(function(){return te(se,U,le,null,oe)})):Nn(ve)}var he,me=ue(oe);return me&&iu(),re=Le.follow(function(){var ve;(he=oe.call(ne,ne))&&(me?(ve=da.bind(null,null),he.then(ve,ve)):typeof he.next=="function"&&typeof he.throw=="function"&&(he=l0(he)))},re),(he&&typeof he.then=="function"?Le.resolve(he).then(function(ve){return ne.active?ve:Nn(new Be.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):re.then(function(){return he})).then(function(ve){return ee&&ne._resolve(),ne._completion.then(function(){return ve})}).catch(function(ve){return ne._reject(ve),Nn(ve)})})}).bind(null,this,A,L,T,w);return T?T._promise(A,Q,"lock"):fe.trans?bl(fe.transless,function(){return D._whenReady(Q)}):this._whenReady(Q)},Vn.prototype.table=function(p){if(!d(this._allTables,p))throw new Be.InvalidTable("Table ".concat(p," does not exist"));return this._allTables[p]},Vn);function Vn(p,v){var w=this;this._middlewares={},this.verno=0;var D=Vn.dependencies;this._options=v=i({addons:Vn.addons,autoOpen:!0,indexedDB:D.indexedDB,IDBKeyRange:D.IDBKeyRange,cache:"cloned"},v),this._deps={indexedDB:v.indexedDB,IDBKeyRange:v.IDBKeyRange},D=v.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var T,A,L,W,Q,te={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ot,dbReadyPromise:null,cancelOpen:Ot,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:v.autoOpen};te.dbReadyPromise=new Le(function(U){te.dbReadyResolve=U}),te.openCanceller=new Le(function(U,le){te.cancelOpen=le}),this._state=te,this.name=p,this.on=Eh(this,"populate","blocked","versionchange","close",{ready:[Ae,Ot]}),this.on.ready.subscribe=F(this.on.ready.subscribe,function(U){return function(le,ee){Vn.vip(function(){var oe,re=w._state;re.openComplete?(re.dbOpenError||Le.resolve().then(le),ee&&U(le)):re.onReadyBeingFired?(re.onReadyBeingFired.push(le),ee&&U(le)):(U(le),oe=w,ee||U(function ne(){oe.on.ready.unsubscribe(le),oe.on.ready.unsubscribe(ne)}))})}}),this.Collection=(T=this,Rh(Gde.prototype,function(he,ne){this.db=T;var ee=zM,oe=null;if(ne)try{ee=ne()}catch(me){oe=me}var re=he._ctx,ne=re.table,he=ne.hook.reading.fire;this._ctx={table:ne,index:re.index,isPrimKey:!re.index||ne.schema.primKey.keyPath&&re.index===ne.schema.primKey.name,range:ee,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:oe,or:re.or,valueMapper:he!==V?he:null}})),this.Table=(A=this,Rh(qM.prototype,function(U,le,ee){this.db=A,this._tx=ee,this.name=U,this.schema=le,this.hook=A._allTables[U]?A._allTables[U].hook:Eh(null,{creating:[Te,Ot],reading:[Y,V],updating:[_e,Ot],deleting:[Ee,Ot]})})),this.Transaction=(L=this,Rh(zde.prototype,function(U,le,ee,oe,re){var ne=this;this.db=L,this.mode=U,this.storeNames=le,this.schema=ee,this.chromeTransactionDurability=oe,this.idbtrans=null,this.on=Eh(this,"complete","error","abort"),this.parent=re||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Le(function(he,me){ne._resolve=he,ne._reject=me}),this._completion.then(function(){ne.active=!1,ne.on.complete.fire()},function(he){var me=ne.active;return ne.active=!1,ne.on.error.fire(he),ne.parent?ne.parent._reject(he):me&&ne.idbtrans&&ne.idbtrans.abort(),Nn(he)})})),this.Version=(W=this,Rh(Xde.prototype,function(U){this.db=W,this._cfg={version:U,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(Q=this,Rh(QM.prototype,function(U,le,ee){if(this.db=Q,this._ctx={table:U,index:le===":id"?null:le,or:ee},this._cmp=this._ascending=Gt,this._descending=function(oe,re){return Gt(re,oe)},this._max=function(oe,re){return 0<Gt(oe,re)?oe:re},this._min=function(oe,re){return Gt(oe,re)<0?oe:re},this._IDBKeyRange=Q._deps.IDBKeyRange,!this._IDBKeyRange)throw new Be.MissingAPI})),this.on("versionchange",function(U){0<U.newVersion?console.warn("Another connection wants to upgrade database '".concat(w.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(w.name,"'. Closing db now to resume the delete request.")),w.close({disableAutoOpen:!1})}),this.on("blocked",function(U){!U.newVersion||U.newVersion<U.oldVersion?console.warn("Dexie.delete('".concat(w.name,"') was blocked")):console.warn("Upgrade '".concat(w.name,"' blocked by other connection holding version ").concat(U.oldVersion/10))}),this._maxKey=Fh(v.IDBKeyRange),this._createTransaction=function(U,le,ee,oe){return new w.Transaction(U,le,ee,w._options.chromeTransactionDurability,oe)},this._fireOnBlocked=function(U){w.on("blocked").fire(U),ou.filter(function(le){return le.name===w.name&&le!==w&&!le._state.vcFired}).map(function(le){return le.on("versionchange").fire(U)})},this.use(the),this.use(she),this.use(nhe),this.use(Qde),this.use(ehe);var se=new Proxy(this,{get:function(U,le,ee){if(le==="_vip")return!0;if(le==="table")return function(re){return Lm(w.table(re),se)};var oe=Reflect.get(U,le,ee);return oe instanceof qM?Lm(oe,se):le==="tables"?oe.map(function(re){return Lm(re,se)}):le==="_createTransaction"?function(){return Lm(oe.apply(this,arguments),se)}:oe}});this.vip=se,D.forEach(function(U){return U(w)})}var Nm,Fo=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",rhe=(h0.prototype.subscribe=function(p,v,w){return this._subscribe(p&&typeof p!="function"?p:{next:p,error:v,complete:w})},h0.prototype[Fo]=function(){return this},h0);function h0(p){this._subscribe=p}try{Nm={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Nm={indexedDB:null,IDBKeyRange:null}}function pL(p){var v,w=!1,D=new rhe(function(T){var A=ue(p),L,W=!1,Q={},te={},se={get closed(){return W},unsubscribe:function(){W||(W=!0,L&&L.abort(),U&&pa.storagemutated.unsubscribe(ee))}};T.start&&T.start(se);var U=!1,le=function(){return GS(oe)},ee=function(re){km(Q,re),o0(te,Q)&&le()},oe=function(){var re,ne,he;!W&&Nm.indexedDB&&(Q={},re={},L&&L.abort(),L=new AbortController,he=function(me){var ve=la();try{A&&iu();var Re=ua(p,me);return Re=A?Re.finally(da):Re}finally{ve&&Ms()}}(ne={subscr:re,signal:L.signal,requery:le,querier:p,trans:null}),Promise.resolve(he).then(function(me){w=!0,v=me,W||ne.signal.aborted||(Q={},function(ve){for(var Re in ve)if(d(ve,Re))return;return 1}(te=re)||U||(pa(xh,ee),U=!0),GS(function(){return!W&&T.next&&T.next(me)}))},function(me){w=!1,["DatabaseClosedError","AbortError"].includes(me==null?void 0:me.name)||W||GS(function(){W||T.error&&T.error(me)})}))};return setTimeout(le,0),se});return D.hasValue=function(){return w},D.getValue=function(){return v},D}var Dl=Sr;function f0(p){var v=ga;try{ga=!0,pa.storagemutated.fire(p),a0(p,!0)}finally{ga=v}}h(Dl,i(i({},nn),{delete:function(p){return new Dl(p,{addons:[]}).delete()},exists:function(p){return new Dl(p,{addons:[]}).open().then(function(v){return v.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(p){try{return v=Dl.dependencies,w=v.indexedDB,v=v.IDBKeyRange,(t0(w)?Promise.resolve(w.databases()).then(function(D){return D.map(function(T){return T.name}).filter(function(T){return T!==bm})}):e0(w,v).toCollection().primaryKeys()).then(p)}catch{return Nn(new Be.MissingAPI)}var v,w},defineClass:function(){return function(p){l(this,p)}},ignoreTransaction:function(p){return fe.trans?bl(fe.transless,p):p()},vip:n0,async:function(p){return function(){try{var v=l0(p.apply(this,arguments));return v&&typeof v.then=="function"?v:Le.resolve(v)}catch(w){return Nn(w)}}},spawn:function(p,v,w){try{var D=l0(p.apply(w,v||[]));return D&&typeof D.then=="function"?D:Le.resolve(D)}catch(T){return Nn(T)}},currentTransaction:{get:function(){return fe.trans||null}},waitFor:function(p,v){return v=Le.resolve(typeof p=="function"?Dl.ignoreTransaction(p):p).timeout(v||6e4),fe.trans?fe.trans.waitFor(v):v},Promise:Le,debug:{get:function(){return Pe},set:function(p){xe(p)}},derive:m,extend:l,props:h,override:F,Events:Eh,on:pa,liveQuery:pL,extendObservabilitySet:km,getByKeyPath:E,setByKeyPath:_,delByKeyPath:function(p,v){typeof v=="string"?_(p,v,void 0):"length"in v&&[].map.call(v,function(w){_(p,w,void 0)})},shallowClone:I,deepClone:N,getObjectDiff:c0,cmp:Gt,asap:R,minKey:-1/0,addons:[],connections:ou,errnames:pt,dependencies:Nm,cache:Rl,semVer:"4.0.10",version:"4.0.10".split(".").map(function(p){return parseInt(p)}).reduce(function(p,v,w){return p+v/Math.pow(10,2*w)})})),Dl.maxKey=Fh(Dl.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(pa(xh,function(p){ga||(p=new CustomEvent(KS,{detail:p}),ga=!0,dispatchEvent(p),ga=!1)}),addEventListener(KS,function(p){p=p.detail,ga||f0(p)}));var au,ga=!1,gL=function(){};return typeof BroadcastChannel<"u"&&((gL=function(){(au=new BroadcastChannel(KS)).onmessage=function(p){return p.data&&f0(p.data)}})(),typeof au.unref=="function"&&au.unref(),pa(xh,function(p){ga||au.postMessage(p)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(p){if(!Sr.disableBfCache&&p.persisted){Pe&&console.debug("Dexie: handling persisted pagehide"),au!=null&&au.close();for(var v=0,w=ou;v<w.length;v++)w[v].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(p){!Sr.disableBfCache&&p.persisted&&(Pe&&console.debug("Dexie: handling persisted pageshow"),gL(),f0({all:new mi(-1/0,[[]])}))})),Le.rejectionMapper=function(p,v){return!p||p instanceof ae||p instanceof TypeError||p instanceof SyntaxError||!p.name||!jt[p.name]?p:(v=new jt[p.name](v||p.message,p),"stack"in p&&g(v,"stack",{get:function(){return this.inner.stack}}),v)},xe(Pe),i(Sr,Object.freeze({__proto__:null,Dexie:Sr,liveQuery:pL,Entity:UM,cmp:Gt,PropModSymbol:br,PropModification:Dh,replacePrefix:function(p,v){return new Dh({replacePrefix:[p,v]})},add:function(p){return new Dh({add:p})},remove:function(p){return new Dh({remove:p})},default:Sr,RangeSet:mi,mergeRanges:Ih,rangesOverlap:oL}),{default:Sr}),Sr})})(zD);var WH=zD.exports;const uy=$H(WH),UD=Symbol.for("Dexie"),zu=globalThis[UD]||(globalThis[UD]=uy);if(uy.semVer!==zu.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${uy.semVer} and ${zu.semVer}`);const{liveQuery:ghe,mergeRanges:mhe,rangesOverlap:vhe,RangeSet:yhe,cmp:Che,Entity:whe,PropModSymbol:bhe,PropModification:She,replacePrefix:Ehe,add:Rhe,remove:Dhe}=zu;class jD extends zu{constructor(n){super(n);_n(this,"icons");_n(this,"visuals");_n(this,"users");_n(this,"columns");_n(this,"general");this.version(1).stores({icons:"key",visuals:"key",users:"key",columns:"key",general:"key"})}getTable(n){return this[n]?this[n]:this.general}}const Lf=new Map,zH=async e=>{if(!Lf.has(e)){const t=new jD(e);try{await t.open(),Lf.set(e,t)}catch(n){console.error("Failed to open database, attempting to delete and recreate:",n);try{await zu.delete(e);const i=new jD(e);await i.open(),Lf.set(e,i)}catch(i){throw console.error("Failed to delete and recreate database:",i),i}}}return Lf.get(e)},Uu=({dbName:e,storeName:t})=>{const n=async()=>(await zH(e)).getTable(t);return{getCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}const d=await u.get(c);return d==null?void 0:d.value}catch(u){console.error("Failed to get cached value:",u);return}},setCachedValue:async(c,u)=>{try{const d=await n();if(!d){console.error(`Store is undefined, cannot cache key: ${c}`);return}await d.put({key:c,value:u,timestamp:Date.now()})}catch(d){console.error("Failed to cache value:",d)}},deleteCachedValue:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined, cannot delete key: ${c}`);return}await u.delete(c)}catch(u){console.error("Failed to delete cached value:",u)}},clearCache:async()=>{try{const c=await n();if(!c){console.error("Store is undefined, cannot clear cache");return}await c.clear()}catch(c){console.error("Failed to clear cache:",c)}},getAllKeys:async()=>{try{const c=await n();return c?(await c.toArray()).map(d=>d.key):(console.error("Store is undefined, cannot get all keys"),[])}catch(c){return console.error("Failed to get all keys:",c),[]}},getCachedValueWithTimestamp:async c=>{try{const u=await n();if(!u){console.error(`Store is undefined for key: ${c}`);return}return await u.get(c)}catch(u){console.error("Failed to get cached value with timestamp:",u);return}}}},UH="AvatarCache",jH="images",KH=()=>{const{getCachedValue:e,setCachedValue:t}=Uu({dbName:UH,storeName:jH}),n=async s=>{const r=await e(s);return!r||!(r instanceof Blob)?null:URL.createObjectURL(r)},i=s=>new Promise((r,a)=>{new GH(s,{width:96,height:96,quality:1,success(l){r(l)},error(l){console.error(l.message),a(l)}})});return{getCachedImage:n,setCachedImage:async(s,r)=>{const a=await i(r);await t(s,a)}}},ju=new Map,hs=new Map,Yl=new Map,qH=5*60*1e3,KD=100;function YH(){const e=Date.now(),t=[];Yl.forEach((n,i)=>{e-n>qH&&t.push(i)}),t.forEach(n=>{ju.delete(n),Yl.delete(n),hs.delete(n)})}function ZH(){if(Yl.size<=KD)return;const e=Array.from(Yl.entries()).sort((n,i)=>n[1]-i[1]);e.slice(0,e.length-KD).forEach(([n])=>{ju.delete(n),Yl.delete(n),hs.delete(n)})}const XH=(e,t)=>{const n=hs.get(e);return n==null||n.forEach(i=>i(t)),hs.delete(e),t};async function JH({userId:e,avatarUrl:t,cacheInterface:n,onLoadingChange:i}){const o=await n.getCachedImage(e),s=ju.has(e),r=hs.has(e);if(o)return XH(e,o);if(YH(),s)return new Promise(c=>{r||hs.set(e,[]),hs.get(e).push(c)});const a=(async()=>{let c=null,u=null;try{const d=Math.random()*300;await new Promise(f=>setTimeout(f,d)),i==null||i(!0);const h=await fetch(t,{cache:"no-cache"});if(!h.ok)throw new Error("Failed to fetch image");return c=await h.blob(),await n.setCachedImage(e,c),u=URL.createObjectURL(c),u}catch(d){throw console.error("Error loading avatar image:",d),d}finally{c=null,i==null||i(!1),Yl.set(e,Date.now()),setTimeout(()=>{ju.delete(e),ZH()},100)}})();ju.set(e,a);const l=await a;return hs.has(e)&&(hs.get(e).forEach(u=>u(l)),hs.delete(e)),l}const QH=(e,t=3,n=1e3)=>{const i=Z(0),o=Z(!1),s=Z(!1),r=async()=>{try{await e()}catch(a){if(i.value<t)return i.value++,s.value=!0,await new Promise(l=>setTimeout(l,n)),r();throw o.value=!0,a}};return{retry:r,currentAttempt:i,errorRetry:o,isRetrying:s}};function ti(e,t){eG(e)&&(e="100%");const n=tG(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Nf(e){return Math.min(1,Math.max(0,e))}function eG(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function tG(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qD(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vf(e){return Number(e)<=1?`${Number(e)*100}%`:e}function La(e){return e.length===1?"0"+e:String(e)}function nG(e,t,n){return{r:ti(e,255)*255,g:ti(t,255)*255,b:ti(n,255)*255}}function YD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0,r=0;const a=(i+o)/2;if(i===o)r=0,s=0;else{const l=i-o;switch(r=a>.5?l/(2-i-o):l/(i+o),i){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:r,l:a}}function dy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iG(e,t,n){let i,o,s;if(e=ti(e,360),t=ti(t,100),n=ti(n,100),t===0)o=n,s=n,i=n;else{const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=dy(a,r,e+1/3),o=dy(a,r,e),s=dy(a,r,e-1/3)}return{r:i*255,g:o*255,b:s*255}}function ZD(e,t,n){e=ti(e,255),t=ti(t,255),n=ti(n,255);const i=Math.max(e,t,n),o=Math.min(e,t,n);let s=0;const r=i,a=i-o,l=i===0?0:a/i;if(i===o)s=0;else{switch(i){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4;break}s/=6}return{h:s,s:l,v:r}}function oG(e,t,n){e=ti(e,360)*6,t=ti(t,100),n=ti(n,100);const i=Math.floor(e),o=e-i,s=n*(1-t),r=n*(1-o*t),a=n*(1-(1-o)*t),l=i%6,c=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function XD(e,t,n,i){const o=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function sG(e,t,n,i,o){const s=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16)),La(aG(i))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function rG(e,t,n,i){const o=e/100,s=t/100,r=n/100,a=i/100,l=255*(1-o)*(1-a),c=255*(1-s)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function JD(e,t,n){let i=1-e/255,o=1-t/255,s=1-n/255,r=Math.min(i,o,s);return r===1?(i=0,o=0,s=0):(i=(i-r)/(1-r)*100,o=(o-r)/(1-r)*100,s=(s-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(o),y:Math.round(s),k:Math.round(r)}}function aG(e){return Math.round(parseFloat(e)*255).toString(16)}function QD(e){return Ui(e)/255}function Ui(e){return parseInt(e,16)}function lG(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const hy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function cG(e){let t={r:0,g:0,b:0},n=1,i=null,o=null,s=null,r=!1,a=!1;return typeof e=="string"&&(e=uG(e)),typeof e=="object"&&(ji(e.r)&&ji(e.g)&&ji(e.b)?(t=nG(e.r,e.g,e.b),r=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ji(e.h)&&ji(e.s)&&ji(e.v)?(i=Vf(e.s),o=Vf(e.v),t=oG(e.h,i,o),r=!0,a="hsv"):ji(e.h)&&ji(e.s)&&ji(e.l)?(i=Vf(e.s),s=Vf(e.l),t=iG(e.h,i,s),r=!0,a="hsl"):ji(e.c)&&ji(e.m)&&ji(e.y)&&ji(e.k)&&(t=rG(e.c,e.m,e.y,e.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=qD(n),{ok:r,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const Or="(?:"+"[-\\+]?\\d*\\.\\d+%?"+")|(?:"+"[-\\+]?\\d+%?"+")",fy="[\\s|\\(]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")\\s*\\)?",Bf="[\\s|\\(]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")[,|\\s]+("+Or+")\\s*\\)?",co={CSS_UNIT:new RegExp(Or),rgb:new RegExp("rgb"+fy),rgba:new RegExp("rgba"+Bf),hsl:new RegExp("hsl"+fy),hsla:new RegExp("hsla"+Bf),hsv:new RegExp("hsv"+fy),hsva:new RegExp("hsva"+Bf),cmyk:new RegExp("cmyk"+Bf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function uG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(hy[e])e=hy[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=co.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=co.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=co.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=co.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=co.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=co.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=co.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=co.hex8.exec(e),n?{r:Ui(n[1]),g:Ui(n[2]),b:Ui(n[3]),a:QD(n[4]),format:t?"name":"hex8"}:(n=co.hex6.exec(e),n?{r:Ui(n[1]),g:Ui(n[2]),b:Ui(n[3]),format:t?"name":"hex"}:(n=co.hex4.exec(e),n?{r:Ui(n[1]+n[1]),g:Ui(n[2]+n[2]),b:Ui(n[3]+n[3]),a:QD(n[4]+n[4]),format:t?"name":"hex8"}:(n=co.hex3.exec(e),n?{r:Ui(n[1]+n[1]),g:Ui(n[2]+n[2]),b:Ui(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function ji(e){return typeof e=="number"?!Number.isNaN(e):co.CSS_UNIT.test(e)}class En{constructor(t="",n={}){if(t instanceof En)return t;typeof t=="number"&&(t=lG(t)),this.originalInput=t;const i=cG(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,i,o;const s=t.r/255,r=t.g/255,a=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=qD(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=ZD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=ZD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${i}%, ${o}%)`:`hsva(${n}, ${i}%, ${o}%, ${this.roundA})`}toHsl(){const t=YD(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=YD(this.r,this.g,this.b),n=Math.round(t.h*360),i=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${i}%, ${o}%)`:`hsla(${n}, ${i}%, ${o}%, ${this.roundA})`}toHex(t=!1){return XD(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return sG(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${i})`:`rgba(${t}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(ti(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(ti(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...JD(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:i,k:o}=JD(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${i}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+XD(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(hy))if(t===i)return n;return!1}toString(t){const n=!!t;t=t??this.format;let i=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),t==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new En(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Nf(n.l),new En(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new En(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Nf(n.l),new En(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=Nf(n.s),new En(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Nf(n.s),new En(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),i=(n.h+t)%360;return n.h=i<0?360+i:i,new En(n)}mix(t,n=50){const i=this.toRgb(),o=new En(t).toRgb(),s=n/100,r={r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a};return new En(r)}analogous(t=6,n=30){const i=this.toHsl(),o=360/n,s=[this];for(i.h=(i.h-(o*t>>1)+720)%360;--t;)i.h=(i.h+o)%360,s.push(new En(i));return s}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new En(t)}monochromatic(t=6){const n=this.toHsv(),{h:i}=n,{s:o}=n;let{v:s}=n;const r=[],a=1/t;for(;t--;)r.push(new En({h:i,s:o,v:s})),s=(s+a)%1;return r}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new En({h:(n+72)%360,s:t.s,l:t.l}),new En({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),i=new En(t).toRgb(),o=n.a+i.a*(1-n.a);return new En({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:i}=n,o=[this],s=360/t;for(let r=1;r<t;r++)o.push(new En({h:(i+r*s)%360,s:n.s,l:n.l}));return o}equals(t){const n=new En(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function py(e){return new En(e||"").isValid}function gy(e,t){const{c1:n,c2:i}={c1:new En(e),c2:new En(t)};return n.equals(i)}const dG=["src","alt"],Ku=Ct(lt({__name:"Avatar",props:{name:{},id:{},profile_image:{},color:{},initial:{},isMe:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{default:24},isUseShortLabel:{type:Boolean,default:!0}},setup(e){const t=e,n=Z(""),i=Z(!1),o=Z(null),s=Z(!1),r=j(()=>({name:t.name||"",id:t.id||"",profile_image:t.profile_image||null,color:t.color||{bgColor:"#CCCCCC",textColor:"var(--background-color)"},initial:t.initial})),a=j(()=>{var R;const C=((R=r.value.color)==null?void 0:R.bgColor)||"#CCCCCC";return py(C)?C:"#CCCCCC"}),l=j(()=>{var R;const C=((R=r.value.color)==null?void 0:R.textColor)||"var(--background-color)";return py(C)?C:"var(--background-color)"}),c=j(()=>{if(!t.isUseShortLabel)return"";const{initial:C,name:R}=r.value;if(typeof C=="string"&&C.trim())return C.trim();if(!(R!=null&&R.trim()))return"";const E=R.trim().split(/\s+/).filter(Boolean);return E.length===1?E[0].slice(0,2).toUpperCase():(E[0][0]+E[1][0]).toUpperCase()}),u=j(()=>r.value.profile_image?"image":"text"),d=j(()=>({"--avatar-size":`${t.size}px`,"--avatar-bg":a.value,"--avatar-border":t.isMe?"var(--primary-color)":"#dcdcdc","--text-color":l.value})),h=()=>{n.value="",s.value=!0},{getCachedImage:f,setCachedImage:g}=KH(),m=async()=>{if(o.value&&o.value.abort(),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),!r.value.id||!r.value.profile_image){n.value="";return}o.value=new AbortController;const C=o.value;try{const R=await JH({userId:r.value.id,avatarUrl:r.value.profile_image,cacheInterface:{getCachedImage:f,setCachedImage:g},onLoadingChange:E=>{C.signal.aborted||(i.value=E)}});if(!C.signal.aborted&&(n.value=R,R.length===0))throw console.warn("Loaded avatar image is empty, displaying initials instead."),h(),new Error("Empty image source")}catch(R){C.signal.aborted||(console.error("Failed to load avatar:",R),n.value="")}},{retry:y,errorRetry:b,isRetrying:S}=QH(m,3,2e3),F=ct(()=>r.value.id,y,{immediate:!0});return Yn(()=>{F(),o.value&&(o.value.abort(),o.value=null),n.value.startsWith("blob:")&&URL.revokeObjectURL(n.value),n.value="",i.value=!1}),(C,R)=>(K(),Ce("div",{class:z([C.$style["avatar-wrapper"],{[C.$style.me]:e.isMe,[C.$style.loading]:i.value,[C.$style.disabled]:e.disabled,[C.$style.readOnly]:t.readOnly}]),style:mn(d.value)},[i.value||J(S)?(K(),Ce("div",{key:0,class:z(C.$style["skeleton-loader"])},null,2)):(K(),Ce(kt,{key:1},[u.value==="text"||J(b)||s.value?(K(),Ce("div",{key:0,class:z(C.$style["short-label"])},bt(c.value),3)):n.value.length>0||r.value.profile_image?(K(),Ce("img",{key:1,src:n.value||r.value.profile_image||"",alt:r.value.name||"Avatar",loading:"lazy"},null,8,dG)):ot("",!0)],64))],6))}}),[["__cssModules",{$style:{"avatar-wrapper":"_avatar-wrapper_1gfzg_1",me:"_me_1gfzg_16","short-label":"_short-label_1gfzg_19",action:"_action_1gfzg_37",loading:"_loading_1gfzg_55",disabled:"_disabled_1gfzg_58",readOnly:"_readOnly_1gfzg_61"}}]]),hG=["404","ClickChart","ClickToCreate","NoAccess1","NoActivity","NoAssignedComment","NoAssignedScene","NoComment","NoData","NoData2","NoRendition1","NoRendition2","PrivateComment","PrivateScene","ReportAchievement","ReportCompletedScenes","ReportInvolvement","ReportMetric","ReportOverdueScenes","ReportProfessionalName","ReportSceneAssignment","ReportSceneStatus","ReportSceneStatusType","Successful1","Unsuccessful1","ConfirmDeletion","Waiting1","DefaultThumbnail","UploadReviewFile","ClickToSearch","NoDataSearchFilter"],fG=["UploadInProgress"],Hf={},e_=(e,t,n,i)=>{const o=Z(""),s=Z(""),r=Z(!0),a=j(()=>`${t}:${e.value.name}`),l=y=>URL.createObjectURL(y),c=y=>{URL.revokeObjectURL(y)},u=y=>new Blob([y],{type:"image/svg+xml"}),d=async y=>await y.text(),h=async(y,b)=>{const S=await i(a.value);if(S&&S instanceof Blob&&S.size>0||S&&typeof S=="string")return S;if(b in Hf)return await Hf[b];const F=(async()=>{try{const C=await fetch(y,{cache:"no-cache"});if(!C.ok)throw new Error("Failed to fetch visual");const R=C.headers.get("Content-Type")||"";let E;if(R.includes("svg")||R.includes("xml")){const _=await C.text();if(_.trim()){if(E=u(_),!E.size)throw new Error("Empty image blob")}else throw new Error("Empty SVG content")}else if(R.match(/image\/(jpeg|jpg|png|gif|webp)/)){if(E=await C.blob(),!E.size)throw new Error("Empty image blob")}else throw new Error(`Unsupported content type: ${R}`);return await n(a.value,E),E}catch(C){return console.error("Error fetching visual:",C),new Blob}})();return Hf[b]=F,F.finally(()=>{delete Hf[b]}),await F},f=async y=>{r.value=!0;try{const b=sessionStorage.getItem("ASSET_URL")||"https://arbodev.s3.ap-south-1.amazonaws.com",S={icon:`${b}/icon/tess/TESSRAPP_Icon_${y}`,visual:`${b}/icon/visual/TESSRAPP_Visual_${y}`,ratting:`${b}/icon/tess/rating/TESSRAPP_Icon_${y}_Outline`,flag:`${b}/icon/flags/4x3/${y}`},F=hG.includes(y)?"png":fG.includes(y)?"gif":"svg",C=`${S[t]}.${F}`,R=await h(C,a.value);typeof R!="string"&&R.size>0?((R.type.includes("svg")||R.type.includes("xml"))&&(s.value=await d(R)),o.value=l(R)):o.value=R}catch(b){console.error("Error fetching remote visual:",b)}finally{r.value=!1}},g=async()=>{o.value="",s.value="",e.value.name&&(r.value=!0,await f(e.value.name),r.value=!1)},m=j(()=>s.value?s.value:"");return Ll(()=>{o.value&&c(o.value)}),ct(()=>e,y=>{g()},{deep:!0,immediate:!0}),{svgContent:m,url:o,loading:r}},pG=["innerHTML"],gG="IconCache",mG="icons",gt=Ct(lt({__name:"Icon",props:{src:{},source:{default:"remote"},size:{default:14},color:{default:"currentColor"}},setup(e){nB(l=>({d999b740:l.size+"px"}));const t=e,{getCachedValue:n,setCachedValue:i}=Uu({dbName:gG,storeName:mG}),o=l=>{if(typeof l=="number")return l;switch(l){case"small":return 8;case"medium":return 16;case"large":return 20;default:return typeof l=="string"?parseInt(l,10):14}},s=j(()=>t.source==="rating"?"ratting":"icon"),r=j(()=>({name:t.src,size:o(t.size),color:t.color})),{svgContent:a}=e_(r,s.value,i,n);return(l,c)=>(K(),Ce("div",{class:z(l.$style.iconWrapper),innerHTML:J(a),style:mn({color:e.color,"--size":e.size})},null,14,pG))}}),[["__cssModules",{$style:{iconWrapper:"_iconWrapper_1n0y9_1"}}]]),vG={review:"{reviewDomain}/{ws_code}",review_take:"{reviewDomain}/{ws_code}?id={take_id}",review_scene:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&tab=iteration",review_rendition:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}",review_frame:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&rendition_id={rendition_id}&tab=comment&refresh_marker=true#type=frame&data={frame}",review_rendition_comment:"{reviewDomain}/{ws_code}?scene_id={scene_id}&rendition_id={rendition_id}&comment_id={comment_id}",review_comment:"{reviewDomain}/{ws_code}?id={take_id}&scene_id={scene_id}&comment_id={comment_id}",scene_hub:"{baseDomain}/{ws_code}/{scene_id}?o=st",hub_rendition:"{baseDomain}/{ws_code}/{scene_id}?o=st&renditionId={rendition_id}",hub_comment:"{baseDomain}/{ws_code}/{scene_id}?o=st&comment_id={comment_id}",people_insight:"{baseDomain}/{ws_code}/{user_id}?o=pt",people_detail:"{baseDomain}/{ws_code}/ws/ppl/{display_name}-${user_id}",project:"{baseDomain}/{ws_code}/pl/dir/{entity_id}",woohoo:"{baseDomain}/{ws_code}/pl/woo/rpt/{woohoo_id}",update:"{baseDomain}/{ws_code}/pl/au?id={entity_id}",core:"{baseDomain}/{ws_code}",project_focusMode:"{baseDomain}/{ws_code}/pl/dir/{parent_id}?f={entity_id}",access_setting:"{baseDomain}/{ws_code}/pl/dir?f={entity_id}&o=as"},Vo=({type:e,config:t})=>{const n=[];try{const i=vG[e];if(!i)throw new Error(`Link template for link type "${e}" not found`);const o=i.replace(/{(.*?)}/g,(s,r)=>{const a=t[String(r)];if(a!==void 0)return a;n.push(r)});return n.length>0?{url:o,hasError:!0,error:`Missing required keys: ${n.join(", ")}`,missingKeys:n}:{url:o,hasError:!1,error:void 0}}catch(i){return console.error("Link Creator ERROR at:",i),{url:"",hasError:!0,error:i instanceof Error?i.message:`Missing required keys: ${n.join(", ")}`}}};var t_=typeof global=="object"&&global&&global.Object===Object&&global,yG=typeof self=="object"&&self&&self.Object===Object&&self,Bo=t_||yG||Function("return this")(),uo=Bo.Symbol,n_=Object.prototype,CG=n_.hasOwnProperty,wG=n_.toString,qu=uo?uo.toStringTag:void 0;function bG(e){var t=CG.call(e,qu),n=e[qu];try{e[qu]=void 0;var i=!0}catch{}var o=wG.call(e);return i&&(t?e[qu]=n:delete e[qu]),o}var SG=Object.prototype,EG=SG.toString;function RG(e){return EG.call(e)}var DG="[object Null]",_G="[object Undefined]",i_=uo?uo.toStringTag:void 0;function Zl(e){return e==null?e===void 0?_G:DG:i_&&i_ in Object(e)?bG(e):RG(e)}function Ks(e){return e!=null&&typeof e=="object"}var xG="[object Symbol]";function Gf(e){return typeof e=="symbol"||Ks(e)&&Zl(e)==xG}function FG(e,t){for(var n=-1,i=e==null?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}var ho=Array.isArray,o_=uo?uo.prototype:void 0,s_=o_?o_.toString:void 0;function r_(e){if(typeof e=="string")return e;if(ho(e))return FG(e,r_)+"";if(Gf(e))return s_?s_.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var TG=/\s/;function PG(e){for(var t=e.length;t--&&TG.test(e.charAt(t)););return t}var IG=/^\s+/;function AG(e){return e&&e.slice(0,PG(e)+1).replace(IG,"")}function qs(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var a_=NaN,kG=/^[-+]0x[0-9a-f]+$/i,OG=/^0b[01]+$/i,MG=/^0o[0-7]+$/i,LG=parseInt;function my(e){if(typeof e=="number")return e;if(Gf(e))return a_;if(qs(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qs(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=AG(e);var n=OG.test(e);return n||MG.test(e)?LG(e.slice(2),n?2:8):kG.test(e)?a_:+e}var l_=1/0,NG=17976931348623157e292;function vy(e){if(!e)return e===0?e:0;if(e=my(e),e===l_||e===-l_){var t=e<0?-1:1;return t*NG}return e===e?e:0}function VG(e){var t=vy(e),n=t%1;return t===t?n?t-n:t:0}function yy(e){return e}var BG="[object AsyncFunction]",HG="[object Function]",GG="[object GeneratorFunction]",$G="[object Proxy]";function c_(e){if(!qs(e))return!1;var t=Zl(e);return t==HG||t==GG||t==BG||t==$G}var Cy=Bo["__core-js_shared__"],u_=function(){var e=/[^.]+$/.exec(Cy&&Cy.keys&&Cy.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WG(e){return!!u_&&u_ in e}var zG=Function.prototype,UG=zG.toString;function Na(e){if(e!=null){try{return UG.call(e)}catch{}try{return e+""}catch{}}return""}var jG=/[\\^$.*+?()[\]{}|]/g,KG=/^\[object .+?Constructor\]$/,qG=Function.prototype,YG=Object.prototype,ZG=qG.toString,XG=YG.hasOwnProperty,JG=RegExp("^"+ZG.call(XG).replace(jG,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QG(e){if(!qs(e)||WG(e))return!1;var t=c_(e)?JG:KG;return t.test(Na(e))}function e$(e,t){return e==null?void 0:e[t]}function Va(e,t){var n=e$(e,t);return QG(n)?n:void 0}var wy=Va(Bo,"WeakMap"),d_=Object.create,t$=function(){function e(){}return function(t){if(!qs(t))return{};if(d_)return d_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function n$(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i$(){}var o$=800,s$=16,r$=Date.now;function a$(e){var t=0,n=0;return function(){var i=r$(),o=s$-(i-n);if(n=i,o>0){if(++t>=o$)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function l$(e){return function(){return e}}var $f=function(){try{var e=Va(Object,"defineProperty");return e({},"",{}),e}catch{}}(),c$=$f?function(e,t){return $f(e,"toString",{configurable:!0,enumerable:!1,value:l$(t),writable:!0})}:yy,u$=a$(c$);function d$(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function h$(e,t,n,i){for(var o=e.length,s=n+-1;++s<o;)if(t(e[s],s,e))return s;return-1}function f$(e){return e!==e}function p$(e,t,n){for(var i=n-1,o=e.length;++i<o;)if(e[i]===t)return i;return-1}function g$(e,t,n){return t===t?p$(e,t,n):h$(e,f$,n)}function m$(e,t){var n=e==null?0:e.length;return!!n&&g$(e,t,0)>-1}var v$=9007199254740991,y$=/^(?:0|[1-9]\d*)$/;function by(e,t){var n=typeof e;return t=t??v$,!!t&&(n=="number"||n!="symbol"&&y$.test(e))&&e>-1&&e%1==0&&e<t}function C$(e,t,n){t=="__proto__"&&$f?$f(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wf(e,t){return e===t||e!==e&&t!==t}var w$=Object.prototype,b$=w$.hasOwnProperty;function S$(e,t,n){var i=e[t];(!(b$.call(e,t)&&Wf(i,n))||n===void 0&&!(t in e))&&C$(e,t,n)}var h_=Math.max;function E$(e,t,n){return t=h_(t===void 0?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=h_(i.length-t,0),r=Array(s);++o<s;)r[o]=i[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=i[o];return a[t]=n(r),n$(e,this,a)}}function R$(e,t){return u$(E$(e,t,yy),e+"")}var D$=9007199254740991;function Sy(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=D$}function zf(e){return e!=null&&Sy(e.length)&&!c_(e)}function _$(e,t,n){if(!qs(n))return!1;var i=typeof t;return(i=="number"?zf(n)&&by(t,n.length):i=="string"&&t in n)?Wf(n[t],e):!1}var x$=Object.prototype;function Ey(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||x$;return e===n}function F$(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var T$="[object Arguments]";function f_(e){return Ks(e)&&Zl(e)==T$}var p_=Object.prototype,P$=p_.hasOwnProperty,I$=p_.propertyIsEnumerable,Uf=f_(function(){return arguments}())?f_:function(e){return Ks(e)&&P$.call(e,"callee")&&!I$.call(e,"callee")};function A$(){return!1}var g_=typeof un=="object"&&un&&!un.nodeType&&un,m_=g_&&typeof module=="object"&&module&&!module.nodeType&&module,k$=m_&&m_.exports===g_,v_=k$?Bo.Buffer:void 0,O$=v_?v_.isBuffer:void 0,Yu=O$||A$,M$="[object Arguments]",L$="[object Array]",N$="[object Boolean]",V$="[object Date]",B$="[object Error]",H$="[object Function]",G$="[object Map]",$$="[object Number]",W$="[object Object]",z$="[object RegExp]",U$="[object Set]",j$="[object String]",K$="[object WeakMap]",q$="[object ArrayBuffer]",Y$="[object DataView]",Z$="[object Float32Array]",X$="[object Float64Array]",J$="[object Int8Array]",Q$="[object Int16Array]",eW="[object Int32Array]",tW="[object Uint8Array]",nW="[object Uint8ClampedArray]",iW="[object Uint16Array]",oW="[object Uint32Array]",hn={};hn[Z$]=hn[X$]=hn[J$]=hn[Q$]=hn[eW]=hn[tW]=hn[nW]=hn[iW]=hn[oW]=!0,hn[M$]=hn[L$]=hn[q$]=hn[N$]=hn[Y$]=hn[V$]=hn[B$]=hn[H$]=hn[G$]=hn[$$]=hn[W$]=hn[z$]=hn[U$]=hn[j$]=hn[K$]=!1;function sW(e){return Ks(e)&&Sy(e.length)&&!!hn[Zl(e)]}function Ry(e){return function(t){return e(t)}}var y_=typeof un=="object"&&un&&!un.nodeType&&un,Zu=y_&&typeof module=="object"&&module&&!module.nodeType&&module,rW=Zu&&Zu.exports===y_,Dy=rW&&t_.process,Xl=function(){try{var e=Zu&&Zu.require&&Zu.require("util").types;return e||Dy&&Dy.binding&&Dy.binding("util")}catch{}}(),C_=Xl&&Xl.isTypedArray,_y=C_?Ry(C_):sW,aW=Object.prototype,lW=aW.hasOwnProperty;function cW(e,t){var n=ho(e),i=!n&&Uf(e),o=!n&&!i&&Yu(e),s=!n&&!i&&!o&&_y(e),r=n||i||o||s,a=r?F$(e.length,String):[],l=a.length;for(var c in e)lW.call(e,c)&&!(r&&(c=="length"||o&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||by(c,l)))&&a.push(c);return a}function w_(e,t){return function(n){return e(t(n))}}var uW=w_(Object.keys,Object),dW=Object.prototype,hW=dW.hasOwnProperty;function b_(e){if(!Ey(e))return uW(e);var t=[];for(var n in Object(e))hW.call(e,n)&&n!="constructor"&&t.push(n);return t}function S_(e){return zf(e)?cW(e):b_(e)}var fW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pW=/^\w*$/;function xy(e,t){if(ho(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Gf(e)?!0:pW.test(e)||!fW.test(e)||t!=null&&e in Object(t)}var Xu=Va(Object,"create");function gW(){this.__data__=Xu?Xu(null):{},this.size=0}function mW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vW="__lodash_hash_undefined__",yW=Object.prototype,CW=yW.hasOwnProperty;function wW(e){var t=this.__data__;if(Xu){var n=t[e];return n===vW?void 0:n}return CW.call(t,e)?t[e]:void 0}var bW=Object.prototype,SW=bW.hasOwnProperty;function EW(e){var t=this.__data__;return Xu?t[e]!==void 0:SW.call(t,e)}var RW="__lodash_hash_undefined__";function DW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xu&&t===void 0?RW:t,this}function Ba(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ba.prototype.clear=gW,Ba.prototype.delete=mW,Ba.prototype.get=wW,Ba.prototype.has=EW,Ba.prototype.set=DW;function _W(){this.__data__=[],this.size=0}function jf(e,t){for(var n=e.length;n--;)if(Wf(e[n][0],t))return n;return-1}var xW=Array.prototype,FW=xW.splice;function TW(e){var t=this.__data__,n=jf(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():FW.call(t,n,1),--this.size,!0}function PW(e){var t=this.__data__,n=jf(t,e);return n<0?void 0:t[n][1]}function IW(e){return jf(this.__data__,e)>-1}function AW(e,t){var n=this.__data__,i=jf(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function Ys(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ys.prototype.clear=_W,Ys.prototype.delete=TW,Ys.prototype.get=PW,Ys.prototype.has=IW,Ys.prototype.set=AW;var Ju=Va(Bo,"Map");function kW(){this.size=0,this.__data__={hash:new Ba,map:new(Ju||Ys),string:new Ba}}function OW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Kf(e,t){var n=e.__data__;return OW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function MW(e){var t=Kf(this,e).delete(e);return this.size-=t?1:0,t}function LW(e){return Kf(this,e).get(e)}function NW(e){return Kf(this,e).has(e)}function VW(e,t){var n=Kf(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function Zs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Zs.prototype.clear=kW,Zs.prototype.delete=MW,Zs.prototype.get=LW,Zs.prototype.has=NW,Zs.prototype.set=VW;var BW="Expected a function";function Fy(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(BW);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],s=n.cache;if(s.has(o))return s.get(o);var r=e.apply(this,i);return n.cache=s.set(o,r)||s,r};return n.cache=new(Fy.Cache||Zs),n}Fy.Cache=Zs;var HW=500;function GW(e){var t=Fy(e,function(i){return n.size===HW&&n.clear(),i}),n=t.cache;return t}var $W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WW=/\\(\\)?/g,zW=GW(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace($W,function(n,i,o,s){t.push(o?s.replace(WW,"$1"):i||n)}),t});function UW(e){return e==null?"":r_(e)}function E_(e,t){return ho(e)?e:xy(e,t)?[e]:zW(UW(e))}function qf(e){if(typeof e=="string"||Gf(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function R_(e,t){t=E_(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[qf(t[n++])];return n&&n==i?e:void 0}function jW(e,t,n){var i=e==null?void 0:R_(e,t);return i===void 0?n:i}function D_(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}var __=uo?uo.isConcatSpreadable:void 0;function KW(e){return ho(e)||Uf(e)||!!(__&&e&&e[__])}function qW(e,t,n,i,o){var s=-1,r=e.length;for(n||(n=KW),o||(o=[]);++s<r;){var a=e[s];n(a)&&D_(o,a)}return o}var YW=w_(Object.getPrototypeOf,Object);function ZW(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++i<o;)s[i]=e[i+t];return s}var XW=Math.ceil,JW=Math.max;function QW(e,t,n){t===void 0?t=1:t=JW(VG(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,r=Array(XW(i/t));o<i;)r[s++]=ZW(e,o,o+=t);return r}function ez(){this.__data__=new Ys,this.size=0}function tz(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nz(e){return this.__data__.get(e)}function iz(e){return this.__data__.has(e)}var oz=200;function sz(e,t){var n=this.__data__;if(n instanceof Ys){var i=n.__data__;if(!Ju||i.length<oz-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zs(i)}return n.set(e,t),this.size=n.size,this}function fs(e){var t=this.__data__=new Ys(e);this.size=t.size}fs.prototype.clear=ez,fs.prototype.delete=tz,fs.prototype.get=nz,fs.prototype.has=iz,fs.prototype.set=sz;var x_=typeof un=="object"&&un&&!un.nodeType&&un,F_=x_&&typeof module=="object"&&module&&!module.nodeType&&module,rz=F_&&F_.exports===x_,T_=rz?Bo.Buffer:void 0;T_&&T_.allocUnsafe;function az(e,t){return e.slice()}function lz(e,t){for(var n=-1,i=e==null?0:e.length,o=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[o++]=r)}return s}function cz(){return[]}var uz=Object.prototype,dz=uz.propertyIsEnumerable,P_=Object.getOwnPropertySymbols,hz=P_?function(e){return e==null?[]:(e=Object(e),lz(P_(e),function(t){return dz.call(e,t)}))}:cz;function fz(e,t,n){var i=t(e);return ho(e)?i:D_(i,n(e))}function Ty(e){return fz(e,S_,hz)}var Py=Va(Bo,"DataView"),Iy=Va(Bo,"Promise"),Jl=Va(Bo,"Set"),I_="[object Map]",pz="[object Object]",A_="[object Promise]",k_="[object Set]",O_="[object WeakMap]",M_="[object DataView]",gz=Na(Py),mz=Na(Ju),vz=Na(Iy),yz=Na(Jl),Cz=Na(wy),fo=Zl;(Py&&fo(new Py(new ArrayBuffer(1)))!=M_||Ju&&fo(new Ju)!=I_||Iy&&fo(Iy.resolve())!=A_||Jl&&fo(new Jl)!=k_||wy&&fo(new wy)!=O_)&&(fo=function(e){var t=Zl(e),n=t==pz?e.constructor:void 0,i=n?Na(n):"";if(i)switch(i){case gz:return M_;case mz:return I_;case vz:return A_;case yz:return k_;case Cz:return O_}return t});var wz=Object.prototype,bz=wz.hasOwnProperty;function Sz(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&bz.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Yf=Bo.Uint8Array;function Ay(e){var t=new e.constructor(e.byteLength);return new Yf(t).set(new Yf(e)),t}function Ez(e,t){var n=Ay(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var Rz=/\w*$/;function Dz(e){var t=new e.constructor(e.source,Rz.exec(e));return t.lastIndex=e.lastIndex,t}var L_=uo?uo.prototype:void 0,N_=L_?L_.valueOf:void 0;function _z(e){return N_?Object(N_.call(e)):{}}function xz(e,t){var n=Ay(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}var Fz="[object Boolean]",Tz="[object Date]",Pz="[object Map]",Iz="[object Number]",Az="[object RegExp]",kz="[object Set]",Oz="[object String]",Mz="[object Symbol]",Lz="[object ArrayBuffer]",Nz="[object DataView]",Vz="[object Float32Array]",Bz="[object Float64Array]",Hz="[object Int8Array]",Gz="[object Int16Array]",$z="[object Int32Array]",Wz="[object Uint8Array]",zz="[object Uint8ClampedArray]",Uz="[object Uint16Array]",jz="[object Uint32Array]";function Kz(e,t,n){var i=e.constructor;switch(t){case Lz:return Ay(e);case Fz:case Tz:return new i(+e);case Nz:return Ez(e);case Vz:case Bz:case Hz:case Gz:case $z:case Wz:case zz:case Uz:case jz:return xz(e);case Pz:return new i;case Iz:case Oz:return new i(e);case Az:return Dz(e);case kz:return new i;case Mz:return _z(e)}}function qz(e){return typeof e.constructor=="function"&&!Ey(e)?t$(YW(e)):{}}var Yz="[object Map]";function Zz(e){return Ks(e)&&fo(e)==Yz}var V_=Xl&&Xl.isMap,Xz=V_?Ry(V_):Zz,Jz="[object Set]";function Qz(e){return Ks(e)&&fo(e)==Jz}var B_=Xl&&Xl.isSet,eU=B_?Ry(B_):Qz,H_="[object Arguments]",tU="[object Array]",nU="[object Boolean]",iU="[object Date]",oU="[object Error]",G_="[object Function]",sU="[object GeneratorFunction]",rU="[object Map]",aU="[object Number]",$_="[object Object]",lU="[object RegExp]",cU="[object Set]",uU="[object String]",dU="[object Symbol]",hU="[object WeakMap]",fU="[object ArrayBuffer]",pU="[object DataView]",gU="[object Float32Array]",mU="[object Float64Array]",vU="[object Int8Array]",yU="[object Int16Array]",CU="[object Int32Array]",wU="[object Uint8Array]",bU="[object Uint8ClampedArray]",SU="[object Uint16Array]",EU="[object Uint32Array]",an={};an[H_]=an[tU]=an[fU]=an[pU]=an[nU]=an[iU]=an[gU]=an[mU]=an[vU]=an[yU]=an[CU]=an[rU]=an[aU]=an[$_]=an[lU]=an[cU]=an[uU]=an[dU]=an[wU]=an[bU]=an[SU]=an[EU]=!0,an[oU]=an[G_]=an[hU]=!1;function Zf(e,t,n,i,o,s){var r;if(r!==void 0)return r;if(!qs(e))return e;var a=ho(e);if(a)r=Sz(e);else{var l=fo(e),c=l==G_||l==sU;if(Yu(e))return az(e);if(l==$_||l==H_||c&&!o)r=c?{}:qz(e);else{if(!an[l])return o?e:{};r=Kz(e,l)}}s||(s=new fs);var u=s.get(e);if(u)return u;s.set(e,r),eU(e)?e.forEach(function(f){r.add(Zf(f,t,n,f,e,s))}):Xz(e)&&e.forEach(function(f,g){r.set(g,Zf(f,t,n,g,e,s))});var d=Ty,h=a?void 0:d(e);return d$(h||e,function(f,g){h&&(g=f,f=e[g]),S$(r,g,Zf(f,t,n,g,e,s))}),r}var RU=1,DU=4;function _U(e){return Zf(e,RU|DU)}var xU="__lodash_hash_undefined__";function FU(e){return this.__data__.set(e,xU),this}function TU(e){return this.__data__.has(e)}function Qu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zs;++t<n;)this.add(e[t])}Qu.prototype.add=Qu.prototype.push=FU,Qu.prototype.has=TU;function PU(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function W_(e,t){return e.has(t)}var IU=1,AU=2;function z_(e,t,n,i,o,s){var r=n&IU,a=e.length,l=t.length;if(a!=l&&!(r&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&AU?new Qu:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var g=e[d],m=t[d];if(i)var y=r?i(m,g,d,t,e,s):i(g,m,d,e,t,s);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!PU(t,function(b,S){if(!W_(f,S)&&(g===b||o(g,b,n,i,s)))return f.push(S)})){h=!1;break}}else if(!(g===m||o(g,m,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function kU(e){var t=-1,n=Array(e.size);return e.forEach(function(i,o){n[++t]=[o,i]}),n}function ky(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var OU=1,MU=2,LU="[object Boolean]",NU="[object Date]",VU="[object Error]",BU="[object Map]",HU="[object Number]",GU="[object RegExp]",$U="[object Set]",WU="[object String]",zU="[object Symbol]",UU="[object ArrayBuffer]",jU="[object DataView]",U_=uo?uo.prototype:void 0,Oy=U_?U_.valueOf:void 0;function KU(e,t,n,i,o,s,r){switch(n){case jU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case UU:return!(e.byteLength!=t.byteLength||!s(new Yf(e),new Yf(t)));case LU:case NU:case HU:return Wf(+e,+t);case VU:return e.name==t.name&&e.message==t.message;case GU:case WU:return e==t+"";case BU:var a=kU;case $U:var l=i&OU;if(a||(a=ky),e.size!=t.size&&!l)return!1;var c=r.get(e);if(c)return c==t;i|=MU,r.set(e,t);var u=z_(a(e),a(t),i,o,s,r);return r.delete(e),u;case zU:if(Oy)return Oy.call(e)==Oy.call(t)}return!1}var qU=1,YU=Object.prototype,ZU=YU.hasOwnProperty;function XU(e,t,n,i,o,s){var r=n&qU,a=Ty(e),l=a.length,c=Ty(t),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in t:ZU.call(t,h)))return!1}var f=s.get(e),g=s.get(t);if(f&&g)return f==t&&g==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=r;++d<l;){h=a[d];var b=e[h],S=t[h];if(i)var F=r?i(S,b,h,t,e,s):i(b,S,h,e,t,s);if(!(F===void 0?b===S||o(b,S,n,i,s):F)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var C=e.constructor,R=t.constructor;C!=R&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof R=="function"&&R instanceof R)&&(m=!1)}return s.delete(e),s.delete(t),m}var JU=1,j_="[object Arguments]",K_="[object Array]",Xf="[object Object]",QU=Object.prototype,q_=QU.hasOwnProperty;function e3(e,t,n,i,o,s){var r=ho(e),a=ho(t),l=r?K_:fo(e),c=a?K_:fo(t);l=l==j_?Xf:l,c=c==j_?Xf:c;var u=l==Xf,d=c==Xf,h=l==c;if(h&&Yu(e)){if(!Yu(t))return!1;r=!0,u=!1}if(h&&!u)return s||(s=new fs),r||_y(e)?z_(e,t,n,i,o,s):KU(e,t,l,n,i,o,s);if(!(n&JU)){var f=u&&q_.call(e,"__wrapped__"),g=d&&q_.call(t,"__wrapped__");if(f||g){var m=f?e.value():e,y=g?t.value():t;return s||(s=new fs),o(m,y,n,i,s)}}return h?(s||(s=new fs),XU(e,t,n,i,o,s)):!1}function My(e,t,n,i,o){return e===t?!0:e==null||t==null||!Ks(e)&&!Ks(t)?e!==e&&t!==t:e3(e,t,n,i,My,o)}var t3=1,n3=2;function i3(e,t,n,i){var o=n.length,s=o;if(e==null)return!s;for(e=Object(e);o--;){var r=n[o];if(r[2]?r[1]!==e[r[0]]:!(r[0]in e))return!1}for(;++o<s;){r=n[o];var a=r[0],l=e[a],c=r[1];if(r[2]){if(l===void 0&&!(a in e))return!1}else{var u=new fs,d;if(!(d===void 0?My(c,l,t3|n3,i,u):d))return!1}}return!0}function Y_(e){return e===e&&!qs(e)}function o3(e){for(var t=S_(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,Y_(o)]}return t}function Z_(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function s3(e){var t=o3(e);return t.length==1&&t[0][2]?Z_(t[0][0],t[0][1]):function(n){return n===e||i3(n,e,t)}}function r3(e,t){return e!=null&&t in Object(e)}function a3(e,t,n){t=E_(t,e);for(var i=-1,o=t.length,s=!1;++i<o;){var r=qf(t[i]);if(!(s=e!=null&&n(e,r)))break;e=e[r]}return s||++i!=o?s:(o=e==null?0:e.length,!!o&&Sy(o)&&by(r,o)&&(ho(e)||Uf(e)))}function l3(e,t){return e!=null&&a3(e,t,r3)}var c3=1,u3=2;function d3(e,t){return xy(e)&&Y_(t)?Z_(qf(e),t):function(n){var i=jW(n,e);return i===void 0&&i===t?l3(n,e):My(t,i,c3|u3)}}function h3(e){return function(t){return t==null?void 0:t[e]}}function f3(e){return function(t){return R_(t,e)}}function p3(e){return xy(e)?h3(qf(e)):f3(e)}function g3(e){return typeof e=="function"?e:e==null?yy:typeof e=="object"?ho(e)?d3(e[0],e[1]):s3(e):p3(e)}var Ly=function(){return Bo.Date.now()},m3="Expected a function",v3=Math.max,y3=Math.min;function Ho(e,t,n){var i,o,s,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(m3);t=my(t)||0,qs(n)&&(u=!!n.leading,d="maxWait"in n,s=d?v3(my(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(E){var _=i,I=o;return i=o=void 0,c=E,r=e.apply(I,_),r}function g(E){return c=E,a=setTimeout(b,t),u?f(E):r}function m(E){var _=E-l,I=E-c,O=t-_;return d?y3(O,s-I):O}function y(E){var _=E-l,I=E-c;return l===void 0||_>=t||_<0||d&&I>=s}function b(){var E=Ly();if(y(E))return S(E);a=setTimeout(b,m(E))}function S(E){return a=void 0,h&&i?f(E):(i=o=void 0,r)}function F(){a!==void 0&&clearTimeout(a),c=0,i=l=o=a=void 0}function C(){return a===void 0?r:S(Ly())}function R(){var E=Ly(),_=y(E);if(i=arguments,o=this,l=E,_){if(a===void 0)return g(l);if(d)return clearTimeout(a),a=setTimeout(b,t),f(l)}return a===void 0&&(a=setTimeout(b,t)),r}return R.cancel=F,R.flush=C,R}function X_(e){return Ks(e)&&zf(e)}function C3(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var w3="[object Map]",b3="[object Set]",S3=Object.prototype,E3=S3.hasOwnProperty;function R3(e){if(e==null)return!0;if(zf(e)&&(ho(e)||typeof e=="string"||typeof e.splice=="function"||Yu(e)||_y(e)||Uf(e)))return!e.length;var t=fo(e);if(t==w3||t==b3)return!e.size;if(Ey(e))return!b_(e).length;for(var n in e)if(E3.call(e,n))return!1;return!0}var D3=Math.floor,_3=Math.random;function x3(e,t){return e+D3(_3()*(t-e+1))}var F3=parseFloat,T3=Math.min,P3=Math.random;function I3(e,t,n){if(n&&typeof n!="boolean"&&_$(e,t,n)&&(t=n=void 0),n===void 0&&(typeof t=="boolean"?(n=t,t=void 0):typeof e=="boolean"&&(n=e,e=void 0)),e===void 0&&t===void 0?(e=0,t=1):(e=vy(e),t===void 0?(t=e,e=0):t=vy(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=P3();return T3(e+o*(t-e+F3("1e-"+((o+"").length-1))),t)}return x3(e,t)}var A3=1/0,k3=Jl&&1/ky(new Jl([,-0]))[1]==A3?function(e){return new Jl(e)}:i$,O3=200;function M3(e,t,n){var i=-1,o=m$,s=e.length,r=!0,a=[],l=a;if(s>=O3){var c=t?null:k3(e);if(c)return ky(c);r=!1,o=W_,l=new Qu}else l=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;t&&l.push(d),a.push(u)}else o(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var Jf=R$(function(e){var t=C3(e);return X_(t)&&(t=void 0),M3(qW(e,1,X_),g3(t))});const po=(e,t)=>{const n=Si();return{apiServices:j(()=>{var r;const o=n==null?void 0:n.appContext.config.globalProperties,s=(r=t.params)==null?void 0:r.context;if(o!=null&&o.apiServices)return o.apiServices;if(e&&(s!=null&&s.apiServices))return s.apiServices})}},L3=e=>{const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t?decodeURIComponent(t[2]):null};class Ha extends Error{}class N3 extends Ha{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class V3 extends Ha{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class B3 extends Ha{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Ql extends Ha{}class J_ extends Ha{constructor(t){super(`Invalid unit ${t}`)}}class ci extends Ha{}class Mr extends Ha{constructor(){super("Zone is an abstract class")}}const et="numeric",Go="short",Ki="long",Qf={year:et,month:et,day:et},Q_={year:et,month:Go,day:et},H3={year:et,month:Go,day:et,weekday:Go},ex={year:et,month:Ki,day:et},tx={year:et,month:Ki,day:et,weekday:Ki},nx={hour:et,minute:et},ix={hour:et,minute:et,second:et},ox={hour:et,minute:et,second:et,timeZoneName:Go},sx={hour:et,minute:et,second:et,timeZoneName:Ki},rx={hour:et,minute:et,hourCycle:"h23"},ax={hour:et,minute:et,second:et,hourCycle:"h23"},lx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Go},cx={hour:et,minute:et,second:et,hourCycle:"h23",timeZoneName:Ki},ux={year:et,month:et,day:et,hour:et,minute:et},dx={year:et,month:et,day:et,hour:et,minute:et,second:et},hx={year:et,month:Go,day:et,hour:et,minute:et},fx={year:et,month:Go,day:et,hour:et,minute:et,second:et},G3={year:et,month:Go,day:et,weekday:Go,hour:et,minute:et},px={year:et,month:Ki,day:et,hour:et,minute:et,timeZoneName:Go},gx={year:et,month:Ki,day:et,hour:et,minute:et,second:et,timeZoneName:Go},mx={year:et,month:Ki,day:et,weekday:Ki,hour:et,minute:et,timeZoneName:Ki},vx={year:et,month:Ki,day:et,weekday:Ki,hour:et,minute:et,second:et,timeZoneName:Ki};class ed{get type(){throw new Mr}get name(){throw new Mr}get ianaName(){return this.name}get isUniversal(){throw new Mr}offsetName(t,n){throw new Mr}formatOffset(t,n){throw new Mr}offset(t){throw new Mr}equals(t){throw new Mr}get isValid(){throw new Mr}}let Ny=null;class ep extends ed{static get instance(){return Ny===null&&(Ny=new ep),Ny}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Wx(t,n,i)}formatOffset(t,n){return od(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}const Vy=new Map;function $3(e){let t=Vy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Vy.set(e,t)),t}const W3={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function z3(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,s,r,a,l,c,u]=i;return[r,o,s,a,l,c,u]}function U3(e,t){const n=e.formatToParts(t),i=[];for(let o=0;o<n.length;o++){const{type:s,value:r}=n[o],a=W3[s];s==="era"?i[a]=r:Dt(a)||(i[a]=parseInt(r,10))}return i}const By=new Map;class Xs extends ed{static create(t){let n=By.get(t);return n===void 0&&By.set(t,n=new Xs(t)),n}static resetCache(){By.clear(),Vy.clear()}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Xs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return Wx(t,n,i,this.name)}formatOffset(t,n){return od(this.offset(t),n)}offset(t){if(!this.valid)return NaN;const n=new Date(t);if(isNaN(n))return NaN;const i=$3(this.name);let[o,s,r,a,l,c,u]=i.formatToParts?U3(i,n):z3(i,n);a==="BC"&&(o=-Math.abs(o)+1);const h=sp({year:o,month:s,day:r,hour:l===24?0:l,minute:c,second:u,millisecond:0});let f=+n;const g=f%1e3;return f-=g>=0?g:1e3+g,(h-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let yx={};function j3(e,t={}){const n=JSON.stringify([e,t]);let i=yx[n];return i||(i=new Intl.ListFormat(e,t),yx[n]=i),i}const Hy=new Map;function Gy(e,t={}){const n=JSON.stringify([e,t]);let i=Hy.get(n);return i===void 0&&(i=new Intl.DateTimeFormat(e,t),Hy.set(n,i)),i}const $y=new Map;function K3(e,t={}){const n=JSON.stringify([e,t]);let i=$y.get(n);return i===void 0&&(i=new Intl.NumberFormat(e,t),$y.set(n,i)),i}const Wy=new Map;function q3(e,t={}){const{base:n,...i}=t,o=JSON.stringify([e,i]);let s=Wy.get(o);return s===void 0&&(s=new Intl.RelativeTimeFormat(e,t),Wy.set(o,s)),s}let td=null;function Y3(){return td||(td=new Intl.DateTimeFormat().resolvedOptions().locale,td)}const zy=new Map;function Cx(e){let t=zy.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),zy.set(e,t)),t}const Uy=new Map;function Z3(e){let t=Uy.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...wx,...t}),Uy.set(e,t)}return t}function X3(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,o;try{i=Gy(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);i=Gy(l).resolvedOptions(),o=l}const{numberingSystem:s,calendar:r}=i;return[o,s,r]}}function J3(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Q3(e){const t=[];for(let n=1;n<=12;n++){const i=tt.utc(2009,n,1);t.push(e(i))}return t}function e4(e){const t=[];for(let n=1;n<=7;n++){const i=tt.utc(2016,11,13+n);t.push(e(i))}return t}function tp(e,t,n,i){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):i(t)}function t4(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||Cx(e.locale).numberingSystem==="latn"}class n4{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:o,floor:s,...r}=i;if(!n||Object.keys(r).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=K3(t,a)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):eC(t,3);return $n(n,this.padTo)}}}class i4{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const r=-1*(t.offset/60),a=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;t.offset!==0&&Xs.create(a).valid?(o=a,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||o,this.dtf=Gy(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class o4{constructor(t,n,i){this.opts={style:"long",...i},!n&&Bx()&&(this.rtf=q3(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):_4(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const wx={firstDay:1,minimalDays:4,weekend:[6,7]};class en{static fromOpts(t){return en.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,o,s=!1){const r=t||Fn.defaultLocale,a=r||(s?"en-US":Y3()),l=n||Fn.defaultNumberingSystem,c=i||Fn.defaultOutputCalendar,u=Jy(o)||Fn.defaultWeekSettings;return new en(a,l,c,u,r)}static resetCache(){td=null,Hy.clear(),$y.clear(),Wy.clear(),zy.clear(),Uy.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:o}={}){return en.create(t,n,i,o)}constructor(t,n,i,o,s){const[r,a,l]=X3(t);this.locale=r,this.numberingSystem=n||a||null,this.outputCalendar=i||l||null,this.weekSettings=o,this.intl=J3(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=t4(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:en.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Jy(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return tp(this,t,jx,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");n&=!i;const o=n?{month:t,day:"numeric"}:{month:t},s=n?"format":"standalone";if(!this.monthsCache[s][t]){const r=i?a=>this.dtFormatter(a,o).format():a=>this.extract(a,o,"month");this.monthsCache[s][t]=Q3(r)}return this.monthsCache[s][t]})}weekdays(t,n=!1){return tp(this,t,Yx,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=e4(s=>this.extract(s,i,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return tp(this,void 0,()=>Zx,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[tt.utc(2016,11,13,9),tt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return tp(this,t,Xx,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[tt.utc(-40,1,1),tt.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const o=this.dtFormatter(t,n),s=o.formatToParts(),r=s.find(a=>a.type.toLowerCase()===i);return r?r.value:null}numberFormatter(t={}){return new n4(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new i4(t,this.intl,n)}relFormatter(t={}){return new o4(this.intl,this.isEnglish(),t)}listFormatter(t={}){return j3(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Cx(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Hx()?Z3(this.locale):wx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let jy=null;class Ei extends ed{static get utcInstance(){return jy===null&&(jy=new Ei(0)),jy}static instance(t){return t===0?Ei.utcInstance:new Ei(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ei(rp(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${od(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${od(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return od(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class s4 extends ed{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Lr(e,t){if(Dt(e)||e===null)return t;if(e instanceof ed)return e;if(d4(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?ep.instance:n==="utc"||n==="gmt"?Ei.utcInstance:Ei.parseSpecifier(n)||Xs.create(e)}else return Nr(e)?Ei.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new s4(e)}const Ky={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},bx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},r4=Ky.hanidec.replace(/[\[|\]]/g,"").split("");function a4(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(Ky.hanidec)!==-1)t+=r4.indexOf(e[n]);else for(const o in bx){const[s,r]=bx[o];i>=s&&i<=r&&(t+=i-s)}}return parseInt(t,10)}else return t}const qy=new Map;function l4(){qy.clear()}function $o({numberingSystem:e},t=""){const n=e||"latn";let i=qy.get(n);i===void 0&&(i=new Map,qy.set(n,i));let o=i.get(t);return o===void 0&&(o=new RegExp(`${Ky[n]}${t}`),i.set(t,o)),o}let Sx=()=>Date.now(),Ex="system",Rx=null,Dx=null,_x=null,xx=60,Fx,Tx=null;class Fn{static get now(){return Sx}static set now(t){Sx=t}static set defaultZone(t){Ex=t}static get defaultZone(){return Lr(Ex,ep.instance)}static get defaultLocale(){return Rx}static set defaultLocale(t){Rx=t}static get defaultNumberingSystem(){return Dx}static set defaultNumberingSystem(t){Dx=t}static get defaultOutputCalendar(){return _x}static set defaultOutputCalendar(t){_x=t}static get defaultWeekSettings(){return Tx}static set defaultWeekSettings(t){Tx=Jy(t)}static get twoDigitCutoffYear(){return xx}static set twoDigitCutoffYear(t){xx=t%100}static get throwOnInvalid(){return Fx}static set throwOnInvalid(t){Fx=t}static resetCaches(){en.resetCache(),Xs.resetCache(),tt.resetCache(),l4()}}class Wo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Px=[0,31,59,90,120,151,181,212,243,273,304,334],Ix=[0,31,60,91,121,152,182,213,244,274,305,335];function go(e,t){return new Wo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Yy(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const o=i.getUTCDay();return o===0?7:o}function Ax(e,t,n){return n+(nd(e)?Ix:Px)[t-1]}function kx(e,t){const n=nd(e)?Ix:Px,i=n.findIndex(s=>s<t),o=t-n[i];return{month:i+1,day:o}}function Zy(e,t){return(e-t+7)%7+1}function np(e,t=4,n=1){const{year:i,month:o,day:s}=e,r=Ax(i,o,s),a=Zy(Yy(i,o,s),n);let l=Math.floor((r-a+14-t)/7),c;return l<1?(c=i-1,l=id(c,t,n)):l>id(i,t,n)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...lp(e)}}function Ox(e,t=4,n=1){const{weekYear:i,weekNumber:o,weekday:s}=e,r=Zy(Yy(i,1,t),n),a=tc(i);let l=o*7+s-r-7+t,c;l<1?(c=i-1,l+=tc(c)):l>a?(c=i+1,l-=tc(i)):c=i;const{month:u,day:d}=kx(c,l);return{year:c,month:u,day:d,...lp(e)}}function Xy(e){const{year:t,month:n,day:i}=e,o=Ax(t,n,i);return{year:t,ordinal:o,...lp(e)}}function Mx(e){const{year:t,ordinal:n}=e,{month:i,day:o}=kx(t,n);return{year:t,month:i,day:o,...lp(e)}}function Lx(e,t){if(!Dt(e.localWeekday)||!Dt(e.localWeekNumber)||!Dt(e.localWeekYear)){if(!Dt(e.weekday)||!Dt(e.weekNumber)||!Dt(e.weekYear))throw new Ql("Cannot mix locale-based week fields with ISO-based week fields");return Dt(e.localWeekday)||(e.weekday=e.localWeekday),Dt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Dt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function c4(e,t=4,n=1){const i=ip(e.weekYear),o=mo(e.weekNumber,1,id(e.weekYear,t,n)),s=mo(e.weekday,1,7);return i?o?s?!1:go("weekday",e.weekday):go("week",e.weekNumber):go("weekYear",e.weekYear)}function u4(e){const t=ip(e.year),n=mo(e.ordinal,1,tc(e.year));return t?n?!1:go("ordinal",e.ordinal):go("year",e.year)}function Nx(e){const t=ip(e.year),n=mo(e.month,1,12),i=mo(e.day,1,op(e.year,e.month));return t?n?i?!1:go("day",e.day):go("month",e.month):go("year",e.year)}function Vx(e){const{hour:t,minute:n,second:i,millisecond:o}=e,s=mo(t,0,23)||t===24&&n===0&&i===0&&o===0,r=mo(n,0,59),a=mo(i,0,59),l=mo(o,0,999);return s?r?a?l?!1:go("millisecond",o):go("second",i):go("minute",n):go("hour",t)}function Dt(e){return typeof e>"u"}function Nr(e){return typeof e=="number"}function ip(e){return typeof e=="number"&&e%1===0}function d4(e){return typeof e=="string"}function h4(e){return Object.prototype.toString.call(e)==="[object Date]"}function Bx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Hx(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function f4(e){return Array.isArray(e)?e:[e]}function Gx(e,t,n){if(e.length!==0)return e.reduce((i,o)=>{const s=[t(o),o];return i&&n(i[0],s[0])===i[0]?i:s},null)[1]}function p4(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function ec(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Jy(e){if(e==null)return null;if(typeof e!="object")throw new ci("Week settings must be an object");if(!mo(e.firstDay,1,7)||!mo(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!mo(t,1,7)))throw new ci("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function mo(e,t,n){return ip(e)&&e>=t&&e<=n}function g4(e,t){return e-t*Math.floor(e/t)}function $n(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function Vr(e){if(!(Dt(e)||e===null||e===""))return parseInt(e,10)}function Ga(e){if(!(Dt(e)||e===null||e===""))return parseFloat(e)}function Qy(e){if(!(Dt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function eC(e,t,n="round"){const i=10**t;switch(n){case"expand":return e>0?Math.ceil(e*i)/i:Math.floor(e*i)/i;case"trunc":return Math.trunc(e*i)/i;case"round":return Math.round(e*i)/i;case"floor":return Math.floor(e*i)/i;case"ceil":return Math.ceil(e*i)/i;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function nd(e){return e%4===0&&(e%100!==0||e%400===0)}function tc(e){return nd(e)?366:365}function op(e,t){const n=g4(t-1,12)+1,i=e+(t-n)/12;return n===2?nd(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function sp(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $x(e,t,n){return-Zy(Yy(e,1,t),n)+t-1}function id(e,t=4,n=1){const i=$x(e,t,n),o=$x(e+1,t,n);return(tc(e)-i+o)/7}function tC(e){return e>99?e:e>Fn.twoDigitCutoffYear?1900+e:2e3+e}function Wx(e,t,n,i=null){const o=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const r={timeZoneName:t,...s},a=new Intl.DateTimeFormat(n,r).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function rp(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-i:i;return n*60+o}function zx(e){const t=Number(e);if(typeof e=="boolean"||e===""||!Number.isFinite(t))throw new ci(`Invalid unit value ${e}`);return t}function ap(e,t){const n={};for(const i in e)if(ec(e,i)){const o=e[i];if(o==null)continue;n[t(i)]=zx(o)}return n}function od(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${$n(n,2)}:${$n(i,2)}`;case"narrow":return`${o}${n}${i>0?`:${i}`:""}`;case"techie":return`${o}${$n(n,2)}${$n(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function lp(e){return p4(e,["hour","minute","second","millisecond"])}const m4=["January","February","March","April","May","June","July","August","September","October","November","December"],Ux=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v4=["J","F","M","A","M","J","J","A","S","O","N","D"];function jx(e){switch(e){case"narrow":return[...v4];case"short":return[...Ux];case"long":return[...m4];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Kx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],y4=["M","T","W","T","F","S","S"];function Yx(e){switch(e){case"narrow":return[...y4];case"short":return[...qx];case"long":return[...Kx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Zx=["AM","PM"],C4=["Before Christ","Anno Domini"],w4=["BC","AD"],b4=["B","A"];function Xx(e){switch(e){case"narrow":return[...b4];case"short":return[...w4];case"long":return[...C4];default:return null}}function S4(e){return Zx[e.hour<12?0:1]}function E4(e,t){return Yx(t)[e.weekday-1]}function R4(e,t){return jx(t)[e.month-1]}function D4(e,t){return Xx(t)[e.year<0?0:1]}function _4(e,t,n="always",i=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&s){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const r=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=o[e],u=i?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return r?`${a} ${u} ago`:`in ${a} ${u}`}function Jx(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const x4={D:Qf,DD:Q_,DDD:ex,DDDD:tx,t:nx,tt:ix,ttt:ox,tttt:sx,T:rx,TT:ax,TTT:lx,TTTT:cx,f:ux,ff:hx,fff:px,ffff:mx,F:dx,FF:fx,FFF:gx,FFFF:vx};class ui{static create(t,n={}){return new ui(t,n)}static parseFormat(t){let n=null,i="",o=!1;const s=[];for(let r=0;r<t.length;r++){const a=t.charAt(r);a==="'"?((i.length>0||o)&&s.push({literal:o||/^\s+$/.test(i),val:i===""?"'":i}),n=null,i="",o=!o):o||a===n?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,n=a)}return i.length>0&&s.push({literal:o||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(t){return x4[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0,i=void 0){if(this.opts.forceSimple)return $n(t,n);const o={...this.opts};return n>0&&(o.padTo=n),i&&(o.signDisplay=i),this.loc.numberFormatter(o).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(f,g)=>this.loc.extract(t,f,g),r=f=>t.isOffsetFixed&&t.offset===0&&f.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,f.format):"",a=()=>i?S4(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,g)=>i?R4(t,f):s(g?{month:f}:{month:f,day:"numeric"},"month"),c=(f,g)=>i?E4(t,f):s(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const g=ui.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(t,g):f},d=f=>i?D4(t,f):s({era:f},"era"),h=f=>{switch(f){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return o?s({day:"numeric"},"day"):this.num(t.day);case"dd":return o?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?s({month:"numeric"},"month"):this.num(t.month);case"MM":return o?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?s({year:"numeric"},"year"):this.num(t.year);case"yy":return o?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(f)}};return Jx(ui.parseFormat(n),h)}formatDurationFromString(t,n){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,o=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(u,d)=>h=>{const f=o(h);if(f){const g=d.isNegativeDuration&&f!==d.largestUnit?i:1;let m;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(u.get(f)*g,h.length,m)}else return h},r=ui.parseFormat(n),a=r.reduce((u,{literal:d,val:h})=>d?u:u.concat(h),[]),l=t.shiftTo(...a.map(o).filter(u=>u)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Jx(r,s(l,c))}}const Qx=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function nc(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function ic(...e){return t=>e.reduce(([n,i,o],s)=>{const[r,a,l]=s(t,o);return[{...n,...r},a||i,l]},[{},null,1]).slice(0,2)}function oc(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const o=n.exec(e);if(o)return i(o)}return[null,null]}function eF(...e){return(t,n)=>{const i={};let o;for(o=0;o<e.length;o++)i[e[o]]=Vr(t[n+o]);return[i,null,n+o]}}const tF=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,F4=`(?:${tF.source}?(?:\\[(${Qx.source})\\])?)?`,nC=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,nF=RegExp(`${nC.source}${F4}`),iC=RegExp(`(?:[Tt]${nF.source})?`),T4=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,P4=/(\d{4})-?W(\d\d)(?:-?(\d))?/,I4=/(\d{4})-?(\d{3})/,A4=eF("weekYear","weekNumber","weekDay"),k4=eF("year","ordinal"),O4=/(\d{4})-(\d\d)-(\d\d)/,iF=RegExp(`${nC.source} ?(?:${tF.source}|(${Qx.source}))?`),M4=RegExp(`(?: ${iF.source})?`);function sc(e,t,n){const i=e[t];return Dt(i)?n:Vr(i)}function L4(e,t){return[{year:sc(e,t),month:sc(e,t+1,1),day:sc(e,t+2,1)},null,t+3]}function rc(e,t){return[{hours:sc(e,t,0),minutes:sc(e,t+1,0),seconds:sc(e,t+2,0),milliseconds:Qy(e[t+3])},null,t+4]}function sd(e,t){const n=!e[t]&&!e[t+1],i=rp(e[t+1],e[t+2]),o=n?null:Ei.instance(i);return[{},o,t+3]}function rd(e,t){const n=e[t]?Xs.create(e[t]):null;return[{},n,t+1]}const N4=RegExp(`^T?${nC.source}$`),V4=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function B4(e){const[t,n,i,o,s,r,a,l,c]=e,u=t[0]==="-",d=l&&l[0]==="-",h=(f,g=!1)=>f!==void 0&&(g||f&&u)?-f:f;return[{years:h(Ga(n)),months:h(Ga(i)),weeks:h(Ga(o)),days:h(Ga(s)),hours:h(Ga(r)),minutes:h(Ga(a)),seconds:h(Ga(l),l==="-0"),milliseconds:h(Qy(c),d)}]}const H4={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function oC(e,t,n,i,o,s,r){const a={year:t.length===2?tC(Vr(t)):Vr(t),month:Ux.indexOf(n)+1,day:Vr(i),hour:Vr(o),minute:Vr(s)};return r&&(a.second=Vr(r)),e&&(a.weekday=e.length>3?Kx.indexOf(e)+1:qx.indexOf(e)+1),a}const G4=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function $4(e){const[,t,n,i,o,s,r,a,l,c,u,d]=e,h=oC(t,o,i,n,s,r,a);let f;return l?f=H4[l]:c?f=0:f=rp(u,d),[h,new Ei(f)]}function W4(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const z4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,U4=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,j4=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function oF(e){const[,t,n,i,o,s,r,a]=e;return[oC(t,o,i,n,s,r,a),Ei.utcInstance]}function K4(e){const[,t,n,i,o,s,r,a]=e;return[oC(t,a,n,i,o,s,r),Ei.utcInstance]}const q4=nc(T4,iC),Y4=nc(P4,iC),Z4=nc(I4,iC),X4=nc(nF),sF=ic(L4,rc,sd,rd),J4=ic(A4,rc,sd,rd),Q4=ic(k4,rc,sd,rd),e6=ic(rc,sd,rd);function t6(e){return oc(e,[q4,sF],[Y4,J4],[Z4,Q4],[X4,e6])}function n6(e){return oc(W4(e),[G4,$4])}function i6(e){return oc(e,[z4,oF],[U4,oF],[j4,K4])}function o6(e){return oc(e,[V4,B4])}const s6=ic(rc);function r6(e){return oc(e,[N4,s6])}const a6=nc(O4,M4),l6=nc(iF),c6=ic(rc,sd,rd);function u6(e){return oc(e,[a6,sF],[l6,c6])}const rF="Invalid Duration",aF={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},d6={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...aF},vo=146097/400,ac=146097/4800,h6={years:{quarters:4,months:12,weeks:vo/7,days:vo,hours:vo*24,minutes:vo*24*60,seconds:vo*24*60*60,milliseconds:vo*24*60*60*1e3},quarters:{months:3,weeks:vo/28,days:vo/4,hours:vo*24/4,minutes:vo*24*60/4,seconds:vo*24*60*60/4,milliseconds:vo*24*60*60*1e3/4},months:{weeks:ac/7,days:ac,hours:ac*24,minutes:ac*24*60,seconds:ac*24*60*60,milliseconds:ac*24*60*60*1e3},...aF},$a=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],f6=$a.slice(0).reverse();function Js(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Wt(i)}function lF(e,t){let n=t.milliseconds??0;for(const i of f6.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function cF(e,t){const n=lF(e,t)<0?-1:1;$a.reduceRight((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]*n,r=e[o][i],a=Math.floor(s/r);t[o]+=a*n,t[i]-=a*r*n}return o},null),$a.reduce((i,o)=>{if(Dt(t[o]))return i;if(i){const s=t[i]%1;t[i]-=s,t[o]+=s*e[i][o]}return o},null)}function uF(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Wt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?h6:d6;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||en.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Wt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ci(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Wt({values:ap(t,Wt.normalizeUnit),loc:en.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Nr(t))return Wt.fromMillis(t);if(Wt.isDuration(t))return t;if(typeof t=="object")return Wt.fromObject(t);throw new ci(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=o6(t);return i?Wt.fromObject(i,n):Wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=r6(t);return i?Wt.fromObject(i,n):Wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Duration is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new B3(i);return new Wt({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new J_(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?ui.create(this.loc,i).formatDurationFromString(this,t):rF}toHuman(t={}){if(!this.isValid)return rF;const n=t.showZeros!==!1,i=$a.map(o=>{const s=this.values[o];return Dt(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:o.slice(0,-1)}).format(s)}).filter(o=>o);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=eC(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},tt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?lF(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t),i={};for(const o of $a)(ec(n.values,o)||ec(this.values,o))&&(i[o]=n.get(o)+this.get(o));return Js(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=zx(t(this.values[i],i));return Js(this,{values:n},!0)}get(t){return this[Wt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...ap(t,Wt.normalizeUnit)};return Js(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:o}={}){const r={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:i};return Js(this,r)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return cF(this.matrix,t),Js(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=uF(this.normalize().shiftToAll().toObject());return Js(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(r=>Wt.normalizeUnit(r));const n={},i={},o=this.toObject();let s;for(const r of $a)if(t.indexOf(r)>=0){s=r;let a=0;for(const c in i)a+=this.matrix[c][r]*i[c],i[c]=0;Nr(o[r])&&(a+=o[r]);const l=Math.trunc(a);n[r]=l,i[r]=(a*1e3-l*1e3)/1e3}else Nr(o[r])&&(i[r]=o[r]);for(const r in i)i[r]!==0&&(n[s]+=r===s?i[r]:i[r]/this.matrix[s][r]);return cF(this.matrix,n),Js(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Js(this,{values:t},!0)}removeZeros(){if(!this.isValid)return this;const t=uF(this.values);return Js(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,o){return i===void 0||i===0?o===void 0||o===0:i===o}for(const i of $a)if(!n(this.values[i],t.values[i]))return!1;return!0}}const lc="Invalid Interval";function p6(e,t){return!e||!e.isValid?Tn.invalid("missing or invalid start"):!t||!t.isValid?Tn.invalid("missing or invalid end"):t<e?Tn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Tn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the Interval is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new V3(i);return new Tn({invalid:i})}static fromDateTimes(t,n){const i=cd(t),o=cd(n),s=p6(i,o);return s??new Tn({start:i,end:o})}static after(t,n){const i=Wt.fromDurationLike(n),o=cd(t);return Tn.fromDateTimes(o,o.plus(i))}static before(t,n){const i=Wt.fromDurationLike(n),o=cd(t);return Tn.fromDateTimes(o.minus(i),o)}static fromISO(t,n){const[i,o]=(t||"").split("/",2);if(i&&o){let s,r;try{s=tt.fromISO(i,n),r=s.isValid}catch{r=!1}let a,l;try{a=tt.fromISO(o,n),l=a.isValid}catch{l=!1}if(r&&l)return Tn.fromDateTimes(s,a);if(r){const c=Wt.fromISO(o,n);if(c.isValid)return Tn.after(s,c)}else if(l){const c=Wt.fromISO(i,n);if(c.isValid)return Tn.before(a,c)}}return Tn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let o;return n!=null&&n.useLocaleWeeks?o=this.end.reconfigure({locale:i.locale}):o=this.end,o=o.startOf(t,n),Math.floor(o.diff(i,t).get(t))+(o.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Tn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(cd).filter(r=>this.contains(r)).sort((r,a)=>r.toMillis()-a.toMillis()),i=[];let{s:o}=this,s=0;for(;o<this.e;){const r=n[s]||this.e,a=+r>+this.e?this.e:r;i.push(Tn.fromDateTimes(o,a)),o=a,s+=1}return i}splitBy(t){const n=Wt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,o=1,s;const r=[];for(;i<this.e;){const a=this.start.plus(n.mapUnits(l=>l*o));s=+a>+this.e?this.e:a,r.push(Tn.fromDateTimes(i,s)),i=s,o+=1}return r}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:Tn.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Tn.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((o,s)=>o.s-s.s).reduce(([o,s],r)=>s?s.overlaps(r)||s.abutsStart(r)?[o,s.union(r)]:[o.concat([s]),r]:[o,r],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const o=[],s=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...s),a=r.sort((l,c)=>l.time-c.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?n=l.time:(n&&+n!=+l.time&&o.push(Tn.fromDateTimes(n,l.time)),n=null);return Tn.merge(o)}difference(...t){return Tn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:lc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Qf,n={}){return this.isValid?ui.create(this.s.loc.clone(n),t).formatInterval(this):lc}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:lc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:lc}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:lc}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:lc}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Wt.invalid(this.invalidReason)}mapEndpoints(t){return Tn.fromDateTimes(t(this.s),t(this.e))}}class cc{static hasDST(t=Fn.defaultZone){const n=tt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Xs.isValidZone(t)}static normalizeZone(t){return Lr(t,Fn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||en.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||en.create(n,i,s)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null,outputCalendar:s="gregory"}={}){return(o||en.create(n,i,s)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||en.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:o=null}={}){return(o||en.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return en.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return en.create(n,null,"gregory").eras(t)}static features(){return{relative:Bx(),localeWeek:Hx()}}}function dF(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Wt.fromMillis(i).as("days"))}function g6(e,t,n){const i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=dF(l,c);return(u-u%7)/7}],["days",dF]],o={},s=e;let r,a;for(const[l,c]of i)n.indexOf(l)>=0&&(r=l,o[l]=c(e,t),a=s.plus(o),a>t?(o[l]--,e=s.plus(o),e>t&&(a=e,o[l]--,e=s.plus(o))):e=a);return[e,o,a,r]}function m6(e,t,n,i){let[o,s,r,a]=g6(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(r<t&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const u=Wt.fromObject(s,i);return c.length>0?Wt.fromMillis(l,i).shiftTo(...c).plus(u):u}const v6="missing Intl.DateTimeFormat.formatToParts support";function Yt(e,t=n=>n){return{regex:e,deser:([n])=>t(a4(n))}}const hF="[ ]",fF=new RegExp(hF,"g");function y6(e){return e.replace(/\./g,"\\.?").replace(fF,hF)}function pF(e){return e.replace(/\./g,"").replace(fF," ").toLowerCase()}function zo(e,t){return e===null?null:{regex:RegExp(e.map(y6).join("|")),deser:([n])=>e.findIndex(i=>pF(n)===pF(i))+t}}function gF(e,t){return{regex:e,deser:([,n,i])=>rp(n,i),groups:t}}function cp(e){return{regex:e,deser:([t])=>t}}function C6(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function w6(e,t){const n=$o(t),i=$o(t,"{2}"),o=$o(t,"{3}"),s=$o(t,"{4}"),r=$o(t,"{6}"),a=$o(t,"{1,2}"),l=$o(t,"{1,3}"),c=$o(t,"{1,6}"),u=$o(t,"{1,9}"),d=$o(t,"{2,4}"),h=$o(t,"{4,6}"),f=y=>({regex:RegExp(C6(y.val)),deser:([b])=>b,literal:!0}),m=(y=>{if(e.literal)return f(y);switch(y.val){case"G":return zo(t.eras("short"),0);case"GG":return zo(t.eras("long"),0);case"y":return Yt(c);case"yy":return Yt(d,tC);case"yyyy":return Yt(s);case"yyyyy":return Yt(h);case"yyyyyy":return Yt(r);case"M":return Yt(a);case"MM":return Yt(i);case"MMM":return zo(t.months("short",!0),1);case"MMMM":return zo(t.months("long",!0),1);case"L":return Yt(a);case"LL":return Yt(i);case"LLL":return zo(t.months("short",!1),1);case"LLLL":return zo(t.months("long",!1),1);case"d":return Yt(a);case"dd":return Yt(i);case"o":return Yt(l);case"ooo":return Yt(o);case"HH":return Yt(i);case"H":return Yt(a);case"hh":return Yt(i);case"h":return Yt(a);case"mm":return Yt(i);case"m":return Yt(a);case"q":return Yt(a);case"qq":return Yt(i);case"s":return Yt(a);case"ss":return Yt(i);case"S":return Yt(l);case"SSS":return Yt(o);case"u":return cp(u);case"uu":return cp(a);case"uuu":return Yt(n);case"a":return zo(t.meridiems(),0);case"kkkk":return Yt(s);case"kk":return Yt(d,tC);case"W":return Yt(a);case"WW":return Yt(i);case"E":case"c":return Yt(n);case"EEE":return zo(t.weekdays("short",!1),1);case"EEEE":return zo(t.weekdays("long",!1),1);case"ccc":return zo(t.weekdays("short",!0),1);case"cccc":return zo(t.weekdays("long",!0),1);case"Z":case"ZZ":return gF(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return gF(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return cp(/[a-z_+-/]{1,256}?/i);case" ":return cp(/[^\S\n\r]/);default:return f(y)}})(e)||{invalidReason:v6};return m.token=e,m}const b6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function S6(e,t,n){const{type:i,value:o}=e;if(i==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const s=t[i];let r=i;i==="hour"&&(t.hour12!=null?r=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?r="hour12":r="hour24":r=n.hour12?"hour12":"hour24");let a=b6[r];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function E6(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function R6(e,t,n){const i=e.match(t);if(i){const o={};let s=1;for(const r in n)if(ec(n,r)){const a=n[r],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(o[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,o]}else return[i,{}]}function D6(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Dt(e.z)||(n=Xs.create(e.z)),Dt(e.Z)||(n||(n=new Ei(e.Z)),i=e.Z),Dt(e.q)||(e.M=(e.q-1)*3+1),Dt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Dt(e.u)||(e.S=Qy(e.u)),[Object.keys(e).reduce((s,r)=>{const a=t(r);return a&&(s[a]=e[r]),s},{}),n,i]}let sC=null;function _6(){return sC||(sC=tt.fromMillis(1555555555555)),sC}function x6(e,t){if(e.literal)return e;const n=ui.macroTokenToFormatOpts(e.val),i=CF(n,t);return i==null||i.includes(void 0)?e:i}function mF(e,t){return Array.prototype.concat(...e.map(n=>x6(n,t)))}class vF{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=mF(ui.parseFormat(n),t),this.units=this.tokens.map(i=>w6(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,o]=E6(this.units);this.regex=RegExp(i,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,i]=R6(t,this.regex,this.handlers),[o,s,r]=i?D6(i):[null,null,void 0];if(ec(i,"a")&&ec(i,"H"))throw new Ql("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:o,zone:s,specificOffset:r}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function yF(e,t,n){return new vF(e,n).explainFromTokens(t)}function F6(e,t,n){const{result:i,zone:o,specificOffset:s,invalidReason:r}=yF(e,t,n);return[i,o,s,r]}function CF(e,t){if(!e)return null;const i=ui.create(t,e).dtFormatter(_6()),o=i.formatToParts(),s=i.resolvedOptions();return o.map(r=>S6(r,e,s))}const rC="Invalid DateTime",wF=864e13;function ad(e){return new Wo("unsupported zone",`the zone "${e.name}" is not supported`)}function aC(e){return e.weekData===null&&(e.weekData=np(e.c)),e.weekData}function lC(e){return e.localWeekData===null&&(e.localWeekData=np(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Wa(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new tt({...n,...t,old:n})}function bF(e,t,n){let i=e-t*60*1e3;const o=n.offset(i);if(t===o)return[i,t];i-=(o-t)*60*1e3;const s=n.offset(i);return o===s?[i,o]:[e-Math.min(o,s)*60*1e3,Math.max(o,s)]}function up(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function dp(e,t,n){return bF(sp(e),t,n)}function SF(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:i,month:o,day:Math.min(e.c.day,op(i,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},r=Wt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=sp(s);let[l,c]=bF(a,n,e.zone);return r!==0&&(l+=r,c=e.zone.offset(l)),{ts:l,o:c}}function uc(e,t,n,i,o,s){const{setZone:r,zone:a}=n;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=tt.fromObject(e,{...n,zone:l,specificOffset:s});return r?c:c.setZone(a)}else return tt.invalid(new Wo("unparsable",`the input "${o}" can't be parsed as ${i}`))}function hp(e,t,n=!0){return e.isValid?ui.create(en.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function cC(e,t,n){const i=e.c.year>9999||e.c.year<0;let o="";if(i&&e.c.year>=0&&(o+="+"),o+=$n(e.c.year,i?6:4),n==="year")return o;if(t){if(o+="-",o+=$n(e.c.month),n==="month")return o;o+="-"}else if(o+=$n(e.c.month),n==="month")return o;return o+=$n(e.c.day),o}function EF(e,t,n,i,o,s,r){let a=!n||e.c.millisecond!==0||e.c.second!==0,l="";switch(r){case"day":case"month":case"year":break;default:if(l+=$n(e.c.hour),r==="hour")break;if(t){if(l+=":",l+=$n(e.c.minute),r==="minute")break;a&&(l+=":",l+=$n(e.c.second))}else{if(l+=$n(e.c.minute),r==="minute")break;a&&(l+=$n(e.c.second))}if(r==="second")break;a&&(!i||e.c.millisecond!==0)&&(l+=".",l+=$n(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&e.offset===0&&!s?l+="Z":e.o<0?(l+="-",l+=$n(Math.trunc(-e.o/60)),l+=":",l+=$n(Math.trunc(-e.o%60))):(l+="+",l+=$n(Math.trunc(e.o/60)),l+=":",l+=$n(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const RF={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},T6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},P6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fp=["year","month","day","hour","minute","second","millisecond"],I6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],A6=["year","ordinal","hour","minute","second","millisecond"];function pp(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new J_(e);return t}function DF(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return pp(e)}}function k6(e){if(ld===void 0&&(ld=Fn.now()),e.type!=="iana")return e.offset(ld);const t=e.name;let n=uC.get(t);return n===void 0&&(n=e.offset(ld),uC.set(t,n)),n}function _F(e,t){const n=Lr(t.zone,Fn.defaultZone);if(!n.isValid)return tt.invalid(ad(n));const i=en.fromObject(t);let o,s;if(Dt(e.year))o=Fn.now();else{for(const l of fp)Dt(e[l])&&(e[l]=RF[l]);const r=Nx(e)||Vx(e);if(r)return tt.invalid(r);const a=k6(n);[o,s]=dp(e,a,n)}return new tt({ts:o,zone:n,loc:i,o:s})}function xF(e,t,n){const i=Dt(n.round)?!0:n.round,o=Dt(n.rounding)?"trunc":n.rounding,s=(a,l)=>(a=eC(a,i||n.calendary?0:2,n.calendary?"round":o),t.loc.clone(n).relFormatter(n).format(a,l)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return s(r(n.unit),n.unit);for(const a of n.units){const l=r(a);if(Math.abs(l)>=1)return s(l,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function FF(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let ld;const uC=new Map;class tt{constructor(t){const n=t.zone||Fn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Wo("invalid input"):null)||(n.isValid?null:ad(n));this.ts=Dt(t.ts)?Fn.now():t.ts;let o=null,s=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,s]=[t.old.c,t.old.o];else{const a=Nr(t.o)&&!t.old?t.o:n.offset(this.ts);o=up(this.ts,a),i=Number.isNaN(o.year)?new Wo("invalid input"):null,o=i?null:o,s=i?null:a}this._zone=n,this.loc=t.loc||en.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=o,this.o=s,this.isLuxonDateTime=!0}static now(){return new tt({})}static local(){const[t,n]=FF(arguments),[i,o,s,r,a,l,c]=n;return _F({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static utc(){const[t,n]=FF(arguments),[i,o,s,r,a,l,c]=n;return t.zone=Ei.utcInstance,_F({year:i,month:o,day:s,hour:r,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const i=h4(t)?t.valueOf():NaN;if(Number.isNaN(i))return tt.invalid("invalid input");const o=Lr(n.zone,Fn.defaultZone);return o.isValid?new tt({ts:i,zone:o,loc:en.fromObject(n)}):tt.invalid(ad(o))}static fromMillis(t,n={}){if(Nr(t))return t<-wF||t>wF?tt.invalid("Timestamp out of range"):new tt({ts:t,zone:Lr(n.zone,Fn.defaultZone),loc:en.fromObject(n)});throw new ci(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Nr(t))return new tt({ts:t*1e3,zone:Lr(n.zone,Fn.defaultZone),loc:en.fromObject(n)});throw new ci("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=Lr(n.zone,Fn.defaultZone);if(!i.isValid)return tt.invalid(ad(i));const o=en.fromObject(n),s=ap(t,DF),{minDaysInFirstWeek:r,startOfWeek:a}=Lx(s,o),l=Fn.now(),c=Dt(n.specificOffset)?i.offset(l):n.specificOffset,u=!Dt(s.ordinal),d=!Dt(s.year),h=!Dt(s.month)||!Dt(s.day),f=d||h,g=s.weekYear||s.weekNumber;if((f||u)&&g)throw new Ql("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new Ql("Can't mix ordinal dates with month/day");const m=g||s.weekday&&!f;let y,b,S=up(l,c);m?(y=I6,b=T6,S=np(S,r,a)):u?(y=A6,b=P6,S=Xy(S)):(y=fp,b=RF);let F=!1;for(const k of y){const x=s[k];Dt(x)?F?s[k]=b[k]:s[k]=S[k]:F=!0}const C=m?c4(s,r,a):u?u4(s):Nx(s),R=C||Vx(s);if(R)return tt.invalid(R);const E=m?Ox(s,r,a):u?Mx(s):s,[_,I]=dp(E,c,i),O=new tt({ts:_,zone:i,o:I,loc:o});return s.weekday&&f&&t.weekday!==O.weekday?tt.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${O.toISO()}`):O.isValid?O:tt.invalid(O.invalid)}static fromISO(t,n={}){const[i,o]=t6(t);return uc(i,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,o]=n6(t);return uc(i,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,o]=i6(t);return uc(i,o,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0}),[a,l,c,u]=F6(r,t,n);return u?tt.invalid(u):uc(a,l,i,`format ${n}`,t,c)}static fromString(t,n,i={}){return tt.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,o]=u6(t);return uc(i,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ci("need to specify a reason the DateTime is invalid");const i=t instanceof Wo?t:new Wo(t,n);if(Fn.throwOnInvalid)throw new N3(i);return new tt({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=CF(t,en.fromObject(n));return i?i.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return mF(ui.parseFormat(t),en.fromObject(n)).map(o=>o.val).join("")}static resetCache(){ld=void 0,uC.clear()}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?aC(this).weekYear:NaN}get weekNumber(){return this.isValid?aC(this).weekNumber:NaN}get weekday(){return this.isValid?aC(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?lC(this).weekday:NaN}get localWeekNumber(){return this.isValid?lC(this).weekNumber:NaN}get localWeekYear(){return this.isValid?lC(this).weekYear:NaN}get ordinal(){return this.isValid?Xy(this.c).ordinal:NaN}get monthShort(){return this.isValid?cc.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?cc.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?cc.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?cc.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=sp(this.c),o=this.zone.offset(i-t),s=this.zone.offset(i+t),r=this.zone.offset(i-o*n),a=this.zone.offset(i-s*n);if(r===a)return[this];const l=i-r*n,c=i-a*n,u=up(l,r),d=up(c,a);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[Wa(this,{ts:l}),Wa(this,{ts:c})]:[this]}get isInLeapYear(){return nd(this.year)}get daysInMonth(){return op(this.year,this.month)}get daysInYear(){return this.isValid?tc(this.year):NaN}get weeksInWeekYear(){return this.isValid?id(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?id(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:o}=ui.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Ei.instance(t),n)}toLocal(){return this.setZone(Fn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=Lr(t,Fn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||i){const s=t.offset(this.ts),r=this.toObject();[o]=dp(r,s,t)}return Wa(this,{ts:o,zone:t})}else return tt.invalid(ad(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return Wa(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=ap(t,DF),{minDaysInFirstWeek:i,startOfWeek:o}=Lx(n,this.loc),s=!Dt(n.weekYear)||!Dt(n.weekNumber)||!Dt(n.weekday),r=!Dt(n.ordinal),a=!Dt(n.year),l=!Dt(n.month)||!Dt(n.day),c=a||l,u=n.weekYear||n.weekNumber;if((c||r)&&u)throw new Ql("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Ql("Can't mix ordinal dates with month/day");let d;s?d=Ox({...np(this.c,i,o),...n},i,o):Dt(n.ordinal)?(d={...this.toObject(),...n},Dt(n.day)&&(d.day=Math.min(op(d.year,d.month),d.day))):d=Mx({...Xy(this.c),...n});const[h,f]=dp(d,this.o,this.zone);return Wa(this,{ts:h,o:f})}plus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t);return Wa(this,SF(this,n))}minus(t){if(!this.isValid)return this;const n=Wt.fromDurationLike(t).negate();return Wa(this,SF(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},o=Wt.normalizeUnit(t);switch(o){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(o==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:r}=this;r<s&&(i.weekNumber=this.weekNumber-1),i.weekday=s}else i.weekday=1;if(o==="quarters"){const s=Math.ceil(this.month/3);i.month=(s-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?ui.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):rC}toLocaleString(t=Qf,n={}){return this.isValid?ui.create(this.loc.clone(n),t).formatDateTime(this):rC}toLocaleParts(t={}){return this.isValid?ui.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:o=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=pp(r);const a=t==="extended";let l=cC(this,a,r);return fp.indexOf(r)>=3&&(l+="T"),l+=EF(this,a,n,i,o,s,r),l}toISODate({format:t="extended",precision:n="day"}={}){return this.isValid?cC(this,t==="extended",pp(n)):null}toISOWeekDate(){return hp(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:o=!1,extendedZone:s=!1,format:r="extended",precision:a="milliseconds"}={}){return this.isValid?(a=pp(a),(o&&fp.indexOf(a)>=3?"T":"")+EF(this,r==="extended",n,t,i,s,a)):null}toRFC2822(){return hp(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return hp(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?cC(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(i&&(o+=" "),n?o+="z":t&&(o+="ZZ")),hp(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():rC}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return Wt.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=f4(n).map(Wt.normalizeUnit),r=t.valueOf()>this.valueOf(),a=r?this:t,l=r?t:this,c=m6(a,l,s,o);return r?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(tt.now(),t,n)}until(t){return this.isValid?Tn.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const o=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(n,i)<=o&&o<=s.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||tt.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(o=t.unit,s=void 0),xF(n,this.plus(i),{...t,numeric:"always",units:o,unit:s})}toRelativeCalendar(t={}){return this.isValid?xF(t.base||tt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(tt.isDateTime))throw new ci("min requires all arguments be DateTimes");return Gx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(tt.isDateTime))throw new ci("max requires all arguments be DateTimes");return Gx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});return yF(r,t,n)}static fromStringExplain(t,n,i={}){return tt.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:o=null}=n,s=en.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return new vF(s,t)}static fromFormatParser(t,n,i={}){if(Dt(t)||Dt(n))throw new ci("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:s=null}=i,r=en.fromOpts({locale:o,numberingSystem:s,defaultToEN:!0});if(!r.equals(n.locale))throw new ci(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?tt.invalid(u):uc(a,l,i,`format ${n.format}`,t,c)}static get DATE_SHORT(){return Qf}static get DATE_MED(){return Q_}static get DATE_MED_WITH_WEEKDAY(){return H3}static get DATE_FULL(){return ex}static get DATE_HUGE(){return tx}static get TIME_SIMPLE(){return nx}static get TIME_WITH_SECONDS(){return ix}static get TIME_WITH_SHORT_OFFSET(){return ox}static get TIME_WITH_LONG_OFFSET(){return sx}static get TIME_24_SIMPLE(){return rx}static get TIME_24_WITH_SECONDS(){return ax}static get TIME_24_WITH_SHORT_OFFSET(){return lx}static get TIME_24_WITH_LONG_OFFSET(){return cx}static get DATETIME_SHORT(){return ux}static get DATETIME_SHORT_WITH_SECONDS(){return dx}static get DATETIME_MED(){return hx}static get DATETIME_MED_WITH_SECONDS(){return fx}static get DATETIME_MED_WITH_WEEKDAY(){return G3}static get DATETIME_FULL(){return px}static get DATETIME_FULL_WITH_SECONDS(){return gx}static get DATETIME_HUGE(){return mx}static get DATETIME_HUGE_WITH_SECONDS(){return vx}}function cd(e){if(tt.isDateTime(e))return e;if(e&&e.valueOf&&Nr(e.valueOf()))return tt.fromJSDate(e);if(e&&typeof e=="object")return tt.fromObject(e);throw new ci(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const TF="account.last_prefered_timezone",gp=300;function ud(e){if(!e)return null;if(tt.isDateTime(e))return e;if(e instanceof Date){const t=tt.fromJSDate(e);return t.isValid?t:null}if(typeof e=="number"){const t=tt.fromMillis(e);return t.isValid?t:null}if(typeof e=="string"){let t=tt.fromISO(e);return t.isValid||(t=tt.fromRFC2822(e)),t.isValid?t:null}return null}function PF(e,t,n){const i=ud(e);if(!i)return"";const o=n?i.setZone(n):i;return o.isValid?o.toFormat(t):""}function O6(e,t){if(!e)return"";const n=tt.now().setZone(e);return n.isValid?n.toFormat(t):""}function M6(e,t){return O6(e,t)}const L6=e=>{const t=tt.now().setZone(e);if(!t.isValid)return"GMT+0";const n=t.offset,i=n>=0?"+":"-",o=Math.floor(Math.abs(n)/60),s=Math.abs(n)%60;return`GMT${i}${o}:${s.toString().padStart(2,"0")}`},dC=()=>L3(TF)||"UTC",IF=e=>({id:e.id,name:(e==null?void 0:e.name)??e.display_name,initial:e.initial,profile_image:e.profile_image,color:{bgColor:e.color.bgColor,textColor:e.color.textColor}}),mp=e=>e!=null&&e.length?e.map(IF):[],N6=e=>{if(!(e!=null&&e.length))return[];const t=new Set;return e.filter(n=>t.has(n.id)?!1:(t.add(n.id),!0))},AF=e=>{if(!e)return null;const t=new Date(e);return Number.isNaN(t.getTime())?null:t},V6=e=>Object.fromEntries(Object.entries(e).filter(([t,n])=>n!==void 0)),kF=(e,t)=>{var i,o,s,r;const n={id:e.id,name:e.name,assignees:void 0,status:e.template_flow_status,dateRange:[AF(e.start_date),AF(e.due_date)],isStarted:!!Number(e.is_started),isCompleted:!!Number(e.is_completed),lastUpdated:{tooltip:((i=e==null?void 0:e.last_updated_by)==null?void 0:i.length)>0?"by "+((o=e.last_updated_by)==null?void 0:o.map(a=>a.display_name).join(", ")):"",value:PF(e.updated_at,"MMM dd, yyyy | HH:mm",t)||""},completedOn:{tooltip:e.actual_due_date?void 0:"Pending completion",value:PF(e.actual_due_date,"MMM dd, yyyy | HH:mm",t)},isDeleted:!1,isProcessing:(s=e.bulk_process)==null?void 0:s.message,isArchived:((r=e.property)==null?void 0:r.is_archived)===1||e.status==0};return V6(n)},OF={headphone:["headphones","headset"],sofa:["couch"],couch:["sofa"],run:["running","runner"]},hC=e=>e.toLowerCase().trim(),B6=e=>hC(e).split(/\s+/).filter(Boolean),MF=e=>e.replace(/(ing|ed|s)$/i,"");function H6(e){const t=new Set;for(const n of e){const i=MF(n);if(t.add(i),t.add(n),OF[i])for(const o of OF[i])t.add(MF(o))}return Array.from(t)}function G6(e,t){const n=hC(e),i=H6(B6(t));let o=0;for(const s of i)s&&(n.includes(s)&&(o+=s.length*2),n.startsWith(s)&&(o+=3));return o}function $6(e,t){const n=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=t.split(/\s+/).filter(Boolean).map(n);if(!i.length)return e;const o=new RegExp(`(${i.join("|")})`,"ig");return e.replace(o,"<mark>$1</mark>")}const vp=({date:e,timezone:t,format:n})=>{if(!e)return"";const i=typeof e=="string"?tt.fromISO(e,{zone:t}):e,o=tt.now().setZone(t||"local"),s=i.setZone(t||"local"),r=o.startOf("day"),l=s.startOf("day").diff(r,"days").days;let c="";if(l===0?c="Today":l===-1?c="Yesterday":l===1&&(c="Tomorrow"),c&&(n!=null&&n.includes("HH:mm"))){const u=s.toFormat("HH:mm");return`${c} at ${u}`}else if(c)return c;return s.toFormat(n)},fC=()=>"Asia/Saigon",LF=e=>`${tt.fromJSDate(e,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,NF=e=>({id:e.id,label:e.name,value:e.id,data:e,color:e.color||{bgColor:"#CCCCCC",textColor:"#FFFFFF"},selected:!1,hover:!1,type:"text",disabled:!1,clickable:!0,danger:!1}),W6=e=>{var R;const t=Z(((R=e.value)==null?void 0:R.map(E=>E.id))??[]),n=Z([]),i=Z(!1),o=_r(e,"workspaceId"),s=_r(e,"entityId"),r=_r(e,"id"),a=_r(e,"ids"),l=e.updateRowData,c=Z([]),{apiServices:u}=po(!!e.params,e),d=j(()=>{var O,k;const E=new Set(((O=e.value)==null?void 0:O.map(x=>x.id))??[]),_=((k=e.value)==null?void 0:k.map(x=>({...NF(x),selected:!0})))??[],I=n.value.filter(x=>!E.has(x.id));return Jf(_,I,"id")}),h=E=>{const _=d.value.find(I=>I.id===E);return _==null?void 0:_.data},f=()=>{var E;return(E=a.value)!=null&&E.length?a.value:[String(r.value)]},g=async(E,_,I)=>{if(i.value||!u.value)return!1;i.value=!0;try{const O=await E();if((O==null?void 0:O.message)!=="Done")throw new Error("API call failed");return _(),!0}catch(O){return console.error("API call error:",O),!1}finally{i.value=!1}},m=async()=>await g(()=>u.value.unAssignAll(String(o.value),String(s.value),f()),()=>{l({assignees:[],type:"removeAll"}),t.value=[]}),y=async E=>await g(()=>u.value.replaceAssignee(String(o.value),f(),[E]),()=>{t.value=[E];const I=h(E);I&&l({assignees:mp([I]),type:"overwrite"})}),b=async E=>await g(()=>u.value.addAssignee(String(o.value),f(),[E]),()=>{var O,k,x;t.value.push(E);const I=h(E);if(I){const P=(x=(k=(O=e.params)==null?void 0:O.api)==null?void 0:k.getRowNode(String(e.id)))==null?void 0:x.data,N=(P==null?void 0:P.assignees)||[],G=Jf([...N,...mp([I])],"id");l({assignees:G,type:"add"})}}),S=async E=>await g(()=>u.value.removeAssignee(String(o.value),f(),[E]),()=>{var k,x,P;const I=(P=(x=(k=e.params)==null?void 0:k.api)==null?void 0:x.getRowNode(String(e.id)))==null?void 0:P.data;t.value=t.value.filter(N=>N!==E);const O=mp(((I==null?void 0:I.assignees)||[]).filter(N=>N.id!==E));l({assignees:O,type:"remove"})});return{isSubmitting:i,options:c,unAssignAll:m,replaceAssignees:y,addAssignee:b,removeAssignee:S,handleSelect:E=>{const _=String(E.id);t.value.includes(_)?S(_):b(_)},openPeopleInsight:E=>{if(!E||!o.value)return;const _=Vo({type:"people_insight",config:{user_id:E,ws_code:o.value,baseDomain:sessionStorage.getItem("BASE_URL")||""}}).url;window.open(_,"_blank")},assigneeList:n,mergedOptions:d,selectedUserIds:t}},z6={placement:"bottom-start",theme:"light",trigger:"click",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0};function U6(e){return e.value?"$el"in e.value?e.value.$el:e.value:null}function Qs(e={}){const t={...z6,...e},n=Z(null),i=Z(null),o=Z(null),s=Z(!1),r=m=>{(m.key==="Escape"||m.key==="Esc")&&d()},a=()=>{o.value&&(o.value.destroy(),o.value=null,s.value=!1),document.removeEventListener("keydown",r)},l=m=>{const{showOnInit:y,alwaysShow:b,showArrow:S,debug:F,...C}=t;return{...C,content:m,theme:t.theme,trigger:b?"manual":t.trigger,placement:t.placement||"bottom-start",arrow:!1,offset:t.offset,interactive:t.interactive,appendTo:t.appendTo,animation:"fade",maxWidth:t.maxWidth||350,onShow:R=>{if(s.value=!0,document.addEventListener("keydown",r),e.onShow)return e.onShow(R)},onHide:R=>{if(b)return!1;if(s.value=!1,document.removeEventListener("keydown",r),e.onHide)return e.onHide(R)},onClickOutside:(R,E)=>{if(e.onClickOutside)return e.onClickOutside(R,E);b||R.hide()},popperOptions:t.popperOptions||{modifiers:[{name:"computeStyles",options:{gpuAcceleration:!1}},{name:"preventOverflow",options:{padding:8}},{name:"flip",options:{fallbackPlacements:["top","bottom","left","right"]}}]}}},c=()=>{var b;a();const m=U6(n),y=i.value;if(!(!m||!y)){y.style.display==="none"&&(y.style.display="");try{const S=l(y),F=Ar(m,S);o.value=Array.isArray(F)?F[0]:F,(t.showOnInit||t.alwaysShow)&&((b=o.value)==null||b.show())}catch(S){console.error("[useTippyComposable] Failed to create Tippy instance:",S)}}},u=()=>{o.value&&o.value.show()},d=()=>{t.alwaysShow||o.value&&o.value.hide()},h=()=>{s.value?d():u()},f=m=>{o.value&&o.value.setContent(m)},g=m=>{o.value&&o.value.setProps(m)};return ct([n,i],c,{flush:"post"}),Yn(()=>{a()}),{instance:o,isVisible:s,show:u,hide:d,toggle:h,triggerRef:n,popupRef:i,destroyTippy:a,setContent:f,setProps:g}}const pC=(e,t,n)=>{const i=Z(n?"Copy link":"Copy"),o=()=>{setTimeout(()=>{i.value=n?"Copy link":"Copy"},3e3)};return{copyToClipboard:async()=>{try{return await navigator.clipboard.writeText(e),i.value="Copied",t&&t(),o(),!0}catch(r){return console.error("Failed to copy text to clipboard:",r),i.value="Copy failed",o(),!1}},tooltip:i}},j6=(e,t,n)=>{const i={truncate:"End date cleared because it was before start. Please pick an end date.",swap:"Dates auto-swapped because start was after end.",...e.messages},o=Ao({startDate:null,endDate:null,timezone:e.timezone||"UTC",format:e.format||"",isSelectingStart:!1,isSelectingEnd:!1,rangeFeedback:{status:"idle",action:null,message:""},cacheStartDate:null,cacheEndDate:null,isDirty:!1});hv(()=>{var E;((E=e.value)==null?void 0:E.length)===2&&(o.startDate=e.value[0],o.endDate=e.value[1]),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isSelectingStart=!1,o.isSelectingEnd=!1,e.timezone&&(o.timezone=e.timezone)});const s=()=>{var k,x,P,N,G,ie,B,H;t("tracing",JSON.parse(JSON.stringify(n.value)));const E=((x=(k=o.startDate)==null?void 0:k.getTime)==null?void 0:x.call(k))!==((N=(P=o.cacheStartDate)==null?void 0:P.getTime)==null?void 0:N.call(P)),_=((ie=(G=o.endDate)==null?void 0:G.getTime)==null?void 0:ie.call(G))!==((H=(B=o.cacheEndDate)==null?void 0:B.getTime)==null?void 0:H.call(B)),I=o.startDate===null,O=o.endDate===null;E&&_&&I&&O?t("clearAll"):E&&!_?I?t("clearStart"):t("update:start",o.startDate):_&&!E?O?t("clearDue"):t("update:end",o.endDate):E&&_&&t("update",[o.startDate,o.endDate]),t("confirmed",{start:o.startDate,end:o.endDate}),o.isDirty=E||_},r=(E,_)=>{const I=tt.fromObject({year:E.year,month:E.month,day:E.day},{zone:o.timezone});return(_==="start"?I.startOf("day"):I.endOf("day")).toJSDate()},a=()=>{o.rangeFeedback.status="idle",o.rangeFeedback.action=null,o.rangeFeedback.message=""},l=E=>{e.enableRangeFeedback&&(o.rangeFeedback.status="corrected",o.rangeFeedback.action=E,o.rangeFeedback.message=E==="swap"?i.swap:i.truncate)},c=E=>{if(!(!o.startDate||!o.endDate)){if(o.startDate.getTime()<=o.endDate.getTime()){e.enableRangeFeedback&&a();return}if(E==="select-start"){const _={start:o.startDate,end:o.endDate};o.endDate=null,t("range:invalid",_),t("range:corrected",{start:o.startDate,end:o.endDate,action:"truncate"}),o.isSelectingEnd=!0,l("truncate")}else{const _={start:o.startDate,end:o.endDate},I=o.startDate;o.startDate=o.endDate,o.endDate=I,t("range:invalid",_),t("range:corrected",{start:o.startDate,end:o.endDate,action:"swap"}),l("swap")}}},u=(E,_=!0)=>{e.disabled||e.readOnly||(o.startDate=r(E,"start"),_?(o.isSelectingStart=!1,o.isSelectingEnd=!0):(o.isSelectingStart=!0,o.isSelectingEnd=!1),c("select-start"))},d=E=>{e.disabled||e.readOnly||(o.endDate=r(E,"end"),c("select-end"))},h=()=>{e.disabled||e.readOnly||(o.startDate=null,a())},f=()=>{e.disabled||e.readOnly||(o.endDate=null,a())},g=()=>{e.disabled||e.readOnly||(o.startDate=null,o.endDate=null,a(),y())},m=()=>{e.disabled||e.readOnly||o.isDirty||(o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate)},y=()=>{e.disabled||e.readOnly||(s(),o.cacheStartDate=o.startDate,o.cacheEndDate=o.endDate,o.isDirty=!1)},b=()=>{e.disabled||e.readOnly||(o.startDate=o.cacheStartDate,o.endDate=o.cacheEndDate,a(),o.isDirty=!1)},S=j(()=>o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat(o.format):e.startPlaceholder),F=j(()=>o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat(o.format):e.duePlaceholder),C=j(()=>!o.startDate&&!e.disabled?e.startTooltip:!o.startDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.startDate?tt.fromJSDate(o.startDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.startTooltip),R=j(()=>!o.endDate&&!e.disabled?e.dueTooltip:!o.endDate&&(e.disabled||e.readOnly)?e.startPlaceholder:o.endDate?tt.fromJSDate(o.endDate,{zone:o.timezone}).toFormat("LLL dd, yyyy | HH:mm:ss"):e.dueTooltip);return{states:o,displayStartDate:S,displayEndDate:F,tooltipStartDate:C,tooltipEndDate:R,selectEndDate:d,selectStartDate:u,clearDue:f,clearStart:h,clearAll:g,beginInteraction:m,confirmSelection:y,cancelSelection:b}},VF="MMM dd",K6=e=>{const t=e.timezone,n=j(()=>e.start?vp({date:ud(e.start),timezone:t,format:VF}):"No start"),i=j(()=>e.end?vp({date:ud(e.end),timezone:t,format:VF}):"No due"),o=d=>{if(!d)return null;const h=tt.now().setZone(t).startOf("day"),f=tt.fromISO(d).setZone(t).startOf("day");if(!f.isValid)return console.warn("Invalid date:",d,f.invalidReason),null;const g=f.diff(h,"days").days;return g===0?"today":g===1?"tomorrow":g===-1?"yesterday":g<-1?"past":"future"},s=j(()=>o(e.start)),r=j(()=>o(e.end)),a=j(()=>{if(n.value==="No start")return["empty"];const d=[];return s.value&&d.push(`start-${s.value}`),e.isStarted&&d.push("actual"),d}),l=j(()=>{if(i.value==="No due")return["empty"];const d=[];return r.value&&d.push(`end-${r.value}`),e.isEnded&&d.push("actual"),d}),c=j(()=>e.start?vp({date:ud(e.start),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No start"),u=j(()=>e.end?vp({date:ud(e.end),timezone:t,format:"MMM dd, yyyy | HH:mm"}):"No due");return{startDate:n,endDate:i,startClasses:a,endClasses:l,fullStartDate:c,fullEndDate:u}},q6="UserCache",Y6="user",Z6=()=>{const e=Z({}),{getCachedValue:t,setCachedValue:n}=Uu({dbName:q6,storeName:Y6}),i=async c=>c?await t(c):null;return{getCachedUser:i,setCachedUser:async c=>{if(!(c!=null&&c.id)){console.warn("Cannot cache user without id:",c);return}await n(c.id,c),e.value[c.id]=!0},getCachedUsers:async c=>{if(!c||c.length===0)return[];const u=c.map(h=>i(h));return(await Promise.all(u)).filter(h=>h!==null)},setCachedUsers:async c=>{if(!c||c.length===0)return;const d=Jf(c,"id").filter(h=>h.id&&!e.value[h.id]).map(async h=>{await n(h.id,h),e.value[h.id]=!0});await Promise.all(d)},isUserCached:c=>!!e.value[c],clearCacheTracking:()=>{e.value={}}}},X6={placement:"bottom-start",theme:"light",trigger:"manual",interactive:!0,appendTo:()=>document.getElementById("item-table-layout-id")||document.body,showArrow:!0,showOnInit:!1,alwaysShow:!1,debug:!1,content:void 0,useTrigger:!0,showOverlay:!1,overlayOpacity:.5,closeOnOverlayClick:!0,centered:!1};let dd=0,qi=null;function J6(e){return qi||(qi=document.createElement("div"),qi.className="popup-overlay",qi.style.cssText=`
|
|
60
60
|
position: fixed;
|
|
61
61
|
top: 0;
|
|
62
62
|
left: 0;
|
|
@@ -84,7 +84,7 @@ Only state can be modified.`);r[0]="$state",vc=!1,i.set(s,r,i.state.value),vc=!0
|
|
|
84
84
|
state: () => new MyClass()
|
|
85
85
|
Found in store "${_.$id}".`),g&&s&&n.hydrate&&n.hydrate(_.$state,g),c=!0,u=!0,_}/*! #__NO_SIDE_EFFECTS__ */function Ap(e,t,n){let i;const o=typeof t=="function";i=o?n:t;function s(r,a){const l=wv();if(r=(M.env.NODE_ENV==="test"&&ja&&ja._testing?null:r)||(l?Hi(_p,null):null),r&&Cd(r),M.env.NODE_ENV!=="production"&&!ja)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
86
86
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
87
|
-
This will fail in production.`);r=ja,r._s.has(e)||(o?WC(e,t,i,r):BP(e,i,r),M.env.NODE_ENV!=="production"&&(s._pinia=r));const c=r._s.get(e);if(M.env.NODE_ENV!=="production"&&a){const u="__hot:"+e,d=o?WC(u,t,i,r,!0):BP(u,yo({},i),r,!0);a._hotUpdate(d),delete r.state.value[u],r._s.delete(u)}if(M.env.NODE_ENV!=="production"&&er){const u=Si();if(u&&u.proxy&&!a){const d=u.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=c}}return c}return s.$id=e,s}function nr(e){const t=St(e),n={};for(const i in t){const o=t[i];o.effect?n[i]=j({get:()=>e[i],set(s){e[i]=s}}):(Qt(o)||oo(o))&&(n[i]=_r(e,i))}return n}const zC=Ap("permissionStore",()=>{const e=Z([]),t=Z(),n=Z({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),D8="woohoo_getWoohooUserInterface_read",UC="media_getReviewUserInterface_read",_8="update_getUpdateUserInterface_read",x8=sessionStorage.getItem("BASE_URL"),F8=sessionStorage.getItem("BASE_REVIEW_URL"),T8=(e,t,n)=>{const i=zC(),{userPermissions:o}=nr(i),s=j(()=>{const{ws_code:G,entity_id:ie,scene_id:B}=e.value;return{baseDomain:x8||"",ws_code:G||"",entity_id:ie||"",scene_id:B||"",reviewDomain:F8||"",take_id:ie||"",woohoo_id:ie||"",parent_id:ie||""}}),r=j(()=>{var ie;const G=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:o.value.includes(UC),canCopyLink:!0,canRename:(G==null?void 0:G.has_edit_permission)??!1,canOpenTakeInReview:o.value.includes(UC),canOpenTakeInUpdate:o.value.includes(_8),canOpenTakeInWoohoo:o.value.includes(D8),canDeleteRendition:((ie=G==null?void 0:G.media)==null?void 0:ie.has_delete_rendition_permission)??!1,canDeleteThumbnail:(G==null?void 0:G.has_edit_thumbnail_permission)??!1,canArchiveScene:(G==null?void 0:G.has_edit_permission)??!1,canUnarchiveScene:(G==null?void 0:G.has_edit_permission)??!1,canDeleteScene:(G==null?void 0:G.has_delete_permission)??!1}}),a=j(()=>({project:Vo({type:"project",config:s.value}).url,take_review:Vo({type:"review_take",config:s.value}).url,review:Vo({type:"review_scene",config:s.value}).url,review_scene:Vo({type:"review_scene",config:s.value}).url,woohoo:Vo({type:"woohoo",config:s.value}).url,update:Vo({type:"update",config:s.value}).url,scene_hub:Vo({type:"scene_hub",config:s.value}).url})),l=(G,ie)=>{const B=G instanceof MouseEvent&&(G.metaKey||G.ctrlKey),H=a.value[ie]||"";H&&(B?window.open(H,"_blank"):window.location.href=H)},c=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.deleteRendition(s.value.ws_code,[s.value.scene_id],!0));if((H==null?void 0:H.message)!="Done"){console.error("Failed to delete rendition.");return}}catch(H){console.error("Error deleting rendition",H)}},u=async(G,ie)=>{var B;try{await((B=e.value.axiosService.value)==null?void 0:B.deleteThumbnail(s.value.ws_code,[s.value.scene_id]))}catch(H){console.error("Error deleting thumbnail",H)}},d=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.archiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((H==null?void 0:H.message)!="Done"){console.error("Failed to archive scene.");return}ie&&ie("archived")}catch(H){console.error("Error archiving item",H)}},h=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.deleteScene(s.value.ws_code,s.value.entity_id,s.value.scene_id));if((H==null?void 0:H.message)!="Done"){console.error("Failed to delete scene.");return}ie&&ie("deleted")}catch(H){console.error("Error deleting item",H)}},f=G=>{const ie=a.value.scene_hub||"";ie&&navigator.clipboard.writeText(ie)},g=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.unarchiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((H==null?void 0:H.message)!="Done"){console.error("Failed to unarchive scene.");return}ie&&ie("unarchived")}catch(H){console.error("Error unarchiving item",H)}},m=G=>l(G,"scene_hub"),y=G=>l(G,"review_scene"),{tooltip:b,copyToClipboard:S}=pC(a.value.scene_hub||"",void 0,!0),F=G=>{S()},C=G=>n(G),R=G=>l(G,"review"),E=G=>l(G,"update"),_=G=>l(G,"woohoo"),I=G=>c(),O=G=>u(),k=G=>d(G,t),x=G=>g(G,t),P=G=>h(G,t),N=j(()=>{let G=[];return!s.value.scene_id&&e.value.optionBlock&&G.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length?e.value.optionBlock:[{id:"quick-actions",groupLabel:"Quick actions",type:"row",options:[{id:"scene-tile",label:"",icon:"CustomSceneHub",description:"Scene tile",action:m,hide:!r.value.canOpenSceneHub,type:"icon"},{id:"open-in-arbo-review",label:"",icon:"PenRuler",description:"Open in arbo Review",action:y,hide:!r.value.canOpenReview,type:"icon"},{id:"copy-link",label:"",icon:"Link",description:b.value,action:F,hide:!r.value.canCopyLink,type:"icon"}]},{id:"action",groupLabel:"Action",type:"column",options:[{id:"rename",label:"Rename",icon:"Pen",action:C,hide:!r.value.canRename,type:"icon"}]},{id:"download-options-take",type:"column",groupLabel:"Download Options",options:[{id:"open-take-in",label:"Open Take in",icon:"ArrowUpRightFromSquare",subMenu:{id:"sub-menu",type:"column",groupLabel:"Sub Menu",options:[{id:"review",label:"Review",icon:"PenRuler",action:R,hide:!r.value.canOpenTakeInReview,type:"icon"},{id:"update",label:"Update",icon:"UserCheck",action:E,hide:!r.value.canOpenTakeInUpdate,type:"icon"},{id:"woohoo-details",label:"Woohoo Details",icon:"ChartPie",action:_,hide:!r.value.canOpenTakeInWoohoo,type:"icon"}]}}]},{id:"download-options-delete",type:"column",groupLabel:"Download Options",options:[{id:"delete-rendition",label:"Delete rendition",icon:"Clapperboard",action:I,hide:!r.value.canDeleteRendition,type:"icon"},{id:"delete-thumbnail",label:"Delete thumbnail",icon:"Image",action:O,hide:!r.value.canDeleteThumbnail,type:"icon"}]},{id:"download-options-archive",type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:k,hide:!r.value.canArchiveScene,type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:x,hide:!r.value.canUnarchiveScene,type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:P,hide:!r.value.canDeleteScene,type:"icon"}]}]});return{linkMap:a,handleOpen:l,copyLink:f,deleteRendition:c,deleteThumbnail:u,archiveItem:d,deleteItem:h,unArchiveItem:g,options:N}};function ir(e){const t=Z(!1),n=Z(!1),i=j(()=>{var d;const c=e.value,u=!!c.readOnly;return{readOnly:u,disabled:!!c.disabled,hovered:n.value,focused:t.value,isEmpty:c.empty??!1,error:!!c.error,actived:!!((d=c.active)!=null&&d.value),clickable:u?!1:c.clickable??!1}}),o=()=>{t.value=!0,qt(()=>{const c=l(e.value.inputRef);c==null||c.focus()})},s=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=c=>{if(!c)return null;const u=c.value||c;return(u instanceof HTMLElement?u:u==null?void 0:u.$el)||null};return vn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.addEventListener("focus",o),c.addEventListener("blur",s)),u&&(u.addEventListener("mouseenter",r),u.addEventListener("mouseleave",a))}),Yn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.removeEventListener("focus",o),c.removeEventListener("blur",s)),u&&(u.removeEventListener("mouseenter",r),u.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:i,handleFocus:o}}const jC=e=>{const t=Z(!1),n=j(()=>t.value);return vn(()=>{var a,l,c,u;const i=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,s=o==null?void 0:o.rowIndex,r=(u=(c=e.params)==null?void 0:c.colDef)==null?void 0:u.field;return i==null||i.addEventListener("cellEditingStarted",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!0)}),i==null||i.addEventListener("cellEditingStopped",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},HP=Ct(lt({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:"active"},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=ls,{triggerRef:n,popupRef:i}=Qs({trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=j(()=>{switch(s.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"#02C39A"}}),s=e;return(r,a)=>(K(),Ce("div",{class:z(r.$style["status-badge-wrapper"]),style:mn({"--badge-size":`${s.size}px`,"--badge-color":o.value})},[_t(r.$slots,"default"),nt(we("div",{class:z(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[as,s.showBadge],[J(t),{isLoading:s.loading,fullwidth:!0}]]),we("div",{ref_key:"popupRef",ref:i,class:z(r.$style["badge-tooltip"])},bt(s.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_13xqg_1","badge-indicator":"_badge-indicator_13xqg_6",active:"_active_13xqg_19",offline:"_offline_13xqg_22",busy:"_busy_13xqg_25",away:"_away_13xqg_28","badge-tooltip":"_badge-tooltip_13xqg_32"}}]]),P8=lt({__name:"MiniPeopleCard",props:{user:{},status:{default:"active"},timezone:{default:dC()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=yn,i=ls,o=e,s=t,r={active:"Active in the last 10 minutes",offline:"Logged out of TESSR",busy:"User is busy",away:"No activity in the last 10 minutes"},a={active:"#02C39A",offline:"#808080",busy:"#FF0000",away:"#F7941D"},l=Z(o.status),c=Z(o.timezone),u=Z(!0),d=Z(null),h=j(()=>r[l.value]),f=j(()=>a[l.value]),g=j(()=>{var O;return(O=o.user)==null?void 0:O.name}),m=j(()=>c.value?M6(c.value,"HH:mm"):""),y=j(()=>c.value?`(${L6(c.value)})`:""),b=async()=>{var O,k,x;if(o.apiUpdateFunction)try{const P=await o.apiUpdateFunction(o.user.id);if(!P)throw new Error("No data returned from API");(O=P.private_info)!=null&&O.is_offline?l.value="offline":(k=P.private_info)!=null&&k.last_active?l.value="active":l.value="away",(x=P.private_info)!=null&&x.timezone&&(c.value=P.private_info.timezone),s("dataUpdated",P)}catch(P){console.error("Failed to fetch user data:",P)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(b,o.refreshInterval))},F=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},C=`https://peopleinsight.arbo.com/user/${o.user.id}`,{copyToClipboard:R,tooltip:E}=pC(C,()=>s("copyLink",o.user.id)),_=()=>s("insightClick",o.user.id);ct([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{F(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),vn(async()=>{o.apiUpdateFunction&&(await b(),S())}),Yn(F);const I=j(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:98}));return(O,k)=>(K(),Ce("div",{class:z([O.$style["mini-people-card"],{[O.$style.loading]:u.value},"bg-skeleton"])},[we("div",{class:z(O.$style["avatar-section"])},[o.private?(K(),Xe(Ku,xn({key:1,readOnly:!0},I.value),null,16)):(K(),Xe(HP,{key:0,size:16,status:l.value,loading:u.value,"status-tooltip":h.value},{default:Se(()=>[ye(Ku,xn({readOnly:!0},I.value),null,16)]),_:1},8,["status","loading","status-tooltip"]))],2),we("div",{class:z(O.$style["user-info"])},[we("div",{class:z(O.$style["info-row"])},[we("h3",{class:z(O.$style["user-name"])},bt(g.value),3),o.private?ot("",!0):nt((K(),Ce("span",{key:0,class:z(O.$style["status-badge"]),style:mn({color:f.value})},[ut(bt(l.value),1)],6)),[[J(i),{isLoading:u.value,fullwidth:!0}]])],2),c.value?(K(),Ce("div",{key:0,class:z([O.$style["info-row"],O.$style["time-row"]])},[nt((K(),Ce("div",{class:z(O.$style["time-display"])},[ye(gt,{source:"remote",src:"Clock",class:z(O.$style["clock-icon"])},null,8,["class"]),we("span",{class:z(O.$style["time-text"])},[we("strong",null,bt(m.value),1),we("span",{class:z(O.$style.separator)},"|",2),we("span",null,bt(y.value),1)],2)],2)),[[J(i),{isLoading:u.value,fullwidth:!0}]])],2)):ot("",!0),!e.readOnly&&!o.private?(K(),Ce("div",{key:1,class:z([O.$style["info-row"],O.$style.actions])},[e.showInsightButton?(K(),Xe(pt,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:rn(_,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):ot("",!0),e.showCopyLinkButton?nt((K(),Xe(pt,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:rn(J(R),["prevent","stop"]),disabled:o.disabled},{default:Se(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[J(n),{content:J(E),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):ot("",!0)],2)):ot("",!0)],2)],2))}}),I8=Ct(P8,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_xknlb_1",loading:"_loading_xknlb_22","avatar-section":"_avatar-section_xknlb_25","user-info":"_user-info_xknlb_30","info-row":"_info-row_xknlb_36","time-row":"_time-row_xknlb_43","time-display":"_time-display_xknlb_49","time-text":"_time-text_xknlb_54","actions-row":"_actions-row_xknlb_61","user-name":"_user-name_xknlb_65","status-badge":"_status-badge_xknlb_76",active:"_active_xknlb_90",offline:"_offline_xknlb_93",busy:"_busy_xknlb_96",away:"_away_xknlb_99","user-local-time":"_user-local-time_xknlb_102","clock-icon":"_clock-icon_xknlb_110",separator:"_separator_xknlb_122",timezone:"_timezone_xknlb_125","refresh-btn":"_refresh-btn_xknlb_128",spinning:"_spinning_xknlb_131",spin:"_spin_xknlb_131","insight-btn":"_insight-btn_xknlb_134","copy-link-btn":"_copy-link-btn_xknlb_138","last-update":"_last-update_xknlb_141","loading-overlay":"_loading-overlay_xknlb_147","loading-spinner":"_loading-spinner_xknlb_159"}}]]),A8=Ct(lt({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=yn,n=e,{isEditing:i}=jC(n);return(o,s)=>nt((K(),Xe(pt,{class:z(o.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:J(i)},{default:Se(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[J(t),"More actions"]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_r5y5p_1"}}]]),k8=["src","width","height","alt"],kp=Ct(lt({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=ls,{getCachedValue:n,setCachedValue:i}=Uu({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},s=e,r=j(()=>({minWidth:o(s.minWidth),maxWidth:o(s.maxWidth),minHeight:o(s.minHeight),maxHeight:o(s.maxHeight),aspectRatio:s.ratio,width:o(s.size)})),a=async h=>{const f=await n(h);return!f||!(f instanceof Blob)?void 0:URL.createObjectURL(f)},l=async(h,f)=>{await i(h,f)},c=j(()=>({name:s.src,size:Number(s.size||100),color:""})),{url:u,loading:d}=e_(c,"visual",l,a);return(h,f)=>nt((K(),Ce("div",{class:z([h.$style.visualWrapper,{[h.$style.loading]:J(d)}]),style:mn(r.value)},[we("img",{src:J(u),width:e.size,height:e.size,alt:"visual-"+e.src,style:mn(r.value)},null,12,k8)],6)),[[J(t),{isLoading:J(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_1sro0_1",loading:"_loading_1sro0_8",pulse:"_pulse_1sro0_1"}}]]),O8=["tabindex"],Op=Ct(lt({name:"ListItem",directives:{tooltip:yn},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean}},emits:["click","keydown","update:selected","select"],setup(e,{emit:t}){const n=e,i=t,o=Z(!1),s=Z(!1);function r(E){if(!E||typeof E!="object")return!1;const _=E;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const a=j(()=>n.type==="status"||n.type==="assignee"||n.type==="icon"||!!R.prefix),l=j(()=>!!R.suffix||n.danger&&o.value),c=j(()=>n.disabled||!n.clickable?-1:0),u=j(()=>{var E;return n.type==="status"&&typeof((E=n.data)==null?void 0:E.color)=="string"?{backgroundColor:n.data.color,border:gy(n.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=Sf(),h=j(()=>({[d.active]:n.selected??!1,[d.disabled]:n.disabled??!1,[d.hover]:n.hover??!1,[d.clickable]:(n.clickable??!0)&&!n.disabled,[d.danger]:n.danger??!1,[d["has-prefix"]]:a.value,[d["has-suffix"]]:l.value,[d.readOnly]:n.readOnly})),f=j(()=>({content:"Cancel",...C})),g=j(()=>({content:"Confirm",theme:"warning",...C}));function m(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function y(){o.value=!1}function b(E){E&&i("click",E),(n.clickable??!0)&&(i("update:selected",!n.selected),i("select",!n.selected))}function S(E){if(!n.disabled){if(n.danger&&!o.value){o.value=!0;return}n.danger||b(E)}}function F(E){if(i("keydown",E),!n.disabled)if(E.key==="Enter"||E.key===" "){E.preventDefault();const _=new MouseEvent("click",{bubbles:!0,cancelable:!0});S(_)}else E.key==="Escape"&&o.value&&(E.preventDefault(),y())}const C=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),R=vv();return ct(()=>n.show,E=>{E===!1&&(o.value=!1)}),(E,_)=>{const I=af("tooltip");return K(),Ce("div",{class:z([E.$style["list-item"],h.value]),role:"listitem",tabindex:c.value,onClick:rn(S,["stop","prevent"]),onKeydown:F,onMouseenter:_[0]||(_[0]=O=>s.value=!0),onMouseleave:_[1]||(_[1]=O=>s.value=!1)},[a.value?(K(),Ce("div",{key:0,class:z(E.$style["list-item__prefix"])},[_t(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),Xe(gt,{key:0,src:e.icon,source:"remote",class:z(E.$style["item-icon"])},null,8,["src","class"])):e.type==="status"?(K(),Ce("div",{key:1,class:z(E.$style["status-indicator"]),style:mn(u.value)},null,6)):e.type==="assignee"&&r(e.data)?(K(),Xe(Ku,xn({key:2},m(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):ot("",!0)])],2)):ot("",!0),we("div",{class:z(E.$style["list-item__label"])},[_t(E.$slots,"label",{selected:e.selected},()=>[ut(bt(e.label),1)])],2),l.value?(K(),Ce("div",{key:1,class:z(E.$style["list-item__suffix"])},[_t(E.$slots,"suffix",{item:E.$props,hovered:s.value},()=>[e.danger&&o.value?(K(),Ce("div",{key:0,class:z(E.$style["confirm-action"])},[nt((K(),Xe(pt,{variant:["secondary","icon"],size:"small",onClick:rn(y,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[I,f.value]]),nt((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:rn(b,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[I,g.value]])],2)):ot("",!0)])],2)):ot("",!0)],42,O8)}}}),[["__cssModules",{$style:{"list-item":"_list-item_g74kb_1",disabled:"_disabled_g74kb_15",danger:"_danger_g74kb_18","has-prefix":"_has-prefix_g74kb_21","has-suffix":"_has-suffix_g74kb_21",clickable:"_clickable_g74kb_35",readOnly:"_readOnly_g74kb_38",hover:"_hover_g74kb_42",active:"_active_g74kb_48","list-item__prefix":"_list-item__prefix_g74kb_73","list-item__label":"_list-item__label_g74kb_81","list-item__suffix":"_list-item__suffix_g74kb_95","status-indicator":"_status-indicator_g74kb_102","item-icon":"_item-icon_g74kb_108","arbo-icon-state":"_arbo-icon-state_g74kb_113","item-avatar":"_item-avatar_g74kb_116","confirm-action":"_confirm-action_g74kb_125"}}]]),or=Ct(lt({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{}},emits:["event"],setup(e,{expose:t,emit:n}){const i=e;vv();const o=Sf(),s=Z(null),r=Z("default"),a=j(()=>{if(typeof i.size=="number")return`${i.size}px`;switch(i.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),l=j(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=j(()=>({[o["display-wrapper"]]:!0,[o.disabled]:i.disabled,[o.readOnly]:i.readOnly,[o.error]:i.error,[o.clickable]:i.clickable,[o.active]:i.actived,[o.hovered]:i.hovered,[o.focused]:!i.readOnly&&!i.disabled&&i.focused})),u=()=>{var b,S;const f=((b=s.value)==null?void 0:b.querySelectorAll(".wrapper-prefix").length)||0,g=((S=s.value)==null?void 0:S.querySelectorAll(".wrapper-suffix").length)||0,m="var(--icon-size)",y=(f+g)*8;return f&&!g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${y}px )`:!f&&g?`calc(100% - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:f&&g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:"100%"},d=Z(u());sf(()=>{qt(()=>{d.value=u()})}),vn(()=>{qt(()=>{d.value=u()})});const h=f=>{r.value=f};return t({rootEl:s,updateState:h,componentState:r}),(f,g)=>(K(),Ce("div",{ref_key:"rootEl",ref:s,class:z([[J(o)["display-wrapper"],c.value],"skeleton-loading-wrapper"]),style:mn({"--grid-template":d.value,"--wrapper-size":a.value,"--loading-overlay-width":l.value})},[_t(f.$slots,"prefix",{hovered:i.hovered,focused:i.focused}),_t(f.$slots,"default",{hovered:i.hovered,focused:i.focused,updateComponentState:h,disabled:i.disabled}),_t(f.$slots,"suffix",{hovered:i.hovered,focused:i.focused})],6))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_1h8v5_1",readOnly:"_readOnly_1h8v5_22",disabled:"_disabled_1h8v5_22",error:"_error_1h8v5_22",hovered:"_hovered_1h8v5_22",active:"_active_1h8v5_26",clickable:"_clickable_1h8v5_31",suffix:"_suffix_1h8v5_37",prefix:"_prefix_1h8v5_38"}}]]),M8=["value","placeholder","disable","readonly","maxlength"],GP=Ct(lt({__name:"InputText",props:{modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{type:Function},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","input","clear","enter","blur","cancel"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=n,r=Z(null),a=j(()=>{var S,F;return((S=o==null?void 0:o.modelValue)==null?void 0:S.length)&&((F=o==null?void 0:o.modelValue)==null?void 0:F.length)>0}),l=Ho(S=>{if(o.disabled||o.readOnly){S.preventDefault();return}const F=S.target;s("update:modelValue",F.value),s("input",F.value)},16),c=S=>{if(o.disabled||o.readOnly){S.preventDefault();return}s("update:modelValue",""),s("clear"),qt(()=>{var F;(F=r.value)==null||F.focus()})},u=Ho(S=>{const F=(o==null?void 0:o.modelValue)||"";S.key==="Escape"?a.value?c(S):s("cancel"):S.key==="Enter"&&F.length>0&&(S.preventDefault(),S.stopImmediatePropagation(),S.stopPropagation(),s("input",F||""),s("enter",F||""))},300),d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=Z(!1);ct(()=>o.modelValue,S=>{o.validatorFnc?h.value=!!S&&!o.validatorFnc(S):h.value=!1});const f=Z(null),g=j(()=>({disabled:o.disabled,readOnly:o.readOnly,error:h.value,inputRef:r,clickable:!o.disabled&&!o.readOnly,focused:o.focused,wrapperRef:f})),{argsMain:m,isHover:y,isFocus:b}=ir(g);return t({focus:()=>{qt(()=>{var S;(S=r.value)==null||S.focus(),console.log("focus called")})}}),(S,F)=>(K(),Ce("div",{class:z(S.$style["input-wrapper"])},[ye(or,xn(J(m),{ref_key:"wrapperRef",ref:f,class:S.$style["input-box"]}),{suffix:Se(()=>[(a.value||(J(y)||J(b))&&a.value)&&!o.disabled&&!o.readOnly?_t(S.$slots,"clear",{key:0},()=>[nt((K(),Xe(pt,{variant:["icon"],"aria-label":"Clear search",onClick:rn(c,["stop"]),size:16,rounded:!0},{default:Se(()=>[ye(gt,{class:z([S.$style["cs-icon"]]),src:"XMarkSolid",size:"8",color:"white"},null,8,["class"])]),_:1})),[[J(i),{content:"Clear",contentClass:"extra-padding"}]])]):_t(S.$slots,"suffix",{key:1})]),default:Se(()=>[we("input",{ref_key:"inputRef",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:z([S.$style["column-config__input"]]),id:d,disable:e.disabled,readonly:e.readOnly,onInput:F[0]||(F[0]=(...C)=>J(l)&&J(l)(...C)),onKeydown:F[1]||(F[1]=(...C)=>J(u)&&J(u)(...C)),maxlength:e.maxLength},null,42,M8)]),_:3},16,["class"]),h.value?_t(S.$slots,"error",{key:0}):ot("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_51nuy_1","has-suffix":"_has-suffix_51nuy_11","has-value":"_has-value_51nuy_11","is-disabled":"_is-disabled_51nuy_17","is-readonly":"_is-readonly_51nuy_24","column-config__input":"_column-config__input_51nuy_31"}}]]),KC=Ct(lt({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const i=e,o=n,s=Z(null),r=j(()=>i.modelValue.length>0),a=Ho(u=>{o("update:modelValue",u),o("search",u)},300),l=()=>{o("update:modelValue",""),o("clear"),qt(()=>{var u;(u=s.value)==null||u.focus()})},c=Z(i.modelValue);return`${Math.random().toString(36).substr(2,9)}`,t({focus:()=>{var u;(u=s.value)==null||u.focus()}}),(u,d)=>(K(),Xe(GP,{ref_key:"searchInput",ref:s,modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value=h),placeholder:e.placeholder,onInput:J(a),onClear:l,onCancel:d[1]||(d[1]=h=>o("cancel"))},{suffix:Se(()=>[r.value?ot("",!0):(K(),Xe(gt,{key:0,src:"MagnifyingGlass",class:z(u.$style.icon),color:"#a6a6a6"},null,8,["class"]))]),_:1},8,["modelValue","placeholder","onInput"]))}}),[["__cssModules",{$style:{"search-box":"_search-box_18t5g_1",icon:"_icon_18t5g_18"}}]]),L8=["aria-activedescendant"],N8=["innerHTML"],V8=10,qC=Ct(lt({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"282px"},width:{default:"200px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel"],setup(e,{expose:t,emit:n}){const i=yn,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},s=e,r=n,a=Z(""),l=Z(-1),c=Z(null),u=Z(null),d=Z(new Map),h=j(()=>hC(a.value)),f=j(()=>{const $=h.value;if(!$||$.length<s.minQueryLength)return s.options;if(d.value.has($))return d.value.get($);const ce=s.options.map(ue=>({item:ue,score:G6(ue.label,$)})).filter(({score:ue})=>ue>0).sort((ue,De)=>De.score-ue.score).map(({item:ue})=>ue);return d.value.set($,ce),ce}),g=j(()=>s.hasMore&&!s.loading&&!s.loadingMore),m=Ho($=>{X.value=0,a.value=$,l.value=-1,r("search",$)},gp),y=$=>{X.value=0,m($)},b=$=>a.value?$6($,a.value):$,S=$=>{const ue={[o.ARROW_DOWN]:()=>F($),[o.ARROW_UP]:()=>C($),[o.ENTER]:()=>_($),[o.ESCAPE]:()=>I($),[o.TAB]:()=>O($)}[$.key];ue&&ue()},F=$=>{$.preventDefault(),R(1)},C=$=>{$.preventDefault(),R(-1)},R=$=>{const ce=f.value.length;if(ce===0)return;let ue;$>0?ue=(l.value+1)%ce:l.value>0?ue=l.value-1:ue=ce-1,l.value=ue,E()},E=()=>{qt(()=>{var ce;const $=(ce=u.value)==null?void 0:ce.querySelectorAll('[role="menuitem"]')[l.value];$==null||$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},_=$=>{if($.preventDefault(),l.value>=0&&l.value<f.value.length){const ue=f.value[l.value];k(ue)}},I=$=>{$.preventDefault(),P()},O=$=>{l.value>=0&&($.preventDefault(),_($))},k=$=>{!$||$.disabled||(r("select",$),l.value=-1,P())},x=$=>{$>=0&&$<f.value.length&&(l.value=$)},P=()=>{r("close")},N=()=>{if(!g.value||!u.value)return;const{scrollTop:$,clientHeight:ce,scrollHeight:ue}=u.value;ue-($+ce)<=V8&&r("loadMore")},G=()=>{var $,ce;($=u.value)==null||$.addEventListener("scroll",N),(ce=c.value)==null||ce.addEventListener("keydown",S)},ie=()=>{var $,ce;($=u.value)==null||$.removeEventListener("scroll",N),(ce=c.value)==null||ce.removeEventListener("keydown",S)};vn(()=>{G()}),Yn(()=>{ie()}),ct(()=>s.loading,$=>{!$&&f.value.length>0&&(l.value=-1)});const B=$=>$?Array.isArray(s.selectedId)?s.selectedId.includes(String($.id)):s.selectedId==$.id:!1,H=Z(null);ct(l,()=>{E()}),t({focus:()=>{qt(()=>{var $;($=H.value)==null||$.focus()})},query:a,filteredOptions:f,selectedIndex:l,closeDropdown:P,clearSearch:()=>{a.value=""}});const X=Z(0);return ct(()=>s.loading,$=>{const ce=s.options.length>0&&f.value.length>0,ue=!ce&&a.value.length>0,De=!ce&&a.value.length===0;if($){X.value=0;return}else if(ce){X.value=1;return}else if(ue){X.value=2;return}else if(De){X.value=3;return}},{immediate:!0}),($,ce)=>(K(),Ce("datalist",{ref_key:"searchListRef",ref:c,class:z($.$style["search-list"]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:mn({width:e.width})},[ye(KC,{ref_key:"searchBoxRef",ref:H,modelValue:a.value,"onUpdate:modelValue":ce[0]||(ce[0]=ue=>a.value=ue),class:z($.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:ce[1]||(ce[1]=ue=>y("")),onCancel:ce[2]||(ce[2]=ue=>r("cancel"))},null,8,["modelValue","class","disabled"]),we("div",{ref_key:"popupRef",ref:u,class:z($.$style["list-container"]),style:mn({maxHeight:e.maxHeight})},[_t($.$slots,"extra-item"),(K(!0),Ce(kt,null,Un(f.value,(ue,De)=>nt((K(),Ce("div",{key:`${ue.id}-${De}`,role:"menuitem"},[_t($.$slots,"item",{item:ue,index:De,selectedIndex:l.value,isSelected:B,handleSelect:k,handleItemHover:x,getHighlightedLabel:b,query:a.value,idx:De},()=>[ue.hide?ot("",!0):(K(),Xe(Op,xn({key:0,ref_for:!0},ue,{hover:De===l.value,selected:B(ue),type:ue.type,id:`item-${De}`,"aria-selected":De===l.value,onClick:rn(ae=>k(ue),["stop","prevent"]),onMouseover:ae=>x(De)}),{prefix:Se(()=>[_t($.$slots,"prefix-item",{item:ue})]),label:Se(()=>[a.value?nt((K(),Ce("span",{key:0,class:z($.$style.match),innerHTML:b(ue.label)},null,10,N8)),[[J(i),{content:ue.label}]]):nt((K(),Ce("span",{key:1,class:z($.$style["item-label"])},[ut(bt(ue.label),1)],2)),[[J(i),{content:ue.label}]])]),suffix:Se(({hovered:ae})=>[_t($.$slots,"action",{item:ue,isHovered:De===l.value,hovered:ae,selected:l.value==De})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[as,X.value===1]])),128)),X.value===0?_t($.$slots,"loading-more",{key:0},()=>[(K(),Ce(kt,null,Un(7,ue=>we("div",{class:z($.$style["loading-more"]),key:ue},[we("div",{class:z($.$style["loading-skeleton"])},null,2),we("div",{class:z($.$style["loading-skeleton"])},null,2)],2)),64))]):ot("",!0),X.value===2?(K(),Ce("div",{key:1,class:z($.$style["no-results"])},[_t($.$slots,"empty",{query:a.value},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[3]||(ce[3]=[we("p",null,[ut(" No results. "),we("br"),ut(" Try another search. ")],-1)])],2)])],2)):ot("",!0),X.value===3?(K(),Ce("div",{key:2,class:z($.$style["no-results"])},[_t($.$slots,"empty-list",{},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[4]||(ce[4]=[we("p",null,"No items available.",-1)])],2)])],2)):ot("",!0),_t($.$slots,"footer")],6)],14,L8))}}),[["__cssModules",{$style:{"search-list":"_search-list_2e8kz_1","list-container":"_list-container_2e8kz_13","item-label":"_item-label_2e8kz_32","loading-state":"_loading-state_2e8kz_40","loading-more":"_loading-more_2e8kz_41","loading-skeleton":"_loading-skeleton_2e8kz_52","is-loading":"_is-loading_2e8kz_59","skeleton-loading":"_skeleton-loading_2e8kz_1","no-results":"_no-results_2e8kz_111","no-results-content":"_no-results-content_2e8kz_118",title:"_title_2e8kz_121",tips:"_tips_2e8kz_127",match:"_match_2e8kz_141"}}]]),B8=["innerHTML"],H8=20,$P=Ct(lt({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","start-update"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=kD,r=X=>{const $=X.data;return{name:String(($==null?void 0:$.name)??"Unknown"),initial:String(($==null?void 0:$.initial)??"U"),id:String(X.id),profile_image:($==null?void 0:$.profile_image)??null,color:($==null?void 0:$.color)??{bgColor:"#CCCCCC",textColor:"var(--background-color)"},size:24,isUseShortLabel:!0}},{id:a}=ev(o),l=n,c=X=>{var ce,ue;const $=(ue=(ce=o.params)==null?void 0:ce.api)==null?void 0:ue.getRowNode(String(a.value));$==null||$.setDataValue("assignees",_U(X.assignees)),l("updated",X)},u=Z(!1),d=Z(!1),h=Z(null),f=Z(1),g=Z(!0),m=Z(0),y=Z(""),{isSubmitting:b,unAssignAll:S,replaceAssignees:F,handleSelect:C,assigneeList:R,mergedOptions:E,selectedUserIds:_}=W6({...o,updateRowData:c,value:o.value}),I=Hi("bulkUpdate",!1),{apiServices:O}=po(!I,o),k=Hi("workspaceId"),x=async(X=1,$="",ce=!1)=>{var ue,De,ae,Fe,Me;if(!O.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(ce?d.value=!0:u.value=!0,h.value=null,!((ue=O.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const Je=await((De=O.value)==null?void 0:De.multipleAssignableUser({workspaceId:String(k),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:X,perPage:H8,q:$.trim()})),ft=((ae=mp(Je.data))==null?void 0:ae.map(NF))??[];R.value=ce?Jf(R.value,ft,"id"):ft,m.value=Je.meta.total,g.value=(((Fe=Je==null?void 0:Je.meta)==null?void 0:Fe.current_page)||0)<(((Me=Je==null?void 0:Je.meta)==null?void 0:Me.last_page)||0),f.value=X}catch(Je){console.error("Error fetching assignable users:",Je),h.value="Failed to load assignable users"}finally{u.value=!1,d.value=!1}},P=()=>{!d.value&&g.value&&x(f.value+1,y.value,!0)},N=Ho(async X=>{y.value=X,await x(1,X,!1)},gp),G=()=>x(1,y.value,!1),ie=j(dC);vn(()=>{var X;x(1),(X=H.value)==null||X.focus()}),t({getValue:()=>{var X;return(X=E.value.find($=>$.selected))==null?void 0:X.value},refresh:G,clearInternal:()=>{_.value=[]},focus:()=>{var X;(X=H.value)==null||X.focus()}});const B=()=>{const X=sessionStorage.getItem("BASE_URL"),$=Vo({type:"access_setting",config:{baseDomain:X,ws_code:o.workspaceId,entity_id:k}}).url;window.open($,"_blank")},H=Z(null);return vn(()=>{qt(()=>{var X;(X=H.value)==null||X.focus()})}),(X,$)=>(K(),Xe(qC,xn({"selected-id":J(_)},{...o},{options:J(E),loading:u.value,ref_key:"popupRef",ref:H,"loading-more":d.value,"has-more":g.value,onSelect:$[0]||($[0]=ce=>{J(C)(ce),l("start-update")}),onSearch:J(N),onLoadMore:P}),Su({"extra-item":Se(()=>[ye(pt,{variant:"menu-item",onHandleClick:J(S)},{prefix:Se(()=>[we("div",{class:z(X.$style["unassign-icon"])},[ye(gt,{src:"UserXMark",source:"remote"})],2)]),default:Se(()=>[$[1]||($[1]=ut(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),item:Se(({item:ce,selectedIndex:ue,isSelected:De,handleSelect:ae,handleItemHover:Fe,getHighlightedLabel:Me,query:Je,idx:ft})=>[ye(Op,xn(ce,{hover:ft===ue,selected:De(ce),type:ce.type,onClick:rn(Mt=>ae(ce),["stop","prevent"]),onMouseover:Mt=>Fe(ft),class:X.$style["item-assignee"]}),{prefix:Se(()=>[nt(ye(Ku,Wm(mf(r(ce))),null,16),[[J(s),{user:ce.data,status:"active",timezone:ie.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),label:Se(({selected:Mt})=>[Je?nt((K(),Ce("span",{key:0,class:z([X.$style["item-label"],X.$style.match]),style:{flex:"1"},innerHTML:Me(ce.label)},null,10,B8)),[[J(i),{content:ce.label}]]):nt((K(),Ce("span",{key:1,class:z(X.$style["item-label"]),style:{flex:"1"}},[ut(bt(ce.label),1)],2)),[[J(i),{content:ce.label}]]),we("div",{class:z(X.$style["item-action"])},[nt((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:J(b),onClick:rn(Be=>ae(ce),["stop","prevent"])},{prefix:Se(()=>[ye(gt,{src:Mt?"UserMinus":"UserPlus",source:"remote"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[J(i),Mt?"Unassign":"Assign"]]),nt((K(),Xe(pt,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:J(b),onClick:rn(Be=>{var jt;return J(F)((jt=ce.data)==null?void 0:jt.id)},["stop","prevent"])},{prefix:Se(()=>[ye(gt,{src:"IdCardClip",source:"remote"})]),_:1},8,["disabled","onClick"])),[[J(i),"Unassign others and reassign"]])],2)]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),"empty-list":Se(()=>[we("div",{class:z(X.$style["empty-state"])},[$[4]||($[4]=ut(" No assignee available. ",-1)),$[5]||($[5]=we("br",null,null,-1)),ye(pt,{onClick:B,variant:["tertiary"],size:"small"},{default:Se(()=>[...$[3]||($[3]=[ut(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[h.value?{name:"error",fn:Se(()=>[we("div",{class:z(X.$style["error-message"])},[ut(bt(h.value)+" ",1),ye(pt,{onClick:G,size:"small"},{default:Se(()=>[...$[2]||($[2]=[ut(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"]))}}),[["__cssModules",{$style:{action:"_action_1dg6a_1","item-assignee":"_item-assignee_1dg6a_6","item-action":"_item-action_1dg6a_6","item-label":"_item-label_1dg6a_16","unassign-icon":"_unassign-icon_1dg6a_25","error-message":"_error-message_1dg6a_36","empty-state":"_empty-state_1dg6a_46"}}]]),G8=lt({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e;Fa("bulkUpdate",!0);const i=t,o=Z(null),s=f=>{var g;h.value=!1,i("update",f),(g=o.value)==null||g.clearInternal()},{triggerRef:r,popupRef:a,hide:l,isVisible:c}=Qs(),u=Z(null),d=f=>{f.key==="Escape"&&a.value&&l()};vn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.addEventListener("keydown",d)}),Yn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.removeEventListener("keydown",d)}),ct(c,f=>{var g,m;f?(g=o.value)==null||g.focus():(m=o.value)==null||m.clearInternal()});const h=Z(!1);return(f,g)=>(K(),Ce("div",{ref_key:"mainRef",ref:u},[we("div",{ref_key:"triggerRef",ref:r},[ye(pt,{class:"action-button",variant:n.variant,loading:h.value},{default:Se(()=>[ye(gt,{src:"UserPlus",class:"icon"}),g[1]||(g[1]=ut(" Assignee ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:a,style:{display:"none"}},[ye($P,xn({ref_key:"assigneeGroupEditorRef",ref:o},n,{ids:e.ids,onUpdated:s,onStartUpdate:g[0]||(g[0]=m=>h.value=!0)}),null,16,["ids"])],512)],512))}}),$8=["aria-label"],W8=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],z8=Ct(lt({__name:"MainCalendar",props:vE({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:vE(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel"],["update:tracingCase"]),setup(e,{emit:t}){const n=e,i=j(()=>n.startDate&&n.endDate),o=cV(e,"tracingCase"),s=t,r=Z(n.year),a=Z(n.month);ct(()=>[n.year,n.month],([B,H])=>{r.value=B,a.value=H});const l=j(()=>tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),c=j(()=>tt.now().setZone(n.timezone)),u=j(()=>n.startDate?tt.fromJSDate(n.startDate,{zone:n.timezone}):null),d=j(()=>n.endDate?tt.fromJSDate(n.endDate,{zone:n.timezone}):null),h=Z(u.value),f=Z(d.value),g=Z(u.value),m=Z(d.value);ct([u,d],()=>{n.requireConfirm||(h.value=u.value,f.value=d.value,g.value=u.value,m.value=d.value)},{immediate:!0});const y=j(()=>n.requireConfirm?h.value:u.value),b=j(()=>n.requireConfirm?f.value:d.value);ct(()=>n.activeField,B=>{const H=B==="start"?y.value:b.value;H&&(r.value=H.year,a.value=H.month)}),ct(()=>{var B,H;return[(B=y.value)==null?void 0:B.toISODate(),(H=b.value)==null?void 0:H.toISODate(),n.activeField]},()=>{const B=n.activeField==="start"?y.value:b.value;B&&(B.year!==r.value||B.month!==a.value)&&(r.value=B.year,a.value=B.month)});function S(B){return B.setZone("utc")}const F=Z("");function C(B){F.value=B.toISODate()||"",qt(()=>{const H=document.querySelector(`.arbo-calendar-day[data-date="${F.value}"]`);H==null||H.focus()})}ct(()=>{var B,H;return[r.value,a.value,n.activeField,(B=y.value)==null?void 0:B.toISODate(),(H=b.value)==null?void 0:H.toISODate()]},()=>{const B=n.activeField==="start"?y.value:b.value;let H;B&&B.year===r.value&&B.month===a.value?H=B:y.value&&y.value.year===r.value&&y.value.month===a.value?H=y.value:H=c.value,C(H)});function R(B){return B.toFormat("d")}const E=j(()=>{const B=tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),H=B.weekday,X=n.weekStart===1?(H+6)%7:H%7;let $=B.minus({days:X});const ce=[],ue=cc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"}),De=Sf();for(let Fe=0;Fe<42;Fe++){const Me=[];$.month!==a.value&&Me.push(De["is-outside"]),$.hasSame(c.value,"day")&&Me.push(De["is-today"]),y.value&&$.hasSame(y.value,"day")&&Me.push(De["is-selected-start"]),b.value&&$.hasSame(b.value,"day")&&Me.push(De["is-selected-end"]),y.value&&b.value&&$>y.value&&$<b.value&&Me.push(De["is-in-range"]);const Je=R($),ft=ue[$.weekday-1]||"";ce.push({dt:$,iso:$.toISODate()||"",label:$.toFormat("d"),displayLabel:Je,weekdayLabel:ft,aria:$.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:Me}),$=$.plus({days:1})}const ae=[];for(let Fe=0;Fe<6;Fe++)ae.push(ce.slice(Fe*7,Fe*7+7));return ae}),_=j(()=>{const B=cc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?B:[B[6],...B.slice(0,6)]});function I(B,H,X){const $=B==="start"?H.startOf("day"):H.endOf("day"),ce=S($),ue={year:$.year,month:$.month,day:$.day,utc:ce.toISO()||""};B==="start"?(s("select-start",ue,X??!0),s("select-start-utc",ue.utc)):(s("select-end",ue),s("select-end-utc",ue.utc))}function O(B){let H=r.value,X=a.value+B;for(;X<1;)X+=12,H-=1;for(;X>12;)X-=12,H+=1;r.value=H,a.value=X,s("update:year",H),s("update:month",X)}function k(B){const X=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).plus({days:B});(X.month!==a.value||X.year!==r.value)&&(a.value=X.month,r.value=X.year,s("update:year",X.year),s("update:month",X.month)),C(X)}function x(B=!1){const X=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).weekday%7,$=B?6-X:-X;k($)}function P(B){switch(B.key){case"ArrowLeft":B.preventDefault(),k(-1);break;case"ArrowRight":B.preventDefault(),k(1);break;case"ArrowUp":B.preventDefault(),k(-7);break;case"ArrowDown":B.preventDefault(),k(7);break;case"Home":B.preventDefault(),x(!1);break;case"End":B.preventDefault(),x(!0);break;case"PageUp":B.preventDefault(),O(B.shiftKey?-12:-1);break;case"PageDown":B.preventDefault(),O(B.shiftKey?12:1);break;case"Enter":case" ":{B.preventDefault();const H=F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value,X=E.value.flat().find($=>$.iso===H.toISODate());X&&N(X);break}}}function N(B){var Be,jt;const H=!!u.value,X=!!d.value,$=n.activeField,ce=((Be=u.value)==null?void 0:Be.toISODate())||"null",ue=((jt=d.value)==null?void 0:jt.toISODate())||"null",De=B.dt.toISODate()||"",ae=(nn,Ot)=>{o.value={case:nn,behavior:Ot}},Fe=()=>`Selected start ${De} > existing end ${ue} -> reset both to ${De}`,Me=()=>`Selected end ${De} < existing start ${ce} -> reset both to ${De}`,Je=()=>{I("start",B.dt,!0),I("end",B.dt),s("update:activeField","end")},ft=(nn=!1)=>{I("start",B.dt,nn),nn&&s("update:activeField","end")},Mt=(nn=!1)=>{console.trace("doSelectEnd called with closeAfter:",nn,n.immediatelyUpdate),I("end",B.dt),nn&&s("close")};if(H&&X){$==="start"?d.value&&B.dt>d.value?(Je(),ae("INVERT_RANGE_FROM_START",Fe())):(ft(!1),ae("UPDATE_START_IN_RANGE",`Updated start from ${ce} to ${De}; end remains ${ue}`)):u.value&&B.dt<u.value?(Je(),ae("INVERT_RANGE_FROM_END",Me())):(Mt(!1),ae("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${De}; start remains ${ce}`));return}if(!H&&X&&$==="start"&&d.value&&B.dt>d.value){Je(),ae("CREATE_RANGE_FROM_LATE_START",Fe());return}if(H&&!X&&$==="end"&&u.value&&B.dt<u.value){Je(),ae("CREATE_RANGE_FROM_EARLY_END",Me());return}if(!H&&!X){if($==="start"){ft(!0),ae("INIT_START",`Picked start ${De}; awaiting end selection`);return}Mt(n.immediatelyUpdate),ae("INIT_END",`Picked end ${De}; awaiting start selection`);return}if(!H&&X){if($==="start"){ft(!0),ae("FILL_MISSING_START",`Inserted start ${De}; existing end ${ue}`);return}Mt(!1),ae("STRICT_UPDATE_END_ONLY",`Updated end to ${De}; start still null`);return}if(H&&!X){if($==="start"){ft(!0),ae("RESELECT_START_BEFORE_END",`Replaced start with ${De}; end still null, switching to end`);return}Mt(n.immediatelyUpdate),ae("FILL_MISSING_END",`Picked end ${De}; start ${ce}`);return}}function G(){g.value=h.value,m.value=f.value,s("confirm")}function ie(){h.value=g.value,f.value=m.value,s("cancel")}return(B,H)=>(K(),Ce("div",{class:z([B.$style["arbo-calendar"],{[B.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:P},[we("div",{class:z([B.$style["arbo-calendar-header"],B.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),Ce(kt,null,Un(_.value,X=>(K(),Ce("div",{key:X,class:z(B.$style["arbo-calendar-weekday"]),role:"columnheader"},bt(X),3))),128))],2),we("div",{class:z(B.$style["arbo-calendar-weeks"])},[(K(!0),Ce(kt,null,Un(E.value,(X,$)=>(K(),Ce("div",{key:$,class:z(B.$style["arbo-calendar-week"]),role:"row"},[(K(!0),Ce(kt,null,Un(X,ce=>(K(),Ce("div",{key:ce.iso,class:z([B.$style["arbo-calendar-day"],ce.classes,{[B.$style["is-focused"]]:ce.iso===F.value}]),disabled:n.disabled,readOnly:n.readOnly,role:"gridcell","aria-label":ce.aria,"data-date":ce.iso,"data-weekday":ce.weekdayLabel,tabindex:ce.iso===F.value?0:-1,onClick:ue=>N(ce)},bt(ce.displayLabel),11,W8))),128))],2))),128))],2),n.readOnly?ot("",!0):(K(),Ce("div",{key:0,class:z(B.$style["arbo-calendar-actions"])},[ye(pt,{disabled:n.disabled,readOnly:n.readOnly,variant:"secondary",size:"medium",onClick:ie},{default:Se(()=>[ut(bt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ye(pt,{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium",onClick:G},{default:Se(()=>[ut(bt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))],42,$8))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1xc07_1","arbo-calendar-day":"_arbo-calendar-day_1xc07_2","arbo-calendar-week":"_arbo-calendar-week_1xc07_3","arbo-calendar":"_arbo-calendar_1xc07_2","arbo-calendar-nav":"_arbo-calendar-nav_1xc07_37","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1xc07_45","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1xc07_52","arbo-calendar-weekday":"_arbo-calendar-weekday_1xc07_57","arbo-calendar-weeks":"_arbo-calendar-weeks_1xc07_62","is-today":"_is-today_1xc07_93","is-selected-start":"_is-selected-start_1xc07_99","is-outside":"_is-outside_1xc07_108","is-selected-end":"_is-selected-end_1xc07_108","is-in-range":"_is-in-range_1xc07_136","arbo-calendar-actions":"_arbo-calendar-actions_1xc07_141","arbo-calendar-btn":"_arbo-calendar-btn_1xc07_150",cancel:"_cancel_1xc07_159",confirm:"_confirm_1xc07_164"}}]]),U8=Ct(lt({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{emit:t}){const n=e,i=j(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const x=n.locale||"en-US",P=n.monthLabelStyle||"short",N=new Intl.DateTimeFormat(x,{month:P,timeZone:"UTC"});return Array.from({length:12},(ie,B)=>N.format(new Date(Date.UTC(2020,B,1))))}),o=t,s=Z(n.year),r=Z(n.month);ct(()=>n.year,x=>{x!==s.value&&(s.value=x)}),ct(()=>n.month,x=>{x!==r.value&&(r.value=x)});const a=Z("days");function l(x){a.value!==x&&(a.value=x,o("mode-change",x))}const c=j(()=>n.minYear),u=j(()=>n.maxYear),d=j(()=>{const x=n.yearSpan;return s.value-s.value%x}),h=j(()=>d.value+n.yearSpan-1);function f(){const x=n.yearSpan,P=d.value-x;P>=c.value&&(s.value=P)}function g(){const x=n.yearSpan,P=d.value+x;P<=u.value&&(s.value=P)}const m=j(()=>d.value-n.yearSpan<c.value),y=j(()=>h.value+n.yearSpan>u.value),b=j(()=>{const x=n.yearSpan;return Math.ceil(x/3)});function S(x){const N=d.value+(x-1)*3;return Array.from({length:3},(G,ie)=>N+ie).filter(G=>G<=h.value)}function F(){a.value==="months"?l("days"):l("months")}function C(){a.value==="years"?l("days"):l("years")}function R(x){s.value=x,o("update:year",x),o("year-selected",x),l("months")}function E(x){r.value=x,o("update:month",x),o("month-selected",x),l("days")}function _(){if(a.value==="days"){let x=s.value,P=r.value-1;if(P<1&&(P=12,x--),x<c.value)return;s.value=x,r.value=P,o("update:year",x),o("update:month",P)}else if(a.value==="months"){if(s.value-1<c.value)return;s.value--,o("update:year",s.value)}else a.value==="years"&&f()}function I(){if(a.value==="days"){let x=s.value,P=r.value+1;if(P>12&&(P=1,x++),x>u.value)return;s.value=x,r.value=P,o("update:year",x),o("update:month",P)}else if(a.value==="months"){if(s.value+1>u.value)return;s.value++,o("update:year",s.value)}else a.value==="years"&&g()}const O=j(()=>a.value==="days"?s.value===c.value&&r.value===1:a.value==="months"?s.value-1<c.value:m.value),k=j(()=>a.value==="days"?s.value===u.value&&r.value===12:a.value==="months"?s.value+1>u.value:y.value);return(x,P)=>(K(),Ce("div",{class:z(x.$style["cal-nav-wrapper"])},[_t(x.$slots,"selection"),we("div",{class:z(x.$style["cal-nav-bar"]),role:"toolbar","aria-label":"Calendar navigation"},[ye(pt,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.prev]),"aria-label":"Previous",disabled:O.value,label:"",onClick:_},{default:Se(()=>[ye(gt,{src:"ChevronLeft",source:"remote"})]),_:1},8,["class","disabled"]),we("div",{class:z(x.$style["cal-nav-center"])},[ye(pt,{"aria-pressed":a.value==="months",onClick:F,variant:"secondary"},{default:Se(()=>[ut(bt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),ye(pt,{variant:"secondary","aria-pressed":a.value==="years",onClick:C},{default:Se(()=>[ut(bt(s.value),1)]),_:1},8,["aria-pressed"])],2),ye(pt,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.next]),"aria-label":"Next",disabled:k.value,label:"",onClick:I},{default:Se(()=>[ye(gt,{src:"ChevronRight",source:"remote"})]),_:1},8,["class","disabled"])],2),a.value==="years"?(K(),Ce("div",{key:0,class:z(x.$style["year-grid"])},[we("div",{class:z(x.$style["year-grid-header"])},[ye(pt,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.prev]),"aria-label":"Next",disabled:m.value,"prefix-icon":"AnglesRight",label:"",onClick:f},{default:Se(()=>[ye(gt,{src:"AnglesRight",source:"remote",class:z(x.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"]),we("div",{class:z(x.$style["range-label"])},bt(d.value)+" - "+bt(h.value),3),ye(pt,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.next]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Se(()=>[ye(gt,{src:"AnglesRight",source:"remote",class:z(x.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"])],2),we("div",{class:z(x.$style["year-grid-body"]),role:"grid"},[(K(!0),Ce(kt,null,Un(b.value,N=>(K(),Ce("div",{key:"yr-row-"+N,class:z(x.$style["year-grid-row"]),role:"row"},[(K(!0),Ce(kt,null,Un(S(N),G=>(K(),Xe(pt,{key:G,variant:"secondary",class:z([x.$style["year-cell"],{[x.$style.selected]:G===s.value}]),role:"gridcell",disabled:G<c.value||G>u.value,onClick:ie=>R(G)},{default:Se(()=>[ut(bt(G),1)]),_:2},1032,["class","disabled","onClick"]))),128))],2))),128))],2)],2)):a.value==="months"?(K(),Ce("div",{key:1,class:z(x.$style["month-grid"]),role:"dialog","aria-label":"Select month"},[we("div",{class:z(x.$style.months),role:"grid"},[(K(!0),Ce(kt,null,Un(i.value,(N,G)=>(K(),Xe(pt,{disabled:n.disabled,"read-only":n.readOnly,key:N,variant:"secondary",class:z([x.$style["month-cell"],{[x.$style.selected]:G+1===r.value}]),role:"gridcell",onClick:ie=>E(G+1)},{default:Se(()=>[ut(bt(N),1)]),_:2},1032,["disabled","read-only","class","onClick"]))),128))],2)],2)):(K(),Ce("div",{key:2,class:z(x.$style["days-slot"])},[_t(x.$slots,"default",{year:s.value,month:r.value,mode:a.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_lnmem_1","cal-nav-bar":"_cal-nav-bar_lnmem_11","cal-nav-btn":"_cal-nav-btn_lnmem_19","year-grid-header":"_year-grid-header_lnmem_33",prev:"_prev_lnmem_33","cal-nav-center":"_cal-nav-center_lnmem_45","cal-nav-label":"_cal-nav-label_lnmem_51","month-grid":"_month-grid_lnmem_65","year-grid":"_year-grid_lnmem_33",months:"_months_lnmem_78","month-cell":"_month-cell_lnmem_85","pg-btn":"_pg-btn_lnmem_100","year-grid-body":"_year-grid-body_lnmem_113","year-grid-row":"_year-grid-row_lnmem_120","year-cell":"_year-cell_lnmem_126",selected:"_selected_lnmem_134","days-slot":"_days-slot_lnmem_143","range-label":"_range-label_lnmem_147"}}]]);function j8(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:i,maxDate:o}=e,s=Z(""),r=j(()=>{const m=tt.fromFormat(s.value,t,{zone:n});return m.isValid?m:null}),a=j(()=>{if(!i||!r.value)return!0;const m={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year>m.year?!0:y.year<m.year?!1:y.month>m.month?!0:y.month<m.month?!1:l(y,m)>=0}),l=(m,y)=>{const b=new Date(m.year,m.month-1,m.day),S=new Date(y.year,y.month-1,y.day);return b<S?-1:b>S?1:0},c=j(()=>{if(!o||!r.value)return!0;const m={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year<m.year?!0:y.year>m.year?!1:y.month<m.month?!0:y.month>m.month?!1:l(y,m)<=0}),u=j(()=>s.value.length==0||s.value.length>0&&r.value!==null&&a.value&&c.value),d=j(()=>s.value.length===t.length&&u.value);return{inputValue:s,isValid:u,isComplete:d,clear:()=>{s.value=""},setDate:m=>{let y;m instanceof Date?y=tt.fromJSDate(m,{zone:n}):y=m.setZone(n),y.isValid?s.value=y.toFormat(t):s.value=""},getDate:()=>u.value?r.value:null}}const K8=["disabled","readonly","placeholder"],WP=Ct(lt({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0}},emits:["complete","invalid","clear"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=n,r=Z(null),a=Z(null),{isValid:l,isComplete:c,inputValue:u,clear:d,setDate:h,getDate:f}=j8({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),g=j(()=>o.active),m=j(()=>({disabled:o.disabled,error:!l.value&&u.value.length>0,readOnly:o.readOnly,isEmpty:u.value.length===0,inputRef:r,wrapperRef:a,active:g})),{argsMain:y,isHover:b,isFocus:S}=ir(m),F=R=>{var _;const E=(_=R.clipboardData)==null?void 0:_.getData("text/plain");E&&(u.value=E.trim())},C=()=>{d(),s("clear")};return t({clear:C,setDate:h,getDate:f,focus:()=>{var R;return(R=r.value)==null?void 0:R.focus()}}),ct(()=>o.modelValue,R=>{R?h(R):d()},{immediate:!0}),ct([()=>c.value,()=>u.value],()=>{if(u.value.length===0){s("complete",null);return}else if(l.value&&!o.readOnly&&!o.disabled&&c.value){const R=f();(R||u.value.length===0)&&s("complete",R)}}),ct(()=>l.value,R=>{R||s("invalid","")}),(R,E)=>(K(),Xe(or,xn(J(y),{ref_key:"wrapperRef",ref:a,size:26,style:{padding:0,background:"var(--bg-secondary,)"}}),{default:Se(()=>{var _;return[we("div",{class:z([R.$style["date-input-wrapper"]])},[ye(gt,{src:"Calendar",source:"remote",class:z(R.$style["icon-calendar"]),color:"var(--primary-color)"},null,8,["class"]),nt(we("input",{disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":E[0]||(E[0]=I=>Qt(u)?u.value=I:null),onPaste:rn(F,["prevent"]),placeholder:(_=o.format)==null?void 0:_.toLocaleUpperCase(),class:z([R.$style["date-input"]])},null,42,K8),[[PR,J(u)]]),_t(R.$slots,"clear",{handleClear:C},()=>[J(u).length>0&&!o.readOnly&&!o.disabled&&(J(b)||J(S))?nt((K(),Xe(pt,{key:0,variant:["icon","primary"],onClick:rn(C,["stop"]),size:16,rounded:!0},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[J(i),"Clear"]]):ot("",!0)])],2)]}),_:3},16))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_fako3_1","icon-calendar":"_icon-calendar_fako3_9",focus:"_focus_fako3_12",hover:"_hover_fako3_12",active:"_active_fako3_12","date-input":"_date-input_fako3_1",invalid:"_invalid_fako3_38"}}]]),q8=lt({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:fC()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"No due"},startPlaceholder:{default:"No start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update"],setup(e,{expose:t,emit:n}){const i=Z({case:"",behavior:""}),o=e,s=Z(null),r=n,a=async(ce,ue)=>{var De,ae;r("start-update"),await ce(),(ae=(De=o.params)==null?void 0:De.api)==null||ae.stopEditing(),qt(()=>{ue(),r("finish-update")})},l=(ce,ue)=>{var De,ae;ce(),(ae=(De=o.params)==null?void 0:De.api)==null||ae.stopEditing(),qt(()=>{ue()})},c=Ao({start:!1,end:!1}),{states:u,selectEndDate:d,cancelSelection:h,confirmSelection:f,selectStartDate:g,beginInteraction:m,clearStart:y,clearDue:b}=j6(o,r,i),S=j(()=>{if(u.isSelectingStart)return"start";if(u.isSelectingEnd)return"end"}),F=ce=>{if(!ce){c.start=!1,y();return}const ue=u.endDate?tt.fromJSDate(u.endDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)>0){const ae={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(ae,!1),d(ae),qt(()=>{u.isSelectingStart=!0,u.isSelectingEnd=!1});return}const De={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(De,!0)},C=(ce,ue)=>{const De=ce.startOf("day"),ae=ue.startOf("day");return De<ae?-1:De>ae?1:0},R=ce=>{if(!ce){c.end=!1,b();return}const ue=u.startDate?tt.fromJSDate(u.startDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)<0){const ae={year:ce.year,month:ce.month,day:ce.day};c.end=!1,g(ae),d(ae),qt(()=>{u.isSelectingEnd=!0,u.isSelectingStart=!1});return}const De={year:ce.year,month:ce.month,day:ce.day};c.end=!1,d(De)},E=()=>{y()},_=()=>{b()},I=()=>{P()},O=j(()=>u.isSelectingStart||u.isSelectingEnd);function k(){o.disabled||o.readOnly||(m(),u.isSelectingStart=!0,u.isSelectingEnd=!1)}function x(){o.disabled||o.readOnly||(m(),u.isSelectingEnd=!0,u.isSelectingStart=!1)}function P(){u.isSelectingStart=!1,u.isSelectingEnd=!1,r("closed")}function N(ce){ce.key==="Escape"&&(ce.stopPropagation(),P())}const G=Z(new Date().getFullYear()),ie=Z(new Date().getMonth()+1);ct(()=>[u.isSelectingStart,u.isSelectingEnd,u.startDate,u.endDate],()=>{u.isSelectingStart&&u.startDate?(G.value=u.startDate.getFullYear(),ie.value=u.startDate.getMonth()+1):u.isSelectingEnd&&u.endDate&&(G.value=u.endDate.getFullYear(),ie.value=u.endDate.getMonth()+1)},{immediate:!0});const B=Z(null);function H(){if(Array.isArray(o.value)){const[ue,De]=o.value;u.startDate=ue||null,u.endDate=De||null}u.isSelectingStart=!1,u.isSelectingEnd=!1;const ce=u.startDate||u.endDate||new Date;G.value=ce.getFullYear(),ie.value=ce.getMonth()+1}ct(()=>{var ce,ue,De,ae,Fe,Me,Je,ft;return[((De=(ue=(ce=o.value)==null?void 0:ce[0])==null?void 0:ue.getTime)==null?void 0:De.call(ue))||((ae=o.value)==null?void 0:ae[0]),((Je=(Me=(Fe=o.value)==null?void 0:Fe[1])==null?void 0:Me.getTime)==null?void 0:Je.call(Me))||((ft=o.value)==null?void 0:ft[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{H()},{immediate:!0,deep:!0}),t({resetCalendarLogic:H,openStart:k,openEnd:x,closePicker:P,clearAll:I,isOpen:O,drpRef:B,getValues:()=>({startDate:u.startDate,endDate:u.endDate,dateRange:[u.startDate,u.endDate]}),focus:()=>{var ce;u.startDate||u.endDate?u.startDate?k():x():(k(),(ce=s.value)==null||ce.focus())}});const $=Z(null);return ct(()=>O.value,ce=>{if(o.disabled||o.readOnly)return;const ue=$.value;ue&&(ce?ue.show():ue.hide())},{immediate:!0}),(ce,ue)=>(K(),Ce("div",{class:z(ce.$style["calendar-wrapper"])},[ye(U8,{year:G.value,"onUpdate:year":ue[6]||(ue[6]=De=>G.value=De),month:ie.value,"onUpdate:month":ue[7]||(ue[7]=De=>ie.value=De),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,onKeydown:N},{selection:Se(()=>[we("div",{class:z(ce.$style["calendar-input-section"])},[ye(WP,{ref_key:"starDateRef",ref:s,"model-value":J(u).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:J(u).isSelectingStart,onClick:k,onClear:E,onComplete:F,onInvalid:ue[0]||(ue[0]=De=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(WP,{"model-value":J(u).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:J(u).isSelectingEnd,onClick:x,onClear:_,disabled:o.disabled,onComplete:R,onInvalid:ue[1]||(ue[1]=De=>c.end=!0),readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"])],2)]),default:Se(({year:De,month:ae})=>[ye(z8,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:B,"tracing-case":i.value,"onUpdate:tracingCase":ue[2]||(ue[2]=Fe=>i.value=Fe),year:De,month:ae,"start-date":J(u).startDate,"end-date":J(u).endDate,"active-field":S.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:J(g),onSelectEnd:J(d),onConfirm:ue[3]||(ue[3]=()=>{a(J(f),P)}),onCancel:ue[4]||(ue[4]=Fe=>l(J(h),P)),onClose:ue[5]||(ue[5]=Fe=>a(J(f),P))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],2))}}),zP=Ct(q8,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_f7hcw_1","calendar-input-section":"_calendar-input-section_f7hcw_10","display-wrapper":"_display-wrapper_f7hcw_18","calendar-actions":"_calendar-actions_f7hcw_22","clear-all-btn":"_clear-all-btn_f7hcw_28"}}]]),Y8={ref:"mainRef"},Z8=lt({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,o=Hi("bulkUpdate",!1),{apiServices:s}=po(!o,i),r=async g=>{var y,b;f.value=!0;const m={workspaceId:i.workspaceId,itemIds:i.ids,startDate:g.start?LF(g.start):null,dueDate:g.end?LF(g.end):null};await((b=(y=s.value)==null?void 0:y.changeDate)==null?void 0:b.call(y,m).then(()=>{n("updated",{workspaceId:i.workspaceId,itemIds:i.ids,data:[g.start,g.end]})})),f.value=!1};ct(()=>i.ids,g=>{h.value=[null,null]});const a=Z(null),{triggerRef:l,popupRef:c,hide:u,isVisible:d}=Qs(),h=Z([null,null]);ct(d,g=>{var m;g&&((m=a.value)==null||m.focus())});const f=Z(!1);return(g,m)=>(K(),Ce("div",Y8,[we("div",{ref_key:"triggerRef",ref:l},[ye(pt,{variant:i.variant,loading:f.value},{default:Se(()=>[ye(gt,{src:"Calendar"}),m[1]||(m[1]=ut(" Date ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:c,style:{display:"none"}},[ye(zP,{immediatelyUpdate:!1,value:h.value,onConfirmed:r,ref_key:"calendarRef",ref:a,onClosed:J(u),onStartUpdate:m[0]||(m[0]=y=>f.value=!0)},null,8,["value","onClosed"])],512)],512))}}),UP=Ct(lt({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const i=e,o=n,{hide:s,triggerRef:r,popupRef:a,isVisible:l}=Qs({placement:i.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:i.show,maxWidth:i.maxWidth}),c=j(()=>l.value);ct(l,h=>{o(h?"open":"close")});const u=()=>{s()};t({closeDropdown:u,isOpen:c});const d=h=>{h.key==="Escape"&&a.value&&s()};return vn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.addEventListener("keydown",d)}),Yn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.removeEventListener("keydown",d)}),(h,f)=>(K(),Ce("div",{ref_key:"triggerRef",ref:r,class:z(h.$style["dropdown-wrapper"])},[_t(h.$slots,"trigger",{open:J(l)},()=>[we("button",{class:z(h.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),we("div",{ref_key:"popupRef",ref:a,class:z(h.$style["dropdown-content"]),style:mn({display:J(l)?"block":"none",maxWidth:i.maxWidth?i.maxWidth+"px":"unset"})},[_t(h.$slots,"content",{closeDropdown:u,visible:J(l)},()=>[we("div",{class:z(h.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_1fn64_1","dropdown-content":"_dropdown-content_1fn64_5","dropdown-list":"_dropdown-list_1fn64_9"}}]]),jP=lt({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","error","cancel","start-update"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},o=e,s=n,r=Z([]),a=Z(!1),l=Z(!1),c=Z(null),u=Z(i.INITIAL_PAGE),d=Z(!0),h=Z(0),f=Z(""),g=j(()=>{var k;return(k=o.value)==null?void 0:k.id}),m=j(()=>!!(o.id||o.ids&&o.ids.length>0)),y=k=>({label:k.name,value:k.id,selected:g.value===k.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:k,id:k.id,color:k.color}),b=j(()=>{const k=new Set;return o.id&&k.add(String(o.id)),o.ids&&o.ids.forEach(x=>{x&&k.add(String(x))}),Array.from(k)}),S=Hi("bulkUpdate",!1),{apiServices:F}=po(!S,o),C=async(k=i.INITIAL_PAGE,x="",P=!1)=>{var N,G,ie,B;if(!m.value){console.error("Missing required props",o);return}P?l.value=!0:a.value=!0,c.value=null;try{const H={workspaceId:String(o.workspaceId),itemIds:b.value,page:k,perPage:i.PER_PAGE,name_like:x.trim()};if(((N=F.value)==null?void 0:N.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const X=await((G=F.value)==null?void 0:G.getAssignableStatus(H));if(!(X!=null&&X.data)){P||(r.value=[]),d.value=!1;return}const $=X.data.map(y);r.value=P?[...r.value,...$]:$,h.value=((ie=X.meta)==null?void 0:ie.total)??X.data.length,d.value=!((B=X.meta)!=null&&B.on_last_page),u.value=k}catch(H){console.error("Error fetching statuses:",H),c.value="Failed to load statuses",P||(r.value=[]),d.value=!1,s("error",c.value)}finally{a.value=!1,l.value=!1}},R=Ho(async k=>{f.value=k,u.value=i.INITIAL_PAGE,await C(i.INITIAL_PAGE,k,!1)},gp),E=async()=>{!d.value||l.value||await C(u.value+1,f.value,!0)},_=async k=>{var x,P,N;if(!m.value){console.error("Missing required props for updating status",o);return}try{s("start-update");const G=await F.value.updateItemStatus({workspaceId:String(o.workspaceId),itemIds:b.value,statusId:String(k.value)});if(!(G!=null&&G.message))throw s("error","API did not return success"),new Error("API did not return success");o.params&&((P=o.params)==null||P.node.setData({...(x=o.params)==null?void 0:x.node.data,status:{id:k.id,name:k.label,color:k.color}}),(N=o.params)==null||N.api.stopEditing()),s("updated",{workspaceId:String(o.workspaceId),itemIds:b.value,data:{id:k.id,name:k.label,color:k.color}})}catch(G){console.error("Error updating status:",G),c.value="Failed to update status",s("error",c.value)}},I=j(()=>r.value.map(k=>({...k})));ct([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{C()},{deep:!0,immediate:!0}),t({refresh:()=>C(i.INITIAL_PAGE,f.value,!1),loadMore:E});const O=Z(null);return vn(()=>{qt(()=>{var k;(k=O.value)==null||k.focus()})}),(k,x)=>{var P;return K(),Xe(qC,xn({ref_key:"popupRef",ref:O},o,{"selected-id":(P=o.value)==null?void 0:P.id,options:I.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:c.value,onSearch:J(R),onSelect:_,onLoadMore:E,onCancel:x[0]||(x[0]=N=>s("cancel"))}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),X8=lt({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=j(()=>{const g=Si();return g==null?void 0:g.appContext.config.globalProperties.apiServices}),{popupRef:o,triggerRef:s,isVisible:r,hide:a}=Qs(),l=t,c=Z(!1),u=g=>{c.value=!1,l("updated",g),a()},d=j(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId})),h=Z(null),f=g=>{g.key==="Escape"&&o.value&&a()};return vn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.addEventListener("keydown",f)}),Yn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.removeEventListener("keydown",f)}),Fa("bulkUpdate",!0),(g,m)=>(K(),Ce("div",{ref_key:"mainRef",ref:h},[ye(pt,{ref_key:"triggerRef",ref:s,variant:e.variant,loading:c.value},{default:Se(()=>[ye(gt,{src:"Square",class:"icon"}),m[2]||(m[2]=ut(" Status ",-1))]),_:1},8,["variant","loading"]),we("div",{ref_key:"popupRef",ref:o},[J(r)?(K(),Xe(jP,xn({key:0},d.value,{onUpdated:u,onCancel:J(a),onStartUpdate:m[0]||(m[0]=y=>c.value=!0),onError:m[1]||(m[1]=y=>c.value=!1)}),null,16,["onCancel"])):ot("",!0)],512)],512))}}),YC=Ap("bulkUpdate",()=>{const e=Ao({loaded:0,total:0}),t=u=>{e.total=u},n=u=>{e.loaded=u},i=Ao({isBulkUpdating:!1});function o(u){i.isBulkUpdating=u}const s=Z({}),r=u=>{s.value=u},a=(u,d)=>{s.value[u]=d},l=Z(0);return{bulkUpdateState:i,setIsBulkUpdating:o,selectionIds:s,setSelectionIds:r,setCheckedForId:a,setSelectionStatus:u=>{l.value=u},selectionStatus:l,rowCount:e,setTotalRowCount:t,setLoadedRowCount:n}}),J8=Ct(lt({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=YC(),{selectionStatus:r}=nr(s),a=j(()=>i.selectRowData.map(x=>x.id));Fa("bulkUpdate",!0);const l=({itemIds:x,data:P})=>{const N=i.gridApi;x.forEach(G=>{if(!N){console.error("Grid API is undefined");return}const ie=N.getRowNode(G);if(ie){const B={...ie.data,status:P};ie.setData(B)}})},c=({itemIds:x,data:P})=>{const N=i.gridApi;x.forEach(G=>{if(!N){console.error("Grid API is undefined");return}const ie=N.getRowNode(G);if(ie){const B={...ie.data,dateRange:P};ie.setData(B)}})},u=["primary"],d=[{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],h=()=>{o("unselect")},f=zC(),{userPermissions:g}=nr(f),m=j(()=>g.value.includes(UC)),y=()=>{const P=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${i.selectRowData.map(N=>N.id).join(",")}`;window.open(P,"_blank")},b=x=>{const{assignees:P,type:N}=x,G=i.gridApi;if(!G){console.error("Grid API is not available for bulk update.");return}i.selectRowData.map(B=>{const H=G.getRowNode(B.id);if(!H)return null;const X=H.data.assignees||[];let $=[];switch(N){case"add":{const ce=new Set(X.map(De=>De.id)),ue=P.filter(De=>!ce.has(De.id));$=[...X,...ue];break}case"overwrite":{$=P;break}case"remove":{const ce=new Set(P.map(ue=>ue.id));$=X.filter(ue=>!ce.has(ue.id));break}case"removeAll":{$=[];break}}return{...H.data,assignees:$}}).filter(B=>B!==null).forEach(B=>{const H=G.getRowNode(B.id);H&&H.setData(B)})},{apiServices:S}=po(!1,i),F=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk delete.");return}const N=await((G=S.value)==null?void 0:G.bulkDeleteItems(String(i.workspaceId),x));(N==null?void 0:N.message)=="Done"&&(x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,isDeleted:!0,disabled:!0};B.setData(H)}}),P.deselectAll())},C=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id);if(!i.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const N=await((G=S.value)==null?void 0:G.bulkUnarchiveItems(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to unarchive items.");return}E(x,"isArchived",!1)},R=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id);if(!i.gridApi){console.error("Grid API is not available for bulk archive.");return}const N=await((G=S.value)==null?void 0:G.bulkArchiveItems(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to archive items.");return}E(x,"isArchived",!0)},E=(x,P,N)=>{const G=i.gridApi;if(!G){console.error("Grid API is not available for bulk update.");return}const ie=x.map(B=>{const H=G.getRowNode(B);if(H){const X={...H.data,[P]:N};H.setData(X)}return H}).filter(B=>B!=null);G.redrawRows({rowNodes:ie})},_=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk thumbnail deletion.");return}const N=await((G=S.value)==null?void 0:G.deleteThumbnail(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to delete thumbnails.");return}x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,thumbnail:null};B.setData(H)}})},I=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk rendition deletion.");return}const N=await((G=S.value)==null?void 0:G.deleteRendition(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to delete renditions.");return}x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,rendition:null};B.setData(H)}})},O=Z(!1),k=async x=>{O.value=!0,x.id==="unarchive"?await C():x.id==="delete"?await F():x.id==="archive"?await R():x.id==="delete-thumbnail"?await _():x.id==="delete-rendition"&&await I(),qt(()=>{O.value=!1})};return(x,P)=>nt((K(),Ce("div",{class:z(x.$style["bulk-update-action"])},[we("div",{class:z(x.$style["left-actions"])},[we("div",{class:z(x.$style["selection-track"])},[ye(pt,{variant:["icon","tertiary"],onClick:h},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1}),J(r)==1?(K(),Ce("span",{key:0,class:z(x.$style["selected-count"])},bt(e.selectRowData.length)+" selected ",3)):ot("",!0),J(r)==2?(K(),Ce("span",{key:1,class:z(x.$style["selected-count"])}," All in "+bt(e.takeName),3)):ot("",!0),we("span",{class:z(x.$style.divider)},null,2)],2),ye(X8,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),ye(G8,{onUpdate:b,ids:a.value,"workspace-id":e.workspaceId,variant:u,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),ye(Z8,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:c},null,8,["ids","workspace-id","entity-id"]),we("span",{class:z(x.$style.divider)},null,2),m.value?nt((K(),Xe(pt,{key:0,class:z(x.$style["action-button"]),variant:[...u,"icon"],onClick:y},{default:Se(()=>[ye(gt,{src:"PenRuler",class:z(x.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant"])),[[J(n),{content:"Open in Review"}]]):ot("",!0),we("span",{class:z(x.$style.divider)},null,2),ye(UP,{placement:"top-end"},{trigger:Se(({open:N})=>[nt((K(),Xe(pt,{actived:N,class:z(x.$style["action-button"]),variant:[...u,"icon"],loading:O.value},{default:Se(()=>[ye(gt,{src:"EllipsisVertical",class:z(x.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["actived","class","variant","loading"])),[[J(n),{content:"More actions"}]])]),content:Se(({visible:N,closeDropdown:G})=>[(K(),Ce(kt,null,Un(d,ie=>ye(Op,xn({key:ie.id,selected:!1},{ref_for:!0},ie,{show:N,onSelect:()=>{k(ie),G()}}),null,16,["show","onSelect"])),64))]),_:1})],2)],2)),[[as,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_o4psi_1","left-actions":"_left-actions_o4psi_19","right-actions":"_right-actions_o4psi_20","selection-track":"_selection-track_o4psi_25","close-icon":"_close-icon_o4psi_30","selected-count":"_selected-count_o4psi_34",divider:"_divider_o4psi_37","more-button":"_more-button_o4psi_42",dropdown:"_dropdown_o4psi_46","dropdown-content":"_dropdown-content_o4psi_49",delete:"_delete_o4psi_72","icon-btn":"_icon-btn_o4psi_79","selected-list":"_selected-list_o4psi_83"}}]]),Ya=Ct(lt({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=ls,n=yn,i=e,o=j(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:i.value===void 0||i.value===null||i.value==="",clickable:!0})),{argsMain:s}=ir(o),r=j(()=>{var l,c,u;return!!((l=i.params)!=null&&l.api||(c=i.params)!=null&&c.node||(u=i.params)!=null&&u.context)}),a=j(()=>i.value===void 0);return(l,c)=>nt((K(),Xe(or,Wm(mf(J(s))),{default:Se(()=>[we("span",{class:z(l.$style["item-table-label-renderer"])},bt(i.value||"-"),3)]),_:1},16)),[[J(t),{isLoading:a.value||!r.value}],[J(n),i.tooltip?i.tooltip:{content:void 0}]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),Q8=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const eK=Object.prototype.toString,tK=e=>eK.call(e)==="[object Object]",Mp=()=>{};function ZC(e){return Array.isArray(e)?e:[e]}function nK(e,t,n){return ct(e,t,{...n,immediate:!0})}const KP=Q8?window:void 0;function wd(e){var t;const n=wa(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function XC(...e){const t=(i,o,s,r)=>(i.addEventListener(o,s,r),()=>i.removeEventListener(o,s,r)),n=j(()=>{const i=ZC(wa(e[0])).filter(o=>o!=null);return i.every(o=>typeof o!="string")?i:void 0});return nK(()=>{var i,o;return[(i=(o=n.value)===null||o===void 0?void 0:o.map(s=>wd(s)))!==null&&i!==void 0?i:[KP].filter(s=>s!=null),ZC(wa(n.value?e[1]:e[0])),ZC(J(n.value?e[2]:e[1])),wa(n.value?e[3]:e[2])]},([i,o,s,r],a,l)=>{if(!(i!=null&&i.length)||!(o!=null&&o.length)||!(s!=null&&s.length))return;const c=tK(r)?{...r}:r,u=i.flatMap(d=>o.flatMap(h=>s.map(f=>t(d,h,f,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function qP(e,t,n={}){const{window:i=KP,ignore:o=[],capture:s=!0,detectIframe:r=!1,controls:a=!1}=n;if(!i)return a?{stop:Mp,cancel:Mp,trigger:Mp}:Mp;let l=!0;const c=y=>wa(o).some(b=>{if(typeof b=="string")return Array.from(i.document.querySelectorAll(b)).some(S=>S===y.target||y.composedPath().includes(S));{const S=wd(b);return S&&(y.target===S||y.composedPath().includes(S))}});function u(y){const b=wa(y);return b&&b.$.subTree.shapeFlag===16}function d(y,b){const S=wa(y),F=S.$.subTree&&S.$.subTree.children;return F==null||!Array.isArray(F)?!1:F.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const h=y=>{const b=wd(e);if(y.target!=null&&!(!(b instanceof Element)&&u(e)&&d(e,y))&&!(!b||b===y.target||y.composedPath().includes(b))){if("detail"in y&&y.detail===0&&(l=!c(y)),!l){l=!0;return}t(y)}};let f=!1;const g=[XC(i,"click",y=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(y))},{passive:!0,capture:s}),XC(i,"pointerdown",y=>{const b=wd(e);l=!c(y)&&!!(b&&!y.composedPath().includes(b))},{passive:!0}),r&&XC(i,"blur",y=>{setTimeout(()=>{var b;const S=wd(e);((b=i.document.activeElement)===null||b===void 0?void 0:b.tagName)==="IFRAME"&&!(S!=null&&S.contains(i.document.activeElement))&&t(y)},0)},{passive:!0})].filter(Boolean),m=()=>g.forEach(y=>y());return a?{stop:m,cancel:()=>{l=!1},trigger:y=>{l=!0,h(y),l=!1}}:m}const iK=["placeholder","maxlength"],oK={key:0,class:"wrapper-suffix"},YP=Ct(lt({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const i=ls,o=yn,s=e,r=n,a=Z(s.value),l=Z(null),c=Z(null),u=j(()=>{var R;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:((R=s.value)==null?void 0:R.length)===0,inputRef:l,wrapperRef:c,clickable:!0}}),{argsMain:d,isFocus:h}=ir(u),f=R=>{const E=document.createElement("div");return E.textContent=R,E.innerHTML},g=R=>{h.value=!1,C.value=a.value,r("update:value",a.value)},m=R=>{if(!h.value||!l.value)return;const E=f(l.value.value);r("update:value",E),r("enter",E),h.value=!1},y=R=>{var E;if(R.ctrlKey&&R.key=="a"||R.key=="A"){(E=l.value)==null||E.select();return}R.key==="Enter"?(R.preventDefault(),m()):R.key==="Escape"&&(R.preventDefault(),g())},b=()=>{a.value=s.value,h.value=!0,qt(()=>{var R;(R=l.value)==null||R.focus()})},S={focus:()=>{var R;h.value=!0,(R=l.value)==null||R.focus()}};vn(()=>{const R=c.value.$el;R&&(R.__sceneNameEditor=S)}),Yn(()=>{const R=c.value;R&&delete R.__sceneNameEditor}),t({focus:()=>{b()}});const F=j(()=>s.value===void 0),C=Z(s.value||"");return qP(c,R=>{h.value&&m()}),(R,E)=>nt((K(),Xe(J(or),xn(J(d),{ref_key:"wrapperRef",ref:c}),Su({default:Se(()=>[J(h)?ot("",!0):_t(R.$slots,"default",{key:0},()=>[nt((K(),Ce("span",{class:z(R.$style["label-renderer"])},[ut(bt(C.value),1)],2)),[[J(o),{content:C.value||void 0}]])]),nt(we("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":E[0]||(E[0]=_=>C.value=_),class:z(R.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:y},null,42,iK),[[as,J(h)],[PR,C.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:Se(({hovered:_,focused:I})=>[_||I?(K(),Ce("div",oK,[_&&!I?nt((K(),Xe(J(pt),{key:0,variant:["icon","secondary"],size:24,onClick:rn(b,["prevent","stop"])},{default:Se(()=>[ye(J(gt),{src:"Pen",source:"remote"})]),_:1})),[[J(o),"Edit"]]):I?nt((K(),Xe(J(pt),{key:1,variant:["icon","tertiary","danger"],size:24,onMousedown:rn(g,["prevent"])},{default:Se(()=>[ye(J(gt),{src:"XMarkSolid",source:"remote"})]),_:1})),[[J(o),"Cancel"]]):ot("",!0)])):ot("",!0)]),key:"0"}:void 0]),1040)),[[J(i),{isLoading:F.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]);/*! js-cookie v3.0.5 | MIT */function Lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var sK={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function JC(e,t){function n(o,s,r){if(!(typeof document>"u")){r=Lp({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],r={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(r[u]=e.read(c,u),o===u)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:i,remove:function(o,s){n(o,"",Lp({},s,{expires:-1}))},withAttributes:function(o){return JC(this.converter,Lp({},this.attributes,o))},withConverter:function(o){return JC(Lp({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ZP=JC(sK,{path:"/"});const rK=["href"],XP=Ct(lt({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=sessionStorage.getItem("ws.code"),i=sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com",o=yn,s=ls,r=e,a=t,l=Z(r.value),c=Z(r.value),u=Z(null),d=Z(null),h=Hi("bulkUpdate",!1),{apiServices:f}=po(!h,r),g=j(()=>{var I;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((I=l==null?void 0:l.value)==null?void 0:I.length)===0,inputRef:u,wrapperRef:d,clickable:!0}}),{isFocus:m}=ir(g),y=j(()=>{const I=n||r.workspaceId;return Vo({type:"scene_hub",config:{baseDomain:i,ws_code:I,scene_id:String(r.id)}}).url}),b=j(()=>{var I,O,k;return((I=r.data)==null?void 0:I.isDeleted)==!0||((k=(O=r.data)==null?void 0:O.isProcessing)==null?void 0:k.length)>0}),S=j(()=>{var I;return(I=r.data)==null?void 0:I.isProcessing}),F=j(()=>{var I;return((I=r.data)==null?void 0:I.isArchived)==1}),C=j(()=>r.value===void 0),R=async I=>{var O,k,x,P;l.value=I,m.value=!1;try{const N=await((k=(O=f.value)==null?void 0:O.updateSceneName)==null?void 0:k.call(O,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:l.value})),G=ZP.get(TF)||"UTC";if(N){const ie=kF(N,G),B={...r.data,...ie};(P=(x=r.params)==null?void 0:x.node)==null||P.setData(B),c.value=l.value,a("enter")}else l.value=c.value}catch(N){console.error("Failed to update scene name:",N),l.value=c.value}},E={focus:()=>{m.value=!0,setTimeout(()=>{var I;return(I=d.value)==null?void 0:I.focus()},0)}},_=()=>d.value?"$el"in d.value?d.value.$el:d.value:null;return ct(()=>r.value,I=>{l.value=I,c.value=I}),vn(()=>{const I=_();I&&(I.__sceneNameEditor=E)}),Yn(()=>{const I=d.value,O=I&&"$el"in I?I.$el:I;O&&delete O.__sceneNameEditor}),(I,O)=>nt((K(),Xe(YP,{"save-on-blur":!0,ref_key:"wrapperRef",ref:d,disabled:r.disabled,"read-only":r.readOnly,placeholder:r.placeholder,value:l.value,"onUpdate:value":O[0]||(O[0]=k=>l.value=k),id:`scene-name-${r.id}`,onEnter:R,"max-length":25},{default:Se(()=>[nt(we("div",{class:z(I.$style["scene-name-display"])},[nt((K(),Ce("a",{href:y.value,target:"_blank",class:z(I.$style["scene-name-text"])},[ut(bt(l.value),1)],10,rK)),[[J(o),{content:l.value}]]),F.value?(K(),Ce("div",{key:0,class:z([I.$style["icon-processing"],I.$style.archived])},[ye(gt,{src:"BoxArchive",color:"#959595"})],2)):ot("",!0),b.value?nt((K(),Ce("div",{key:1,class:z([I.$style["icon-processing"],I.$style.processing])},[ye(gt,{src:"AnimatedHourglass",color:"#DE851A"})],2)),[[J(o),S.value]]):ot("",!0)],2),[[as,!J(m)]])]),_:1},8,["disabled","read-only","placeholder","value","id"])),[[J(s),{isLoading:C.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nlzfn_1","scene-name-display":"_scene-name-display_nlzfn_11","icon-processing":"_icon-processing_nlzfn_18",archived:"_archived_nlzfn_26",processing:"_processing_nlzfn_29","scene-name-text":"_scene-name-text_nlzfn_33"}}]]),aK=Ct(lt({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(o){n("select",o)}return(o,s)=>(K(),Ce("div",{class:z(o.$style["dropdown-list"])},[(K(!0),Ce(kt,null,Un(e.options,r=>(K(),Xe(Op,xn({key:r.value},{ref_for:!0},{...r},{"icon-name":r.icon,onClick:rn(a=>i(r.value),["stop","prevent"])}),{label:Se(()=>[ut(bt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(K(),Ce("div",{key:0,class:z(o.$style["empty-list"])}," No options available. ",2)):ot("",!0)],2))}}),[["__cssModules",{$style:{"dropdown-list":"_dropdown-list_1d2i1_1","empty-list":"_empty-list_1d2i1_8"}}]]),QC=Ct(lt({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const i=e,o=j(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),s=j(()=>{let g=[];return typeof i.variant=="string"?g.push(i.variant):Array.isArray(i.variant)&&(g=[...i.variant]),[...g,"icon"]}),r=n,{hide:a,isVisible:l,show:c,triggerRef:u,popupRef:d,instance:h}=Qs();function f(g){r("select",g),a()}return sf(()=>{h.value&&h.value.setProps({placement:i.placement})}),t({show:c,hide:a,popupRef:d}),(g,m)=>(K(),Ce("div",{class:z(g.$style["button-dropdown-wrapper"]),style:mn({"--button-size":o.value})},[we("div",{class:z(g.$style["button-group"])},[_t(g.$slots,"prefix"),we("div",{ref_key:"triggerRef",ref:u,class:z(J(l)?g.$style.open:"")},[_t(g.$slots,"triggerDropdown",{open:J(l)},()=>[i.readOnly?ot("",!0):(K(),Xe(pt,{key:0,actived:J(l),class:z(g.$style["button-dropdown-trigger"]),variant:s.value,size:e.size,disabled:i.disabled},{default:Se(()=>[_t(g.$slots,"iconDropdown",{},()=>[ye(gt,{class:z(g.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["actived","class","variant","size","disabled"]))])],2)],2),we("div",{ref_key:"popupRef",ref:d,class:z(g.$style["button-dropdown-list"])},[ye(aK,{options:e.options,onSelect:f,style:{width:"max-content"}},null,8,["options"])],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_12xlv_1","button-group":"_button-group_12xlv_7","overflow-elipsis":"_overflow-elipsis_12xlv_26","button-dropdown-list":"_button-dropdown-list_12xlv_33",show:"_show_12xlv_36","button-dropdown-item":"_button-dropdown-item_12xlv_39","icon-dropdown":"_icon-dropdown_12xlv_43",open:"_open_12xlv_46"}}]]),lK=Ct(lt({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=yn,n=ls,i=kD,o=e,{isEditing:s}=jC(o),r=Z(o.value),a=Z(null),l=Z(null),{apiServices:c}=po(!0,o),u=j(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:a,wrapperRef:l,clickable:!0,active:s})),{argsMain:d,isHover:h}=ir(u),f=j(()=>o.value===void 0),g=j(()=>{var C;return((C=r.value)==null?void 0:C.slice(0,o.maxVisible))||[]}),m=j(()=>{var C;return Math.max(0,(((C=r.value)==null?void 0:C.length)||0)-o.maxVisible)}),y=j(()=>{var C;return m.value<=0?"":((C=r.value)==null?void 0:C.slice(o.maxVisible).map(R=>R.name).join(", "))||""}),b=j(()=>g.value.map(C=>({id:C.id,name:C.name,initial:C.initial,avatarId:C.id,profile_image:C.profile_image,color:C.color,size:24,user:C}))),S=j(()=>({color:h.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"})),F=async C=>{var E;const R=o.workspaceId;return await((E=c.value)==null?void 0:E.getUserInformation(R,C))??void 0};return ct(()=>o.value,C=>{r.value=C},{immediate:!0,deep:!0}),(C,R)=>nt((K(),Xe(or,Wm(mf(J(d))),{default:Se(()=>{var E;return[we("div",{class:z(C.$style.assigneeGroupRenderer)},[(E=r.value)!=null&&E.length?ot("",!0):(K(),Xe(gt,{key:0,src:"UserPlus",source:"remote",style:mn(S.value)},null,8,["style"])),(K(!0),Ce(kt,null,Un(b.value,_=>nt((K(),Xe(Ku,{key:_.id,readOnly:!0,class:z(C.$style["ib-assignee-avatar"]),name:_.name,initial:_.initial,id:`assignee-avatar-${_.avatarId}`,profile_image:_.profile_image,color:_.color,size:_.size},null,8,["class","name","initial","id","profile_image","color","size"])),[[J(i),{user:_.user,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:F}]])),128)),m.value>0?nt((K(),Ce("div",{key:1,class:z(C.$style["extra-avatars"])},[ut(" +"+bt(m.value),1)],2)),[[J(t),y.value]]):ot("",!0)],2)]}),_:1},16)),[[J(n),{isLoading:f.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_1tgm9_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_1tgm9_7","ib-assignee-avatar":"_ib-assignee-avatar_1tgm9_17","assignee-wrapper":"_assignee-wrapper_1tgm9_21","extra-avatars":"_extra-avatars_1tgm9_28"}}]]),cK=Ct(lt({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,E;const t=yn,n=ls,i=fC(),o=e,s=Z(null),r=Z(null),a=_=>{if(_){if(typeof _=="string")return _;if(_ instanceof Date)return _.toISOString()}},l=j(()=>o.value===void 0),c=j(()=>{var _;return(_=o.data)==null?void 0:_.isStarted}),u=j(()=>{var _;return(_=o.data)==null?void 0:_.isCompleted}),d=j(()=>!!(o.value&&(o.value[0]||o.value[1]))),h=j(()=>d.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),f=j(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:s,wrapperRef:r,clickable:!0})),{argsMain:g}=ir(f),{startDate:m,endDate:y,startClasses:b,endClasses:S,fullStartDate:F,fullEndDate:C}=K6({start:a((R=o.value)==null?void 0:R[0]),end:a((E=o.value)==null?void 0:E[1]),isStarted:c.value,isEnded:u.value,timezone:o.timezone||i});return(_,I)=>nt((K(),Xe(or,xn(J(g),{ref_key:"wrapperRef",ref:r}),{default:Se(()=>[l.value?ot("",!0):(K(),Ce("div",{key:0,class:z(_.$style.dateRangeRenderer)},[d.value?ot("",!0):(K(),Xe(gt,{key:0,src:"Calendar",class:z(_.$style.calendarIcon),color:h.value},null,8,["class","color"])),d.value?(K(),Ce(kt,{key:1},[nt((K(),Ce("span",{class:z([_.$style.dateLabelDisplay,...J(b).map(O=>_.$style[O])])},[ut(bt(J(m)),1)],2)),[[J(t),J(F)]]),I[0]||(I[0]=we("span",null,"→",-1)),nt((K(),Ce("span",{class:z([_.$style.dateLabelDisplay,...J(S).map(O=>_.$style[O])])},[ut(bt(J(y)),1)],2)),[[J(t),J(C)]])],64)):ot("",!0)],2))]),_:1},16)),[[J(n),{isLoading:l.value,fullwidth:!0}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),uK=lt({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:fC()}},emits:["closed"],setup(e,{expose:t,emit:n}){const i=Z(null);vn(()=>{qt(()=>{i.value&&i.value.focus()})});const o=e,s=n,r=y=>`${tt.fromJSDate(y,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,a=async y=>{await m({startDate:y[0]?r(y[0]):null,dueDate:y[1]?r(y[1]):null})},l=async()=>{await m({startDate:null})},c=async()=>{await m({dueDate:null})},u=async y=>{await m({startDate:y?r(y):null})},d=async y=>{await m({dueDate:y?r(y):null})},h=async()=>{await m({startDate:null,dueDate:null})},f=Hi("bulkUpdate",!1),{apiServices:g}=po(!f,o),m=async y=>{var b,S,F,C,R;try{const E=(b=i.value)==null?void 0:b.getValues(),_=await((F=(S=g.value)==null?void 0:S.changeDate)==null?void 0:F.call(S,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:y.startDate,dueDate:y.dueDate}));_!=null&&_.message&&((R=o.params)==null||R.node.setData({...(C=o.params)==null?void 0:C.node.data,dateRange:E==null?void 0:E.dateRange}))}catch(E){console.error("Failed to update scene name:",E)}};return t({focus:()=>{qt(()=>{var y;(y=i.value)==null||y.focus()})}}),(y,b)=>(K(),Xe(zP,xn(o,{onUpdate:a,"onUpdate:end":d,"onUpdate:start":u,onClearAll:h,onClearDue:c,onClearStart:l,onClosed:b[0]||(b[0]=S=>s("closed")),ref_key:"calendarRef",ref:i}),null,16))}}),dK=Ct(lt({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=Z(null),i=Z(0);let o=null;vn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),o.observe(n.value))}),Ll(()=>{o&&n.value&&o.unobserve(n.value)});const s=j(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(K(),Ce("div",{class:z(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[we("div",{class:z(r.$style["item-header"])},[we("div",{class:z(r.$style["item-header__left"])},[_t(r.$slots,"header-left",{},()=>[we("h1",{class:z(r.$style["item-header__title"])},[_t(r.$slots,"title",{},()=>[a[0]||(a[0]=ut("Items",-1))])],2)])],2),we("div",{class:z(r.$style["item-header__spacer"])},null,2),we("div",{class:z(r.$style["item-header__actions"])},[_t(r.$slots,"header-actions")],2)],2),_t(r.$slots,"grid",{availableHeight:s.value}),we("div",{class:z(r.$style.footer)},[_t(r.$slots,"footer")],2),_t(r.$slots,"new-row"),_t(r.$slots,"bulk-update-actions"),_t(r.$slots,"snackbar"),_t(r.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1o9sg_1","item-header":"_item-header_1o9sg_15","item-header__left":"_item-header__left_1o9sg_23","item-header__title":"_item-header__title_1o9sg_28","item-header__spacer":"_item-header__spacer_1o9sg_33","item-header__actions":"_item-header__actions_1o9sg_36","main-content":"_main-content_1o9sg_42",sidebar:"_sidebar_1o9sg_49","is-open":"_is-open_1o9sg_65","sidebar-header":"_sidebar-header_1o9sg_69","sidebar-footer":"_sidebar-footer_1o9sg_70","sidebar-content":"_sidebar-content_1o9sg_90",footer:"_footer_1o9sg_95"}}]]),JP=Ct(lt({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=j(()=>(n==null?void 0:n.workspaceId)||""),o=j(()=>(n==null?void 0:n.entityId)||""),s=m=>{const y=`scene-name-${n.id}`,b=document.getElementById(y);b.__sceneNameEditor&&b.__sceneNameEditor.focus()},{apiServices:r}=po(!0,n),a=j(()=>{var m;return{ws_code:i.value,entity_id:o.value,scene_id:n.id,axiosService:r,optionBlock:n.optionBlock,permissions:(m=n.data)==null?void 0:m.permissions}}),l=m=>{var b,S,F,C,R,E;let y=(S=(b=n.params)==null?void 0:b.api)==null?void 0:S.getRowNode(String(n.id));if(y){const _={...y.data,isDeleted:m==="deleted",isArchived:m==="archived"?!0:m==="unarchived"?!1:y.data.isArchived,disabled:!0};(C=(F=n.params)==null?void 0:F.api)==null||C.redrawRows({rowNodes:[y]}),y.setData(_),(E=(R=n.params)==null?void 0:R.api)==null||E.redrawRows({rowNodes:[y]})}},{options:c}=T8(a,l,s),u=t,d=m=>{var y,b;m.id!=="copy-link"&&((b=(y=n==null?void 0:n.params)==null?void 0:y.api)==null||b.stopEditing()),u("actionExecuted",m)},h=m=>{var y,b,S,F;return m=="archive"?!((b=(y=n.params)==null?void 0:y.data)!=null&&b.isArchived):m==="unarchive"?(F=(S=n.params)==null?void 0:S.data)==null?void 0:F.isArchived:!0},f=m=>m.map(y=>({...y,options:y.options.filter(b=>!b.hide)})),g=j(()=>f(c.value));return(m,y)=>(K(),Ce("div",{class:z([m.$style["more-option-section"],{[m.$style.submenu]:e.isSubmenu}])},[(K(!0),Ce(kt,null,Un(g.value,b=>(K(),Ce("div",{key:b.id,style:mn({"--g-number":Math.min(b.options.length,4)}),class:z([m.$style["option-block"],m.$style[b.type]])},[(K(!0),Ce(kt,null,Un(b.options,S=>nt((K(),Ce("div",{key:S.id,class:z(m.$style["option-item"])},[S.hide?ot("",!0):(K(),Xe(fK,{key:0,layer:n.layer,"scene-id":String(n.id),option:S,type:b.type,onActionExecuted:d},null,8,["layer","scene-id","option","type"]))],2)),[[as,h(S.id)]])),128))],6))),128))],2))}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1xceh_1","option-block":"_option-block_1xceh_8","option-item":"_option-item_1xceh_18",row:"_row_1xceh_22",column:"_column_1xceh_28",block:"_block_1xceh_32"}}]]),hK={key:0},fK=Ct(lt({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=yn,i=e,o=Z(!1),s=Z(!1),r=(C,R)=>{if(!R){h();return}const E=R.target;E.closest(".tippy-content")||E.closest(".tippy-box")||E.closest("[data-tippy-root]")||E.closest(".option-item")||h()},a=Z(null),{triggerRef:l,popupRef:c,show:u,isVisible:d,hide:h}=Qs({interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:r,appendTo:a.value||void 0}),f=t,g=async C=>{var R,E;if(!s.value){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(_){console.error("Action execution failed:",_)}finally{s.value=!1,o.value=!1}}},m=async C=>{var R,E;if(C.preventDefault(),C.stopPropagation(),!s.value){if(i.option.isDanger){o.value=!o.value;return}if(!i.option.subMenu){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(_){console.error("Action execution failed:",_)}finally{s.value=!1}return}qt(()=>{d.value?h():u()})}},y=C=>{f("actionExecuted",C),h()},b=C=>{C.key==="Escape"?h():(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m(C))},S=C=>({row:"small",column:"large",block:"small"})[C]||"large",F=C=>{const R=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...R],column:["menu-item",...R],block:["secondary",...R]}[C]||[]};return(C,R)=>{var E;return K(),Ce("div",{ref_key:"wrapperRef",ref:a,class:z(C.$style["option-item-wrapper"])},[nt((K(),Xe(pt,{ref_key:"triggerRef",ref:l,class:z(C.$style["option-item"]),disabled:e.option.disabled||s.value,actived:J(d)||o.value,size:S(e.type),variant:F(e.type),tabindex:"0",onClick:rn(m,["stop","prevent"]),onKeydown:b},{prefix:Se(()=>[e.option.icon?nt((K(),Xe(gt,{key:0,src:e.option.icon,source:"remote"},null,8,["src"])),[[J(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):ot("",!0)]),suffix:Se(()=>[e.option.subMenu?(K(),Xe(gt,{key:0,src:"Play",source:"remote"})):ot("",!0),e.option.isDanger&&o.value?(K(),Ce("div",{key:1,class:z(C.$style["confirm-action"])},[nt((K(),Xe(pt,{variant:["tertiary","icon","danger"],size:"small",onClick:R[0]||(R[0]=rn(_=>o.value=!1,["stop","prevent"]))},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[J(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),nt((K(),Xe(pt,{variant:["danger","primary","icon"],size:"small",onClick:rn(g,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[J(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):ot("",!0)]),default:Se(()=>[e.option.label?(K(),Ce("span",hK,bt(e.option.label),1)):ot("",!0)]),_:1},8,["class","disabled","actived","size","variant"])),[[J(n),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,trigger:"mouseenter focus"}]]),e.option.subMenu?(K(),Ce("div",{key:0,ref_key:"popupRef",ref:c,class:z(C.$style["submenu-container"])},[ye(JP,{layer:i.layer+1,ref:"submenuRef","option-block":[((E=e.option)==null?void 0:E.subMenu)||[]],"is-submenu":!1,onActionExecuted:y},null,8,["layer","option-block"])],2)):ot("",!0)],2)}}}),[["__cssModules",{$style:{"option-item":"_option-item_82ug7_1","icon-wrapper":"_icon-wrapper_82ug7_11","confirm-action":"_confirm-action_82ug7_19"}}]]);var Cc=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Cc||{});const pK=["width","height","viewBox"],gK=["d"],mK="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",vK=lt({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=Z(n.modelValue??0),s=j(()=>{var b;return((b=n.params)==null?void 0:b.size)??40}),r=j(()=>{var b;return((b=n.params)==null?void 0:b.iconViewBox)??"0 0 24 24"}),a=j(()=>{var b;return((b=n.params)==null?void 0:b.iconPath)??mK}),l=j(()=>{var b;return((b=n.params)==null?void 0:b.wrapperTag)??"span"}),c=j(()=>{var b;return n.disabled||((b=n.params)==null?void 0:b.disabled)||!1}),u=j(()=>{var b;return n.readOnly||((b=n.params)==null?void 0:b.readOnly)||!1}),d=j(()=>!c.value&&!u.value),h=j(()=>c.value?"not-allowed":u.value?"default":"pointer");ct(()=>n.modelValue,b=>{typeof b=="number"&&b!==o.value&&(o.value=b)});const f=b=>{var S;return((S=n.params)==null?void 0:S.maxRating)-b+1<=o.value},g=b=>{d.value&&y(b)},m=b=>{d.value&&y(b)},y=b=>{var F,C;if(!d.value)return;const S=((F=n.params)==null?void 0:F.maxRating)-b+1;o.value=S,i("update:modelValue",S),i("update",S),i("change",S),(C=n.params)!=null&&C.onUpdate&&n.params.onUpdate(S)};return(b,S)=>(K(),Ce("div",{class:z(["rating-component",{"rating-component--disabled":c.value,"rating-component--readOnly":u.value}])},[(K(!0),Ce(kt,null,Un(e.params.maxRating,F=>(K(),Xe(jN(l.value),{key:F,class:z(["rating-item",{filled:f(F),"rating-item--disabled":c.value,"rating-item--readOnly":u.value}]),style:mn({cursor:h.value,order:e.params.maxRating-F,height:s.value+"px",width:s.value+"px"}),"aria-checked":f(F),"aria-disabled":c.value,"aria-readOnly":u.value,tabindex:c.value?-1:0,onClick:rn(C=>g(F),["prevent","stop"]),onKeyup:[IR(rn(C=>m(F),["prevent"]),["enter"]),IR(rn(C=>m(F),["prevent"]),["space"])]},{default:Se(()=>[_t(b.$slots,"icon",{index:F,filled:f(F),size:s.value,iconViewBox:r.value,disabled:c.value,readOnly:u.value},()=>[(K(),Ce("svg",{class:"rating-icon",width:s.value,height:s.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[we("path",{d:a.value},null,8,gK)],8,pK))]),_t(b.$slots,"overlay",{index:F,filled:f(F),disabled:c.value,readOnly:u.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),yK={key:2},Np=14,CK=Ct(lt({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=ls,i=yn,o=e,s=Z(Number(o.value)),r=U0(!1),a=Z(null),l=Z(null),c=j(()=>o.value),u=j(()=>{var G,ie;const P=c.value=="N/A"||c.value===null||c.value===void 0||String(c.value).length===0,N=!!o.error;return{pendingCalculation:c.value=="N/A",isEmpty:P,isError:N,hasPrefix:!P&&!N&&d.value.morpheme_type==="prefix",hasSuffix:!P&&!N&&d.value.morpheme_type==="suffix",isDropdown:d.value.format_type==="dropdown",isFormula:((ie=(G=d.value)==null?void 0:G.metric_type)==null?void 0:ie.code)==="formula",isLoading:c.value===void 0,isRating:d.value.format_type==="icon"&&d.value.format_type=="icon"}}),d=j(()=>{var P,N;return{...(N=(P=o.params)==null?void 0:P.colDef)==null?void 0:N.context}}),h=j(()=>o.value===void 0),f=j(()=>{if(u.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(u.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(u.value.isEmpty)return;const P=R.value,N=d.value.morpheme_type;return N==="prefix"?`${d.value.morpheme_value||""} ${P}`.trim():N==="suffix"?`${P} ${d.value.morpheme_value||""}`.trim():`${P}`}),g=j(()=>(d.value.format_symbol||"").split(/[\s-_]+/).map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join("").replace(/Outline|Solid/g,"")),m=j(()=>{const{format_type:P,format_value:N}=d.value;if(P==="dropdown"&&typeof N=="string"&&N.startsWith("["))try{return JSON.parse(N)}catch{return[]}return[]}),y=j(()=>u.value.isError?"var(--error-color, #d32f2f)":"var(--grey-300)"),b=j(()=>r.value&&!u.value.isEmpty&&!o.disabled&&!u.value.isRating),S=j(()=>({disabled:o.disabled,error:u.value.isError,inputRef:a,wrapperRef:l,clickable:!0,readOnly:!0,isEmpty:u.value.isEmpty})),{argsMain:F,isHover:C}=ir(S),R=j(()=>{if(u.value.isEmpty)return"";if(u.value.pendingCalculation)return"pending";const P=o.value,{format_type:N,format_value:G,mapping:ie}=d.value;if(ie&&typeof ie=="object"&&!Array.isArray(ie)){const H=ie[`!${P}`];if(H)return H}if(N==="dropdown"){const H=m.value.find(X=>String(X.name)===String(P));if(H)return H.name}if(typeof P=="string"&&Number.isNaN(Number(P)))return P;const B=Number.parseInt(String(G)||"2",10)||2;try{return Number(P).toFixed(B)}catch(H){return console.error("Error formatting metric value:",H),String(P)}}),E=j(()=>({content:I.value,hideOnClick:!1,contentClass:"extra-padding"})),{copyToClipboard:_,tooltip:I}=pC(R.value),O=j(()=>({maxRating:d.value.range||5,readOnly:o.readOnly,disabled:o.disabled,size:Np}));ct(()=>o.value,P=>{const N=Number(P);Number.isFinite(N)&&N!==s.value?s.value=N:P==null&&s.value!==0&&(s.value=0)},{immediate:!0});const k=()=>{o.disabled||(r.value=!0)},x=()=>{r.value=!1};return(P,N)=>u.value.isRating?nt((K(),Xe(vK,{key:0,modelValue:s.value,"onUpdate:modelValue":N[0]||(N[0]=G=>s.value=G),params:O.value,readOnly:!1,disabled:o.disabled},{icon:Se(()=>[ye(gt,{source:"rating",src:g.value||"Star",size:Np},null,8,["src"])]),_:1},8,["modelValue","params","disabled"])),[[J(n),{isLoading:h.value}]]):nt((K(),Xe(or,xn({key:1},J(F),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:x,ref_key:"wrapperRef",ref:l}),Su({default:Se(()=>[nt((K(),Ce("div",{class:z(P.$style["metric-wrapper"])},[we("div",{class:z([P.$style["metric-content"],o.disabled?P.$style.disabled:""])},[!u.value.isError&&u.value.isEmpty?(K(),Ce(kt,{key:0},[u.value.isDropdown?(K(),Xe(gt,{key:0,src:"ChevronDown",source:"remote",size:12,style:{width:"20px"},color:"var(--grey-300)"})):u.value.isFormula?(K(),Xe(gt,{key:1,src:"SquareRootVariable",source:"remote",size:Np,color:y.value},null,8,["color"])):ot("",!0),u.value.pendingCalculation?(K(),Ce("span",{key:2,class:z(P.$style["metric-empty"])}," Pending ",2)):u.value.isDropdown?ot("",!0):(K(),Ce("span",{key:3,class:z(P.$style["metric-empty"])}," - ",2))],64)):u.value.isFormula?(K(),Xe(gt,{key:1,src:"SquareRootVariable",source:"remote",size:Np,color:y.value},null,8,["color"])):ot("",!0),u.value.isError?(K(),Ce("div",yK,"Error")):ot("",!0),!u.value.isEmpty&&!u.value.isError?(K(),Ce(kt,{key:3},[u.value.hasPrefix?(K(),Ce("span",{key:0,class:z([P.$style["metric-morpheme"],P.$style["metric-morpheme--prefix"]])},bt(d.value.morpheme_value),3)):ot("",!0),we("span",{class:z([P.$style["metric-value"],J(C)?P.$style.hovered:"",{[P.$style["with-morpheme"]]:u.value.hasPrefix||u.value.hasSuffix,[P.$style["with-formula-icon"]]:u.value.isFormula,[P.$style.disabled]:o.disabled}])},bt(R.value),3),u.value.hasSuffix?(K(),Ce("span",{key:1,class:z([P.$style["metric-morpheme"],P.$style["metric-morpheme--suffix"]])},bt(d.value.morpheme_value),3)):ot("",!0)],64)):ot("",!0)],2)],2)),[[J(i),{content:f.value,bypassOverflowCheck:!1}]])]),_:2},[J(C)&&!o.disabled?{name:"suffix",fn:Se(()=>[we("div",{class:z([P.$style.suffix,"wrapper-suffix"])},[b.value&&!u.value.isEmpty&&!u.value.isError?nt((K(),Xe(pt,{key:0,variant:["icon","secondary"],size:24,onClick:rn(J(_),["prevent","stop"])},{default:Se(()=>[ye(gt,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[J(i),E.value]]):ot("",!0)],2)]),key:"0"}:void 0]),1040)),[[J(n),{isLoading:h.value}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_tcd7x_1","metric-content":"_metric-content_tcd7x_5",disabled:"_disabled_tcd7x_15","metric-value":"_metric-value_tcd7x_19",hovered:"_hovered_tcd7x_19","with-morpheme":"_with-morpheme_tcd7x_34","with-formula-icon":"_with-formula-icon_tcd7x_37","metric-value--number":"_metric-value--number_tcd7x_43","metric-value--currency":"_metric-value--currency_tcd7x_43","metric-value--percentage":"_metric-value--percentage_tcd7x_43","metric-morpheme":"_metric-morpheme_tcd7x_47","metric-empty":"_metric-empty_tcd7x_60","metric-icon":"_metric-icon_tcd7x_67"}}]]),wK=Ct(lt({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=yn,i={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},o={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},s={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default"},c=j(()=>{var O,k;if(a.headerType)return a.headerType;if(((k=(O=a.params)==null?void 0:O.column)==null?void 0:k.getColId()).includes("metric"))return"default";const I=a.headerType??a.params.column.getColId();return l[I]||"default"}),u=j(()=>{var _;return((_=a.params)==null?void 0:_.displayName)??""}),d=j(()=>{let _=[];switch(c.value){case"dateRange":_=Object.values(i).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;case"date":_=Object.values(o).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;case"number":_=Object.values(s).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;default:_=Object.values(r).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break}return f.value!=="none"&&_.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:C.value=="none"}),_}),h=j(()=>String(f.value).endsWith("asc")?"SortUp":String(f.value).endsWith("desc")?"SortDown":"Sort"),f=Z(a.modelValue??"none"),g=_=>{S("update:modelValue",_),S("sort-changed",_)},m=_=>{f.value=_},y=Ho(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let _;f.value==="none"?_="asc":f.value==="asc"?_="desc":_="none",f.value=_}else{const _=[i.START_ASC.value,i.START_DESC.value,i.DUE_ASC.value,i.DUE_DESC.value,"none"],O=(_.indexOf(f.value)+1)%_.length;f.value=_[O]}},300),b=j(()=>{if(f.value==="none")return"No sorting applied";const _=d.value.find(I=>I.value===f.value);return(_==null?void 0:_.label)||""}),S=t,F=j(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(f.value!=="none")return"var(--primary-color-hover)"});ct(()=>a.modelValue,_=>{_!=f.value&&(f.value=_)}),ct(f,_=>{_!==a.modelValue&&g(_)});const C=Z(f.value);ct(()=>f.value,_=>{C.value=_});const R=_=>{var x,P;if(a.readOnly||a.disabled)return;let I=0;_.key==="ArrowDown"?I=1:_.key==="ArrowUp"&&(I=-1);const O=d.value.findIndex(N=>N.value===C.value),k=d.value.length;if(_.key==="Enter"||_.key===" ")_.preventDefault(),f.value=C.value,(x=E.value)==null||x.hide();else if(I!==0){_.preventDefault();let N=(O+I+k)%k;C.value=d.value[N].value}else _.key==="Escape"&&((P=E.value)==null||P.hide())},E=Z(null);return vn(()=>{var _,I;(I=(_=E.value)==null?void 0:_.$el)==null||I.addEventListener("keydown",R)}),Ll(()=>{var _,I;(I=(_=E.value)==null?void 0:_.$el)==null||I.removeEventListener("keydown",R)}),(_,I)=>(K(),Xe(QC,{ref_key:"dropdownRef",ref:E,options:d.value,label:u.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:J(y),onSelect:I[0]||(I[0]=O=>m(O))},{prefix:Se(()=>[ye(pt,{variant:["text"],onClick:J(y),label:u.value,size:"small"},null,8,["onClick","label"])]),iconDropdown:Se(()=>[nt(ye(gt,{src:h.value,source:"remote",color:F.value},null,8,["src","color"]),[[J(n),b.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{iconSorting:"_iconSorting_18bqx_1","button-group":"_button-group_18bqx_7","ab-table-button":"_ab-table-button_18bqx_18","button-main":"_button-main_18bqx_24","button-dropdown-trigger":"_button-dropdown-trigger_18bqx_29",headerSorting:"_headerSorting_18bqx_39"}}]]),bK=["disabled","readonly","checked","indeterminate"],ew=Ct(lt({__name:"Checkbox",props:{modelValue:{type:[Number,Boolean]},disabled:{type:Boolean},readOnly:{type:Boolean},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=j(()=>i.allowIndeterminate?[0,1,2]:[0,2]),r=j(()=>{if(typeof i.tooltipText=="string"||!i.tooltipText)return i.tooltipText||"";switch(l.value){case 0:return i.tooltipText.unchecked;case 1:return i.tooltipText.indeterminate;case 2:return i.tooltipText.checked;default:return""}}),a=()=>{if(u.value)return;const h=(s.value.indexOf(l.value)+1)%s.value.length;l.value=s.value[h]},l=Z(typeof i.modelValue=="boolean"?i.modelValue?2:0:i.modelValue),c=j(()=>({checked:l.value===2,indeterminate:l.value===1,none:l.value===0})),u=j(()=>i.disabled||i.readOnly);return ct(()=>l.value,d=>{o("update:modelValue",d===2)}),(d,h)=>nt((K(),Ce("input",{disabled:i.disabled,key:l.value,readonly:i.readOnly,type:"checkbox",class:z([d.$style["input-checkbox"],d.$style[i.size||"medium"]]),checked:c.value.checked,indeterminate:c.value.indeterminate,onChange:a,"aria-label":"Select All Items"},null,42,bK)),[[J(n),{content:r.value,hideOnClick:!1,contentClass:"extra-padding"}]])}}),[["__cssModules",{$style:{small:"_small_p7d2l_68",large:"_large_p7d2l_72",medium:"_medium_p7d2l_76"}}]]),SK=Ct(lt({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=yn,i=YC(),{setSelectionStatus:o}=i,{rowCount:s}=nr(i),r=Z(0);ct(r,S=>{o(r.value)},{immediate:!0});const a=j(()=>r.value!==0),l=j(()=>({checked:r.value===2,indeterminate:r.value===1,UNCHECK:r.value===0})),c=j(()=>({0:"Click to select check visible items",1:"Click to select All",2:"Click to clear selection"})[r.value]),u=j(()=>{const S=[{label:"All visible",value:"INDETERMINATE",type:"text",clickable:!0,selected:r.value===1,id:"indeterminate"},{label:"All",value:"CHECKED",type:"text",clickable:!0,selected:r.value===2,id:"checked"}];return a.value&&S.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,selected:r.value===0,id:"uncheck"}),S}),d=S=>({selected:S.getSelectedRows().length,total:s.value.total,loaded:s.value.loaded}),h=({api:S,state:F})=>{r.value=F,F===0?S==null||S.deselectAll():S==null||S.forEachNode(C=>C.setSelected(!0))},f=()=>{var C;const S=(C=t.params)==null?void 0:C.api;S||console.error("[HeaderCheckbox] There is no API available"),h({api:S,state:{0:1,1:2,2:0}[r.value]})},g=S=>{var R;const F=(R=t.params)==null?void 0:R.api;F||console.error("no api"),h({api:F,state:{INDETERMINATE:1,CHECKED:2,UNCHECK:0}[S]})},m=Ho(S=>{const{selected:F,total:C}=d(S);F===0?r.value=0:F===C?r.value=2:r.value=1},300);let y=[];vn(()=>{var R;const S=(R=t.params)==null?void 0:R.api;if(!S)return;const F=E=>m(E.api),C=()=>m(S);S.addEventListener("selectionChanged",F),S.addEventListener("rowDataUpdated",C),S.addEventListener("modelUpdated",C),y=[()=>S.removeEventListener("selectionChanged",F),()=>S.removeEventListener("rowDataUpdated",C),()=>S.removeEventListener("modelUpdated",C)]}),Yn(()=>{y.forEach(S=>S())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(S,F)=>(K(),Xe(QC,{options:u.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:Se(()=>[nt((K(),Xe(ew,{id:b,disabled:t.disabled,key:r.value,readonly:t.readOnly,type:"checkbox",checked:l.value.checked,indeterminate:l.value.indeterminate,modelValue:r.value,"onUpdate:modelValue":F[0]||(F[0]=C=>r.value=C),onChange:f,"aria-label":"Select CHECKED Items",class:z(S.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","class"])),[[J(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_1efbt_1","button-group":"_button-group_1efbt_46","button-main":"_button-main_1efbt_46",headerCheckbox:"_headerCheckbox_1efbt_50"}}]]),EK={key:1},RK=Ct(lt({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=ls,n=yn,i=e,{isEditing:o}=jC(i),s=Z(null),r=Z(null),a=j(()=>i.value),l=j(()=>a.value===void 0),c=j(()=>{var f;return((f=a.value)==null?void 0:f.name)||"No status"}),u=j(()=>{var g;const f=(g=a.value)==null?void 0:g.color;return{backgroundColor:py(f)?f:"#fff",border:gy(f,"white")?"1px solid #ccc":"1px solid #fff"}}),d=j(()=>{var f;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:R3((f=a.value)==null?void 0:f.label),inputRef:s,wrapperRef:r,clickable:!i.disabled&&!i.readOnly,active:o}}),{argsMain:h}=ir(d);return(f,g)=>nt((K(),Xe(J(or),xn(J(h),{ref_key:"wrapperRef",ref:r}),{default:Se(()=>[l.value?ot("",!0):(K(),Ce("div",{key:0,class:z(f.$style["status-renderer"])},[a.value?(K(),Ce(kt,{key:0},[we("div",{class:z(f.$style["status-renderer__color-code"]),style:mn(u.value)},null,6),nt((K(),Ce("div",{class:z(f.$style["status-renderer__status-name"])},[ut(bt(c.value),1)],2)),[[J(n),{content:c.value}]])],64)):l.value?ot("",!0):(K(),Ce("div",EK,"No status"))],2))]),_:1},16)),[[J(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_ui0ga_1","status-renderer__color-code":"_status-renderer__color-code_ui0ga_10","status-renderer__status-name":"_status-renderer__status-name_ui0ga_20"}}]]),QP=Ct(lt({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const i=e,{popupRef:o,show:s,hide:r,isVisible:a}=Q6({useTrigger:!1,arrow:!1,centered:!0,showOverlay:i.showOverlay,overlayOpacity:i.overlayOpacity,closeOnOverlayClick:i.closeOnOverlayClick,appendTo(u){return document.body}}),l=u=>{i.closeOnEscape&&u.key==="Escape"&&a.value&&r()};vn(()=>{document.addEventListener("keydown",l)}),Yn(()=>{document.removeEventListener("keydown",l)}),t({show:s,hide:r,isVisible:a});const c=n;return ct(()=>a.value,u=>{c(u?"shown":"hidden")}),(u,d)=>{const h=af("tooltip");return K(),Ce("div",{ref_key:"popupRef",ref:o,class:z(u.$style.popupContainer)},[we("div",{class:z(u.$style.popupWrapper)},[we("div",{class:z(u.$style.header)},[we("span",{class:z(u.$style["header-title"])},bt(e.popupName),3),nt((K(),Xe(pt,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:J(r),"aria-label":"Close popup"},{default:Se(()=>[ye(gt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),we("div",{class:z(u.$style.body)},[_t(u.$slots,"default")],2),we("div",{class:z(u.$style.footer)},[_t(u.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1cwaa_1",popupWrapper:"_popupWrapper_1cwaa_5",popupFadeIn:"_popupFadeIn_1cwaa_1",header:"_header_1cwaa_19","header-title":"_header-title_1cwaa_28",body:"_body_1cwaa_38",footer:"_footer_1cwaa_43"}}]]),DK={list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},getStatuses:{}},bd=Ap("toast",()=>{const e=Z([]),t=(o,s)=>{const r=DK[o];if(r){const a=r[s];if(a){n({id:o,type:s,message:a});return}}else n({id:o,type:s,message:o})},n=(o,s=5e3)=>{const r={...o,id:o.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},s)};function i(o){e.value=e.value.filter(s=>s.id!==o)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),_K=["innerHTML"],xK=Ct(lt({__name:"Snackbar",setup(e){const t=kB,n=bd(),{removeNotification:i}=n,{notifications:o}=nr(n),s=c=>c.trim().startsWith("<svg"),r=Z("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=c=>{navigator.clipboard.writeText(c).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(c,u)=>{const d=af("tooltip");return K(),Xe(mB,{name:"list",tag:"div",class:z(c.$style["notification-wrapper"])},{default:Se(()=>[(K(!0),Ce(kt,null,Un(J(o),h=>{var f;return nt((K(),Ce("div",{key:h.id,class:z([c.$style["notification-item"],c.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?c.$style["snackbar-type"]:""])},[we("p",{class:z(c.$style.snackbar__message)},[h.icon&&!s(h.icon)?(K(),Xe(gt,{key:0,src:h.icon,source:"remote"},null,8,["src"])):ot("",!0),h.icon&&s(h.icon)?(K(),Ce("i",{key:1,class:z(c.$style["icon-draw"]),innerHTML:h.icon},null,10,_K)):ot("",!0),nt((K(),Ce("span",{class:z(c.$style["error-message"])},[ut(bt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(K(),Ce("div",{key:0,class:z(c.$style["actions-notification"])},[(K(!0),Ce(kt,null,Un(h.actions,g=>(K(),Xe(pt,xn({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Se(()=>[g.btnIcon?(K(),Xe(gt,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):ot("",!0)]),_:2},1040,["onClick"]))),128))],2)):ot("",!0),h.type=="error"?nt((K(),Xe(pt,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Se(()=>[ye(gt,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):ot("",!0),ye(pt,{variant:"tertiary",onClick:g=>J(i)(h.id),class:z(c.$style["close-btn"]),size:18},{default:Se(()=>[ye(gt,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[J(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1tunr_1","notification-item":"_notification-item_1tunr_16","notification--success":"_notification--success_1tunr_30","notification--error":"_notification--error_1tunr_33","close-btn":"_close-btn_1tunr_37","notification--info":"_notification--info_1tunr_40","notification--warning":"_notification--warning_1tunr_47","notification--interactive":"_notification--interactive_1tunr_54","snackbar-type":"_snackbar-type_1tunr_60",snackbar__message:"_snackbar__message_1tunr_68","error-message":"_error-message_1tunr_80","actions-notification":"_actions-notification_1tunr_89"}}]]);/*!
|
|
87
|
+
This will fail in production.`);r=ja,r._s.has(e)||(o?WC(e,t,i,r):BP(e,i,r),M.env.NODE_ENV!=="production"&&(s._pinia=r));const c=r._s.get(e);if(M.env.NODE_ENV!=="production"&&a){const u="__hot:"+e,d=o?WC(u,t,i,r,!0):BP(u,yo({},i),r,!0);a._hotUpdate(d),delete r.state.value[u],r._s.delete(u)}if(M.env.NODE_ENV!=="production"&&er){const u=Si();if(u&&u.proxy&&!a){const d=u.proxy,h="_pStores"in d?d._pStores:d._pStores={};h[e]=c}}return c}return s.$id=e,s}function nr(e){const t=St(e),n={};for(const i in t){const o=t[i];o.effect?n[i]=j({get:()=>e[i],set(s){e[i]=s}}):(Qt(o)||oo(o))&&(n[i]=_r(e,i))}return n}const zC=Ap("permissionStore",()=>{const e=Z([]),t=Z(),n=Z({});return{userPermissions:e,entityPermissions:t,itemPermission:n,setUserPermissions:r=>{e.value=r},setEntityPermissions:r=>{t.value=r},setItemPermission:(r,a)=>{n.value[r]=a}}}),D8="woohoo_getWoohooUserInterface_read",UC="media_getReviewUserInterface_read",_8="update_getUpdateUserInterface_read",x8=sessionStorage.getItem("BASE_URL"),F8=sessionStorage.getItem("BASE_REVIEW_URL"),T8=(e,t,n)=>{const i=zC(),{userPermissions:o}=nr(i),s=j(()=>{const{ws_code:G,entity_id:ie,scene_id:B}=e.value;return{baseDomain:x8||"",ws_code:G||"",entity_id:ie||"",scene_id:B||"",reviewDomain:F8||"",take_id:ie||"",woohoo_id:ie||"",parent_id:ie||""}}),r=j(()=>{var ie;const G=e.value.permissions;return{canOpenSceneHub:!0,canOpenReview:o.value.includes(UC),canCopyLink:!0,canRename:(G==null?void 0:G.has_edit_permission)??!1,canOpenTakeInReview:o.value.includes(UC),canOpenTakeInUpdate:o.value.includes(_8),canOpenTakeInWoohoo:o.value.includes(D8),canDeleteRendition:((ie=G==null?void 0:G.media)==null?void 0:ie.has_delete_rendition_permission)??!1,canDeleteThumbnail:(G==null?void 0:G.has_edit_thumbnail_permission)??!1,canArchiveScene:(G==null?void 0:G.has_edit_permission)??!1,canUnarchiveScene:(G==null?void 0:G.has_edit_permission)??!1,canDeleteScene:(G==null?void 0:G.has_delete_permission)??!1}}),a=j(()=>({project:Vo({type:"project",config:s.value}).url,take_review:Vo({type:"review_take",config:s.value}).url,review:Vo({type:"review_scene",config:s.value}).url,review_scene:Vo({type:"review_scene",config:s.value}).url,woohoo:Vo({type:"woohoo",config:s.value}).url,update:Vo({type:"update",config:s.value}).url,scene_hub:Vo({type:"scene_hub",config:s.value}).url})),l=(G,ie)=>{const B=G instanceof MouseEvent&&(G.metaKey||G.ctrlKey),H=a.value[ie]||"";H&&(B?window.open(H,"_blank"):window.location.href=H)},c=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.deleteRendition(s.value.ws_code,[s.value.scene_id],!0));if((H==null?void 0:H.message)!="Done"){console.error("Failed to delete rendition.");return}}catch(H){console.error("Error deleting rendition",H)}},u=async(G,ie)=>{var B;try{await((B=e.value.axiosService.value)==null?void 0:B.deleteThumbnail(s.value.ws_code,[s.value.scene_id]))}catch(H){console.error("Error deleting thumbnail",H)}},d=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.archiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((H==null?void 0:H.message)!="Done"){console.error("Failed to archive scene.");return}ie&&ie("archived")}catch(H){console.error("Error archiving item",H)}},h=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.deleteScene(s.value.ws_code,s.value.entity_id,s.value.scene_id));if((H==null?void 0:H.message)!="Done"){console.error("Failed to delete scene.");return}ie&&ie("deleted")}catch(H){console.error("Error deleting item",H)}},f=G=>{const ie=a.value.scene_hub||"";ie&&navigator.clipboard.writeText(ie)},g=async(G,ie)=>{var B;try{const H=await((B=e.value.axiosService.value)==null?void 0:B.unarchiveScene(s.value.ws_code,s.value.entity_id,[s.value.scene_id]));if((H==null?void 0:H.message)!="Done"){console.error("Failed to unarchive scene.");return}ie&&ie("unarchived")}catch(H){console.error("Error unarchiving item",H)}},m=G=>l(G,"scene_hub"),y=G=>l(G,"review_scene"),{tooltip:b,copyToClipboard:S}=pC(a.value.scene_hub||"",void 0,!0),F=G=>{S()},C=G=>n(G),R=G=>l(G,"review"),E=G=>l(G,"update"),_=G=>l(G,"woohoo"),I=G=>c(),O=G=>u(),k=G=>d(G,t),x=G=>g(G,t),P=G=>h(G,t),N=j(()=>{let G=[];return!s.value.scene_id&&e.value.optionBlock&&G.push(...e.value.optionBlock),Array.isArray(e.value.optionBlock)&&e.value.optionBlock.length?e.value.optionBlock:[{id:"quick-actions",groupLabel:"Quick actions",type:"row",options:[{id:"scene-tile",label:"",icon:"CustomSceneHub",description:"Scene tile",action:m,hide:!r.value.canOpenSceneHub,type:"icon"},{id:"open-in-arbo-review",label:"",icon:"PenRuler",description:"Open in arbo Review",action:y,hide:!r.value.canOpenReview,type:"icon"},{id:"copy-link",label:"",icon:"Link",description:b.value,action:F,hide:!r.value.canCopyLink,type:"icon"}]},{id:"action",groupLabel:"Action",type:"column",options:[{id:"rename",label:"Rename",icon:"Pen",action:C,hide:!r.value.canRename,type:"icon"}]},{id:"download-options-take",type:"column",groupLabel:"Download Options",options:[{id:"open-take-in",label:"Open Take in",icon:"ArrowUpRightFromSquare",subMenu:{id:"sub-menu",type:"column",groupLabel:"Sub Menu",options:[{id:"review",label:"Review",icon:"PenRuler",action:R,hide:!r.value.canOpenTakeInReview,type:"icon"},{id:"update",label:"Update",icon:"UserCheck",action:E,hide:!r.value.canOpenTakeInUpdate,type:"icon"},{id:"woohoo-details",label:"Woohoo Details",icon:"ChartPie",action:_,hide:!r.value.canOpenTakeInWoohoo,type:"icon"}]}}]},{id:"download-options-delete",type:"column",groupLabel:"Download Options",options:[{id:"delete-rendition",label:"Delete rendition",icon:"Clapperboard",action:I,hide:!r.value.canDeleteRendition,type:"icon"},{id:"delete-thumbnail",label:"Delete thumbnail",icon:"Image",action:O,hide:!r.value.canDeleteThumbnail,type:"icon"}]},{id:"download-options-archive",type:"column",groupLabel:"Download Options",options:[{id:"archive",label:"Archive",icon:"BoxArchive",action:k,hide:!r.value.canArchiveScene,type:"icon"},{id:"unarchive",label:"Unarchive",icon:"BoxArchive",action:x,hide:!r.value.canUnarchiveScene,type:"icon"},{id:"delete",label:"Delete",icon:"TrashCan",isDanger:!0,description:"Delete permanently",action:P,hide:!r.value.canDeleteScene,type:"icon"}]}]});return{linkMap:a,handleOpen:l,copyLink:f,deleteRendition:c,deleteThumbnail:u,archiveItem:d,deleteItem:h,unArchiveItem:g,options:N}};function ir(e){const t=Z(!1),n=Z(!1),i=j(()=>{var d;const c=e.value,u=!!c.readOnly;return{readOnly:u,disabled:!!c.disabled,hovered:n.value,focused:t.value,isEmpty:c.empty??!1,error:!!c.error,actived:!!((d=c.active)!=null&&d.value),clickable:u?!1:c.clickable??!1}}),o=()=>{t.value=!0,qt(()=>{const c=l(e.value.inputRef);c==null||c.focus()})},s=()=>{t.value=!1},r=()=>{n.value=!0},a=()=>{n.value=!1},l=c=>{if(!c)return null;const u=c.value||c;return(u instanceof HTMLElement?u:u==null?void 0:u.$el)||null};return vn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.addEventListener("focus",o),c.addEventListener("blur",s)),u&&(u.addEventListener("mouseenter",r),u.addEventListener("mouseleave",a))}),Yn(()=>{const c=l(e.value.inputRef),u=l(e.value.wrapperRef);c&&(c.removeEventListener("focus",o),c.removeEventListener("blur",s)),u&&(u.removeEventListener("mouseenter",r),u.removeEventListener("mouseleave",a))}),{isFocus:t,isHover:n,argsMain:i,handleFocus:o}}const jC=e=>{const t=Z(!1),n=j(()=>t.value);return vn(()=>{var a,l,c,u;const i=(a=e.params)==null?void 0:a.api,o=(l=e.params)==null?void 0:l.node,s=o==null?void 0:o.rowIndex,r=(u=(c=e.params)==null?void 0:c.colDef)==null?void 0:u.field;return i==null||i.addEventListener("cellEditingStarted",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!0)}),i==null||i.addEventListener("cellEditingStopped",d=>{d.rowIndex===s&&d.colDef.field===r&&(t.value=!1)}),{isEditing:n}}),{isEditing:n}},HP=Ct(lt({__name:"StatusBadge",props:{size:{default:16},color:{default:"#02C39A"},label:{default:""},status:{default:"active"},statusTooltip:{default:"Online"},showBadge:{type:Boolean,default:!0},loading:{type:Boolean}},setup(e){const t=ls,{triggerRef:n,popupRef:i}=Qs({trigger:"mouseenter focus",theme:"dark",placement:"right",arrow:!0}),o=j(()=>{switch(s.status){case"active":return"#02C39A";case"offline":return"#808080";case"busy":return"#ff0000";case"away":return"#F7941D";default:return"#02C39A"}}),s=e;return(r,a)=>(K(),Ce("div",{class:z(r.$style["status-badge-wrapper"]),style:mn({"--badge-size":`${s.size}px`,"--badge-color":o.value})},[_t(r.$slots,"default"),nt(we("div",{class:z(r.$style["badge-indicator"]),ref_key:"triggerRef",ref:n},null,2),[[as,s.showBadge],[J(t),{isLoading:s.loading,fullwidth:!0}]]),we("div",{ref_key:"popupRef",ref:i,class:z(r.$style["badge-tooltip"])},bt(s.statusTooltip),3)],6))}}),[["__cssModules",{$style:{"status-badge-wrapper":"_status-badge-wrapper_13xqg_1","badge-indicator":"_badge-indicator_13xqg_6",active:"_active_13xqg_19",offline:"_offline_13xqg_22",busy:"_busy_13xqg_25",away:"_away_13xqg_28","badge-tooltip":"_badge-tooltip_13xqg_32"}}]]),P8=lt({__name:"MiniPeopleCard",props:{user:{},status:{default:"active"},timezone:{default:dC()},userConfig:{default:()=>({size:96,isUseShortLabel:!0,bgColor:"#E0E0E0",color:"#757575",isMe:!1})},showInsightButton:{type:Boolean,default:!0},showCopyLinkButton:{type:Boolean,default:!0},apiUpdateFunction:{type:Function,default:void 0},refreshInterval:{default:3e4},enableAutoRefresh:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},private:{type:Boolean,default:!1}},emits:["insightClick","copyLink","dataUpdated"],setup(e,{emit:t}){const n=yn,i=ls,o=e,s=t,r={active:"Active in the last 10 minutes",offline:"Logged out of TESSR",busy:"User is busy",away:"No activity in the last 10 minutes"},a={active:"#02C39A",offline:"#808080",busy:"#FF0000",away:"#F7941D"},l=Z(o.status),c=Z(o.timezone),u=Z(!0),d=Z(null),h=j(()=>r[l.value]),f=j(()=>a[l.value]),g=j(()=>{var O;return(O=o.user)==null?void 0:O.name}),m=j(()=>c.value?M6(c.value,"HH:mm"):""),y=j(()=>c.value?`(${L6(c.value)})`:""),b=async()=>{var O,k,x;if(o.apiUpdateFunction)try{const P=await o.apiUpdateFunction(o.user.id);if(!P)throw new Error("No data returned from API");(O=P.private_info)!=null&&O.is_offline?l.value="offline":(k=P.private_info)!=null&&k.last_active?l.value="active":l.value="away",(x=P.private_info)!=null&&x.timezone&&(c.value=P.private_info.timezone),s("dataUpdated",P)}catch(P){console.error("Failed to fetch user data:",P)}finally{u.value=!1}},S=()=>{!o.apiUpdateFunction||!o.enableAutoRefresh||(d.value!==null&&clearInterval(d.value),d.value=setInterval(b,o.refreshInterval))},F=()=>{d.value!==null&&(clearInterval(d.value),d.value=null)},C=`https://peopleinsight.arbo.com/user/${o.user.id}`,{copyToClipboard:R,tooltip:E}=pC(C,()=>s("copyLink",o.user.id)),_=()=>s("insightClick",o.user.id);ct([()=>o.enableAutoRefresh,()=>o.refreshInterval,()=>o.apiUpdateFunction],()=>{F(),o.enableAutoRefresh&&o.apiUpdateFunction&&S()}),vn(async()=>{o.apiUpdateFunction&&(await b(),S())}),Yn(F);const I=j(()=>({name:o.user.name,initial:o.user.initial,id:o.user.id,profile_image:o.user.profile_image,color:o.user.color,size:98}));return(O,k)=>(K(),Ce("div",{class:z([O.$style["mini-people-card"],{[O.$style.loading]:u.value},"bg-skeleton"])},[we("div",{class:z(O.$style["avatar-section"])},[o.private?(K(),Xe(Ku,xn({key:1,readOnly:!0},I.value),null,16)):(K(),Xe(HP,{key:0,size:16,status:l.value,loading:u.value,"status-tooltip":h.value},{default:Se(()=>[ye(Ku,xn({readOnly:!0},I.value),null,16)]),_:1},8,["status","loading","status-tooltip"]))],2),we("div",{class:z(O.$style["user-info"])},[we("div",{class:z(O.$style["info-row"])},[we("h3",{class:z(O.$style["user-name"])},bt(g.value),3),o.private?ot("",!0):nt((K(),Ce("span",{key:0,class:z(O.$style["status-badge"]),style:mn({color:f.value})},[ut(bt(l.value),1)],6)),[[J(i),{isLoading:u.value,fullwidth:!0}]])],2),c.value?(K(),Ce("div",{key:0,class:z([O.$style["info-row"],O.$style["time-row"]])},[nt((K(),Ce("div",{class:z(O.$style["time-display"])},[ye(gt,{source:"remote",src:"Clock",class:z(O.$style["clock-icon"])},null,8,["class"]),we("span",{class:z(O.$style["time-text"])},[we("strong",null,bt(m.value),1),we("span",{class:z(O.$style.separator)},"|",2),we("span",null,bt(y.value),1)],2)],2)),[[J(i),{isLoading:u.value,fullwidth:!0}]])],2)):ot("",!0),!e.readOnly&&!o.private?(K(),Ce("div",{key:1,class:z([O.$style["info-row"],O.$style.actions])},[e.showInsightButton?(K(),Xe(ft,{key:0,label:"Insights",variant:"primary",size:"default",style:{flex:"1"},onClick:rn(_,["prevent","stop"]),disabled:o.disabled},null,8,["disabled"])):ot("",!0),e.showCopyLinkButton?nt((K(),Xe(ft,{key:1,variant:["icon","secondary"],size:"default","aria-label":"Copy link",onClick:rn(J(R),["prevent","stop"]),disabled:o.disabled},{default:Se(()=>[ye(gt,{source:"remote",src:"Link"})]),_:1},8,["onClick","disabled"])),[[J(n),{content:J(E),contentClass:["extra-padding"],hideOnClick:!1,delay:[300,0]}]]):ot("",!0)],2)):ot("",!0)],2)],2))}}),I8=Ct(P8,[["__cssModules",{$style:{"mini-people-card":"_mini-people-card_xknlb_1",loading:"_loading_xknlb_22","avatar-section":"_avatar-section_xknlb_25","user-info":"_user-info_xknlb_30","info-row":"_info-row_xknlb_36","time-row":"_time-row_xknlb_43","time-display":"_time-display_xknlb_49","time-text":"_time-text_xknlb_54","actions-row":"_actions-row_xknlb_61","user-name":"_user-name_xknlb_65","status-badge":"_status-badge_xknlb_76",active:"_active_xknlb_90",offline:"_offline_xknlb_93",busy:"_busy_xknlb_96",away:"_away_xknlb_99","user-local-time":"_user-local-time_xknlb_102","clock-icon":"_clock-icon_xknlb_110",separator:"_separator_xknlb_122",timezone:"_timezone_xknlb_125","refresh-btn":"_refresh-btn_xknlb_128",spinning:"_spinning_xknlb_131",spin:"_spin_xknlb_131","insight-btn":"_insight-btn_xknlb_134","copy-link-btn":"_copy-link-btn_xknlb_138","last-update":"_last-update_xknlb_141","loading-overlay":"_loading-overlay_xknlb_147","loading-spinner":"_loading-spinner_xknlb_159"}}]]),A8=Ct(lt({name:"MoreOption",__name:"MoreOption",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=yn,n=e,{isEditing:i}=jC(n);return(o,s)=>nt((K(),Xe(ft,{class:z(o.$style.btnMoreOptions),variant:["secondary","icon"],size:"small",actived:J(i)},{default:Se(()=>[ye(gt,{src:"EllipsisVertical",source:"remote"})]),_:1},8,["class","actived"])),[[J(t),"More actions"]])}}),[["__cssModules",{$style:{btnMoreOptions:"_btnMoreOptions_r5y5p_1"}}]]),k8=["src","width","height","alt"],kp=Ct(lt({__name:"Visual",props:{src:{},source:{default:"remote"},size:{},minWidth:{},maxWidth:{},minHeight:{},maxHeight:{},color:{},ratio:{default:"1/1"}},setup(e){const t=ls,{getCachedValue:n,setCachedValue:i}=Uu({dbName:"visual-cache-db",storeName:"visuals"}),o=h=>{if(h!==void 0)return typeof h=="number"?`${h}px`:typeof h=="string"&&/^\d+$/.test(h)?`${h}px`:h},s=e,r=j(()=>({minWidth:o(s.minWidth),maxWidth:o(s.maxWidth),minHeight:o(s.minHeight),maxHeight:o(s.maxHeight),aspectRatio:s.ratio,width:o(s.size)})),a=async h=>{const f=await n(h);return!f||!(f instanceof Blob)?void 0:URL.createObjectURL(f)},l=async(h,f)=>{await i(h,f)},c=j(()=>({name:s.src,size:Number(s.size||100),color:""})),{url:u,loading:d}=e_(c,"visual",l,a);return(h,f)=>nt((K(),Ce("div",{class:z([h.$style.visualWrapper,{[h.$style.loading]:J(d)}]),style:mn(r.value)},[we("img",{src:J(u),width:e.size,height:e.size,alt:"visual-"+e.src,style:mn(r.value)},null,12,k8)],6)),[[J(t),{isLoading:J(d),type:"skeleton",size:"cover",fullwidth:!0}]])}}),[["__cssModules",{$style:{visualWrapper:"_visualWrapper_1sro0_1",loading:"_loading_1sro0_8",pulse:"_pulse_1sro0_1"}}]]),O8=["tabindex"],Op=Ct(lt({name:"ListItem",directives:{tooltip:yn},__name:"ListItem",props:{label:{},value:{},type:{},selected:{type:Boolean},disabled:{type:Boolean},hover:{type:Boolean},clickable:{type:Boolean,default:!0},danger:{type:Boolean},data:{},icon:{},readOnly:{type:Boolean,default:!1},show:{type:Boolean}},emits:["click","keydown","update:selected","select"],setup(e,{emit:t}){const n=e,i=t,o=Z(!1),s=Z(!1);function r(E){if(!E||typeof E!="object")return!1;const _=E;return typeof _.name=="string"&&typeof _.id=="string"&&typeof _.initial=="string"}const a=j(()=>n.type==="status"||n.type==="assignee"||n.type==="icon"||!!R.prefix),l=j(()=>!!R.suffix||n.danger&&o.value),c=j(()=>n.disabled||!n.clickable?-1:0),u=j(()=>{var E;return n.type==="status"&&typeof((E=n.data)==null?void 0:E.color)=="string"?{backgroundColor:n.data.color,border:gy(n.data.color,"white")?"1px solid #ccc":"1px solid #fff"}:{}}),d=Sf(),h=j(()=>({[d.active]:n.selected??!1,[d.disabled]:n.disabled??!1,[d.hover]:n.hover??!1,[d.clickable]:(n.clickable??!0)&&!n.disabled,[d.danger]:n.danger??!1,[d["has-prefix"]]:a.value,[d["has-suffix"]]:l.value,[d.readOnly]:n.readOnly})),f=j(()=>({content:"Cancel",...C})),g=j(()=>({content:"Confirm",theme:"warning",...C}));function m(E){return{name:E.name,initial:E.initial,id:E.id,profile_image:E.profile_image??null,color:E.color,size:24}}function y(){o.value=!1}function b(E){E&&i("click",E),(n.clickable??!0)&&(i("update:selected",!n.selected),i("select",!n.selected))}function S(E){if(!n.disabled){if(n.danger&&!o.value){o.value=!0;return}n.danger||b(E)}}function F(E){if(i("keydown",E),!n.disabled)if(E.key==="Enter"||E.key===" "){E.preventDefault();const _=new MouseEvent("click",{bubbles:!0,cancelable:!0});S(_)}else E.key==="Escape"&&o.value&&(E.preventDefault(),y())}const C=Object.freeze({delay:[500,0],contentClass:["extra-padding"]}),R=vv();return ct(()=>n.show,E=>{E===!1&&(o.value=!1)}),(E,_)=>{const I=af("tooltip");return K(),Ce("div",{class:z([E.$style["list-item"],h.value]),role:"listitem",tabindex:c.value,onClick:rn(S,["stop","prevent"]),onKeydown:F,onMouseenter:_[0]||(_[0]=O=>s.value=!0),onMouseleave:_[1]||(_[1]=O=>s.value=!1)},[a.value?(K(),Ce("div",{key:0,class:z(E.$style["list-item__prefix"])},[_t(E.$slots,"prefix",{},()=>[e.type==="icon"&&e.icon?(K(),Xe(gt,{key:0,src:e.icon,source:"remote",class:z(E.$style["item-icon"])},null,8,["src","class"])):e.type==="status"?(K(),Ce("div",{key:1,class:z(E.$style["status-indicator"]),style:mn(u.value)},null,6)):e.type==="assignee"&&r(e.data)?(K(),Xe(Ku,xn({key:2},m(e.data),{class:E.$style["item-avatar"],readOnly:!0}),null,16,["class"])):ot("",!0)])],2)):ot("",!0),we("div",{class:z(E.$style["list-item__label"])},[_t(E.$slots,"label",{selected:e.selected},()=>[ut(bt(e.label),1)])],2),l.value?(K(),Ce("div",{key:1,class:z(E.$style["list-item__suffix"])},[_t(E.$slots,"suffix",{item:E.$props,hovered:s.value},()=>[e.danger&&o.value?(K(),Ce("div",{key:0,class:z(E.$style["confirm-action"])},[nt((K(),Xe(ft,{variant:["secondary","icon"],size:"small",onClick:rn(y,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Xmark",source:"remote"})]),_:1})),[[I,f.value]]),nt((K(),Xe(ft,{variant:["danger","primary","icon"],size:"small",onClick:rn(b,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[I,g.value]])],2)):ot("",!0)])],2)):ot("",!0)],42,O8)}}}),[["__cssModules",{$style:{"list-item":"_list-item_g74kb_1",disabled:"_disabled_g74kb_15",danger:"_danger_g74kb_18","has-prefix":"_has-prefix_g74kb_21","has-suffix":"_has-suffix_g74kb_21",clickable:"_clickable_g74kb_35",readOnly:"_readOnly_g74kb_38",hover:"_hover_g74kb_42",active:"_active_g74kb_48","list-item__prefix":"_list-item__prefix_g74kb_73","list-item__label":"_list-item__label_g74kb_81","list-item__suffix":"_list-item__suffix_g74kb_95","status-indicator":"_status-indicator_g74kb_102","item-icon":"_item-icon_g74kb_108","arbo-icon-state":"_arbo-icon-state_g74kb_113","item-avatar":"_item-avatar_g74kb_116","confirm-action":"_confirm-action_g74kb_125"}}]]),or=Ct(lt({__name:"DisplayWrapper",props:{prefix:{},suffix:{},inputType:{},readOnly:{type:Boolean},disabled:{type:Boolean},hovered:{type:Boolean},focused:{type:Boolean},error:{type:Boolean},actived:{type:Boolean},clickable:{type:Boolean},size:{}},emits:["event"],setup(e,{expose:t,emit:n}){const i=e;vv();const o=Sf(),s=Z(null),r=Z("default"),a=j(()=>{if(typeof i.size=="number")return`${i.size}px`;switch(i.size){case"small":return"32px";case"large":return"48px";case"default":default:return"32px"}}),l=j(()=>`${Math.max(50,Math.round(Math.random()*100))}%`),c=j(()=>({[o["display-wrapper"]]:!0,[o.disabled]:i.disabled,[o.readOnly]:i.readOnly,[o.error]:i.error,[o.clickable]:i.clickable,[o.active]:i.actived,[o.hovered]:i.hovered,[o.focused]:!i.readOnly&&!i.disabled&&i.focused})),u=()=>{var b,S;const f=((b=s.value)==null?void 0:b.querySelectorAll(".wrapper-prefix").length)||0,g=((S=s.value)==null?void 0:S.querySelectorAll(".wrapper-suffix").length)||0,m="var(--icon-size)",y=(f+g)*8;return f&&!g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${y}px )`:!f&&g?`calc(100% - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:f&&g?`repeat(${f}, ${m}) calc(100% - ${f} * ${m} - ${g} * ${m} - ${y}px ) repeat(${g}, ${m})`:"100%"},d=Z(u());sf(()=>{qt(()=>{d.value=u()})}),vn(()=>{qt(()=>{d.value=u()})});const h=f=>{r.value=f};return t({rootEl:s,updateState:h,componentState:r}),(f,g)=>(K(),Ce("div",{ref_key:"rootEl",ref:s,class:z([[J(o)["display-wrapper"],c.value],"skeleton-loading-wrapper"]),style:mn({"--grid-template":d.value,"--wrapper-size":a.value,"--loading-overlay-width":l.value})},[_t(f.$slots,"prefix",{hovered:i.hovered,focused:i.focused}),_t(f.$slots,"default",{hovered:i.hovered,focused:i.focused,updateComponentState:h,disabled:i.disabled}),_t(f.$slots,"suffix",{hovered:i.hovered,focused:i.focused})],6))}}),[["__cssModules",{$style:{"display-wrapper":"_display-wrapper_1h8v5_1",readOnly:"_readOnly_1h8v5_22",disabled:"_disabled_1h8v5_22",error:"_error_1h8v5_22",hovered:"_hovered_1h8v5_22",active:"_active_1h8v5_26",clickable:"_clickable_1h8v5_31",suffix:"_suffix_1h8v5_37",prefix:"_prefix_1h8v5_38"}}]]),M8=["value","placeholder","disable","readonly","maxlength"],GP=Ct(lt({__name:"InputText",props:{modelValue:{},placeholder:{},focused:{type:Boolean},validatorFnc:{type:Function},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","input","clear","enter","blur","cancel"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=n,r=Z(null),a=j(()=>{var S,F;return((S=o==null?void 0:o.modelValue)==null?void 0:S.length)&&((F=o==null?void 0:o.modelValue)==null?void 0:F.length)>0}),l=Ho(S=>{if(o.disabled||o.readOnly){S.preventDefault();return}const F=S.target;s("update:modelValue",F.value),s("input",F.value)},16),c=S=>{if(o.disabled||o.readOnly){S.preventDefault();return}s("update:modelValue",""),s("clear"),qt(()=>{var F;(F=r.value)==null||F.focus()})},u=Ho(S=>{const F=(o==null?void 0:o.modelValue)||"";S.key==="Escape"?a.value?c(S):s("cancel"):S.key==="Enter"&&F.length>0&&(S.preventDefault(),S.stopImmediatePropagation(),S.stopPropagation(),s("input",F||""),s("enter",F||""))},300),d=`input-text-${Math.random().toString(36).substr(2,9)}`,h=Z(!1);ct(()=>o.modelValue,S=>{o.validatorFnc?h.value=!!S&&!o.validatorFnc(S):h.value=!1});const f=Z(null),g=j(()=>({disabled:o.disabled,readOnly:o.readOnly,error:h.value,inputRef:r,clickable:!o.disabled&&!o.readOnly,focused:o.focused,wrapperRef:f})),{argsMain:m,isHover:y,isFocus:b}=ir(g);return t({focus:()=>{qt(()=>{var S;(S=r.value)==null||S.focus(),console.log("focus called")})}}),(S,F)=>(K(),Ce("div",{class:z(S.$style["input-wrapper"])},[ye(or,xn(J(m),{ref_key:"wrapperRef",ref:f,class:S.$style["input-box"]}),{suffix:Se(()=>[(a.value||(J(y)||J(b))&&a.value)&&!o.disabled&&!o.readOnly?_t(S.$slots,"clear",{key:0},()=>[nt((K(),Xe(ft,{variant:["icon"],"aria-label":"Clear search",onClick:rn(c,["stop"]),size:16,rounded:!0},{default:Se(()=>[ye(gt,{class:z([S.$style["cs-icon"]]),src:"XMarkSolid",size:"8",color:"white"},null,8,["class"])]),_:1})),[[J(i),{content:"Clear",contentClass:"extra-padding"}]])]):_t(S.$slots,"suffix",{key:1})]),default:Se(()=>[we("input",{ref_key:"inputRef",ref:r,type:"text",value:e.modelValue,placeholder:e.placeholder,class:z([S.$style["column-config__input"]]),id:d,disable:e.disabled,readonly:e.readOnly,onInput:F[0]||(F[0]=(...C)=>J(l)&&J(l)(...C)),onKeydown:F[1]||(F[1]=(...C)=>J(u)&&J(u)(...C)),maxlength:e.maxLength},null,42,M8)]),_:3},16,["class"]),h.value?_t(S.$slots,"error",{key:0}):ot("",!0)],2))}}),[["__cssModules",{$style:{"input-box":"_input-box_51nuy_1","has-suffix":"_has-suffix_51nuy_11","has-value":"_has-value_51nuy_11","is-disabled":"_is-disabled_51nuy_17","is-readonly":"_is-readonly_51nuy_24","column-config__input":"_column-config__input_51nuy_31"}}]]),KC=Ct(lt({__name:"SearchBox",props:{modelValue:{default:""},placeholder:{default:"Search..."},focused:{type:Boolean},validatorFnc:{},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:modelValue","search","clear","cancel"],setup(e,{expose:t,emit:n}){const i=e,o=n,s=Z(null),r=j(()=>i.modelValue.length>0),a=Ho(u=>{o("update:modelValue",u),o("search",u)},300),l=()=>{o("update:modelValue",""),o("clear"),qt(()=>{var u;(u=s.value)==null||u.focus()})},c=Z(i.modelValue);return`${Math.random().toString(36).substr(2,9)}`,t({focus:()=>{var u;(u=s.value)==null||u.focus()}}),(u,d)=>(K(),Xe(GP,{ref_key:"searchInput",ref:s,modelValue:c.value,"onUpdate:modelValue":d[0]||(d[0]=h=>c.value=h),placeholder:e.placeholder,onInput:J(a),onClear:l,onCancel:d[1]||(d[1]=h=>o("cancel"))},{suffix:Se(()=>[r.value?ot("",!0):(K(),Xe(gt,{key:0,src:"MagnifyingGlass",class:z(u.$style.icon),color:"#a6a6a6"},null,8,["class"]))]),_:1},8,["modelValue","placeholder","onInput"]))}}),[["__cssModules",{$style:{"search-box":"_search-box_18t5g_1",icon:"_icon_18t5g_18"}}]]),L8=["aria-activedescendant"],N8=["innerHTML"],V8=10,qC=Ct(lt({__name:"SearchList",props:{options:{default:()=>[]},selectedId:{},loading:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},hasMore:{type:Boolean,default:!1},error:{default:null},params:{},maxHeight:{default:"282px"},width:{default:"200px"},minQueryLength:{default:0}},emits:["select","close","search","loadMore","cancel"],setup(e,{expose:t,emit:n}){const i=yn,o={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",ENTER:"Enter",ESCAPE:"Escape",TAB:"Tab"},s=e,r=n,a=Z(""),l=Z(-1),c=Z(null),u=Z(null),d=Z(new Map),h=j(()=>hC(a.value)),f=j(()=>{const $=h.value;if(!$||$.length<s.minQueryLength)return s.options;if(d.value.has($))return d.value.get($);const ce=s.options.map(ue=>({item:ue,score:G6(ue.label,$)})).filter(({score:ue})=>ue>0).sort((ue,De)=>De.score-ue.score).map(({item:ue})=>ue);return d.value.set($,ce),ce}),g=j(()=>s.hasMore&&!s.loading&&!s.loadingMore),m=Ho($=>{X.value=0,a.value=$,l.value=-1,r("search",$)},gp),y=$=>{X.value=0,m($)},b=$=>a.value?$6($,a.value):$,S=$=>{const ue={[o.ARROW_DOWN]:()=>F($),[o.ARROW_UP]:()=>C($),[o.ENTER]:()=>_($),[o.ESCAPE]:()=>I($),[o.TAB]:()=>O($)}[$.key];ue&&ue()},F=$=>{$.preventDefault(),R(1)},C=$=>{$.preventDefault(),R(-1)},R=$=>{const ce=f.value.length;if(ce===0)return;let ue;$>0?ue=(l.value+1)%ce:l.value>0?ue=l.value-1:ue=ce-1,l.value=ue,E()},E=()=>{qt(()=>{var ce;const $=(ce=u.value)==null?void 0:ce.querySelectorAll('[role="menuitem"]')[l.value];$==null||$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})},_=$=>{if($.preventDefault(),l.value>=0&&l.value<f.value.length){const ue=f.value[l.value];k(ue)}},I=$=>{$.preventDefault(),P()},O=$=>{l.value>=0&&($.preventDefault(),_($))},k=$=>{!$||$.disabled||(r("select",$),l.value=-1,P())},x=$=>{$>=0&&$<f.value.length&&(l.value=$)},P=()=>{r("close")},N=()=>{if(!g.value||!u.value)return;const{scrollTop:$,clientHeight:ce,scrollHeight:ue}=u.value;ue-($+ce)<=V8&&r("loadMore")},G=()=>{var $,ce;($=u.value)==null||$.addEventListener("scroll",N),(ce=c.value)==null||ce.addEventListener("keydown",S)},ie=()=>{var $,ce;($=u.value)==null||$.removeEventListener("scroll",N),(ce=c.value)==null||ce.removeEventListener("keydown",S)};vn(()=>{G()}),Yn(()=>{ie()}),ct(()=>s.loading,$=>{!$&&f.value.length>0&&(l.value=-1)});const B=$=>$?Array.isArray(s.selectedId)?s.selectedId.includes(String($.id)):s.selectedId==$.id:!1,H=Z(null);ct(l,()=>{E()}),t({focus:()=>{qt(()=>{var $;($=H.value)==null||$.focus()})},query:a,filteredOptions:f,selectedIndex:l,closeDropdown:P,clearSearch:()=>{a.value=""}});const X=Z(0);return ct(()=>s.loading,$=>{const ce=s.options.length>0&&f.value.length>0,ue=!ce&&a.value.length>0,De=!ce&&a.value.length===0;if($){X.value=0;return}else if(ce){X.value=1;return}else if(ue){X.value=2;return}else if(De){X.value=3;return}},{immediate:!0}),($,ce)=>(K(),Ce("datalist",{ref_key:"searchListRef",ref:c,class:z($.$style["search-list"]),"aria-activedescendant":l.value>=0?`item-${l.value}`:void 0,style:mn({width:e.width})},[ye(KC,{ref_key:"searchBoxRef",ref:H,modelValue:a.value,"onUpdate:modelValue":ce[0]||(ce[0]=ue=>a.value=ue),class:z($.$style["search-box"]),disabled:e.loading,onSearch:y,onClear:ce[1]||(ce[1]=ue=>y("")),onCancel:ce[2]||(ce[2]=ue=>r("cancel"))},null,8,["modelValue","class","disabled"]),we("div",{ref_key:"popupRef",ref:u,class:z($.$style["list-container"]),style:mn({maxHeight:e.maxHeight})},[_t($.$slots,"extra-item"),(K(!0),Ce(kt,null,Un(f.value,(ue,De)=>nt((K(),Ce("div",{key:`${ue.id}-${De}`,role:"menuitem"},[_t($.$slots,"item",{item:ue,index:De,selectedIndex:l.value,isSelected:B,handleSelect:k,handleItemHover:x,getHighlightedLabel:b,query:a.value,idx:De},()=>[ue.hide?ot("",!0):(K(),Xe(Op,xn({key:0,ref_for:!0},ue,{hover:De===l.value,selected:B(ue),type:ue.type,id:`item-${De}`,"aria-selected":De===l.value,onClick:rn(ae=>k(ue),["stop","prevent"]),onMouseover:ae=>x(De)}),{prefix:Se(()=>[_t($.$slots,"prefix-item",{item:ue})]),label:Se(()=>[a.value?nt((K(),Ce("span",{key:0,class:z($.$style.match),innerHTML:b(ue.label)},null,10,N8)),[[J(i),{content:ue.label}]]):nt((K(),Ce("span",{key:1,class:z($.$style["item-label"])},[ut(bt(ue.label),1)],2)),[[J(i),{content:ue.label}]])]),suffix:Se(({hovered:ae})=>[_t($.$slots,"action",{item:ue,isHovered:De===l.value,hovered:ae,selected:l.value==De})]),_:2},1040,["hover","selected","type","id","aria-selected","onClick","onMouseover"]))])])),[[as,X.value===1]])),128)),X.value===0?_t($.$slots,"loading-more",{key:0},()=>[(K(),Ce(kt,null,Un(7,ue=>we("div",{class:z($.$style["loading-more"]),key:ue},[we("div",{class:z($.$style["loading-skeleton"])},null,2),we("div",{class:z($.$style["loading-skeleton"])},null,2)],2)),64))]):ot("",!0),X.value===2?(K(),Ce("div",{key:1,class:z($.$style["no-results"])},[_t($.$slots,"empty",{query:a.value},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[3]||(ce[3]=[we("p",null,[ut(" No results. "),we("br"),ut(" Try another search. ")],-1)])],2)])],2)):ot("",!0),X.value===3?(K(),Ce("div",{key:2,class:z($.$style["no-results"])},[_t($.$slots,"empty-list",{},()=>[we("div",{class:z($.$style["no-results-content"])},[...ce[4]||(ce[4]=[we("p",null,"No items available.",-1)])],2)])],2)):ot("",!0),_t($.$slots,"footer")],6)],14,L8))}}),[["__cssModules",{$style:{"search-list":"_search-list_2e8kz_1","list-container":"_list-container_2e8kz_13","item-label":"_item-label_2e8kz_32","loading-state":"_loading-state_2e8kz_40","loading-more":"_loading-more_2e8kz_41","loading-skeleton":"_loading-skeleton_2e8kz_52","is-loading":"_is-loading_2e8kz_59","skeleton-loading":"_skeleton-loading_2e8kz_1","no-results":"_no-results_2e8kz_111","no-results-content":"_no-results-content_2e8kz_118",title:"_title_2e8kz_121",tips:"_tips_2e8kz_127",match:"_match_2e8kz_141"}}]]),B8=["innerHTML"],H8=20,$P=Ct(lt({__name:"AssigneeGroupEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","cancel","start-update"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=kD,r=X=>{const $=X.data;return{name:String(($==null?void 0:$.name)??"Unknown"),initial:String(($==null?void 0:$.initial)??"U"),id:String(X.id),profile_image:($==null?void 0:$.profile_image)??null,color:($==null?void 0:$.color)??{bgColor:"#CCCCCC",textColor:"var(--background-color)"},size:24,isUseShortLabel:!0}},{id:a}=ev(o),l=n,c=X=>{var ce,ue;const $=(ue=(ce=o.params)==null?void 0:ce.api)==null?void 0:ue.getRowNode(String(a.value));$==null||$.setDataValue("assignees",_U(X.assignees)),l("updated",X)},u=Z(!1),d=Z(!1),h=Z(null),f=Z(1),g=Z(!0),m=Z(0),y=Z(""),{isSubmitting:b,unAssignAll:S,replaceAssignees:F,handleSelect:C,assigneeList:R,mergedOptions:E,selectedUserIds:_}=W6({...o,updateRowData:c,value:o.value}),I=Hi("bulkUpdate",!1),{apiServices:O}=po(!I,o),k=Hi("workspaceId"),x=async(X=1,$="",ce=!1)=>{var ue,De,ae,Fe,Me;if(!O.value||!o.id&&!o.ids)throw console.error("API service or item identifiers are undefined"),new Error("API service or item identifiers are undefined");if(ce?d.value=!0:u.value=!0,h.value=null,!((ue=O.value)!=null&&ue.multipleAssignableUser))throw new Error("API service getAssignableUsers is undefined");try{const Je=await((De=O.value)==null?void 0:De.multipleAssignableUser({workspaceId:String(k),itemIds:(o.ids??(o.id?[o.id]:[])).map(String),page:X,perPage:H8,q:$.trim()})),pt=((ae=mp(Je.data))==null?void 0:ae.map(NF))??[];R.value=ce?Jf(R.value,pt,"id"):pt,m.value=Je.meta.total,g.value=(((Fe=Je==null?void 0:Je.meta)==null?void 0:Fe.current_page)||0)<(((Me=Je==null?void 0:Je.meta)==null?void 0:Me.last_page)||0),f.value=X}catch(Je){console.error("Error fetching assignable users:",Je),h.value="Failed to load assignable users"}finally{u.value=!1,d.value=!1}},P=()=>{!d.value&&g.value&&x(f.value+1,y.value,!0)},N=Ho(async X=>{y.value=X,await x(1,X,!1)},gp),G=()=>x(1,y.value,!1),ie=j(dC);vn(()=>{var X;x(1),(X=H.value)==null||X.focus()}),t({getValue:()=>{var X;return(X=E.value.find($=>$.selected))==null?void 0:X.value},refresh:G,clearInternal:()=>{_.value=[]},focus:()=>{var X;(X=H.value)==null||X.focus()}});const B=()=>{const X=sessionStorage.getItem("BASE_URL"),$=Vo({type:"access_setting",config:{baseDomain:X,ws_code:o.workspaceId,entity_id:k}}).url;window.open($,"_blank")},H=Z(null);return vn(()=>{qt(()=>{var X;(X=H.value)==null||X.focus()})}),(X,$)=>(K(),Xe(qC,xn({"selected-id":J(_)},{...o},{options:J(E),loading:u.value,ref_key:"popupRef",ref:H,"loading-more":d.value,"has-more":g.value,onSelect:$[0]||($[0]=ce=>{J(C)(ce),l("start-update")}),onSearch:J(N),onLoadMore:P}),Su({"extra-item":Se(()=>[ye(ft,{variant:"menu-item",onHandleClick:J(S)},{prefix:Se(()=>[we("div",{class:z(X.$style["unassign-icon"])},[ye(gt,{src:"UserXMark",source:"remote"})],2)]),default:Se(()=>[$[1]||($[1]=ut(" Unassign all ",-1))]),_:1},8,["onHandleClick"])]),item:Se(({item:ce,selectedIndex:ue,isSelected:De,handleSelect:ae,handleItemHover:Fe,getHighlightedLabel:Me,query:Je,idx:pt})=>[ye(Op,xn(ce,{hover:pt===ue,selected:De(ce),type:ce.type,onClick:rn(Mt=>ae(ce),["stop","prevent"]),onMouseover:Mt=>Fe(pt),class:X.$style["item-assignee"]}),{prefix:Se(()=>[nt(ye(Ku,Wm(mf(r(ce))),null,16),[[J(s),{user:ce.data,status:"active",timezone:ie.value,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0}]])]),label:Se(({selected:Mt})=>[Je?nt((K(),Ce("span",{key:0,class:z([X.$style["item-label"],X.$style.match]),style:{flex:"1"},innerHTML:Me(ce.label)},null,10,B8)),[[J(i),{content:ce.label}]]):nt((K(),Ce("span",{key:1,class:z(X.$style["item-label"]),style:{flex:"1"}},[ut(bt(ce.label),1)],2)),[[J(i),{content:ce.label}]]),we("div",{class:z(X.$style["item-action"])},[nt((K(),Xe(ft,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:J(b),onClick:rn(Be=>ae(ce),["stop","prevent"])},{prefix:Se(()=>[ye(gt,{src:Mt?"UserMinus":"UserPlus",source:"remote"},null,8,["src"])]),_:2},1032,["disabled","onClick"])),[[J(i),Mt?"Unassign":"Assign"]]),nt((K(),Xe(ft,{variant:["icon","tertiary"],size:24,highlightOnHover:!0,disabled:J(b),onClick:rn(Be=>{var jt;return J(F)((jt=ce.data)==null?void 0:jt.id)},["stop","prevent"])},{prefix:Se(()=>[ye(gt,{src:"IdCardClip",source:"remote"})]),_:1},8,["disabled","onClick"])),[[J(i),"Unassign others and reassign"]])],2)]),_:2},1040,["hover","selected","type","onClick","onMouseover","class"])]),"empty-list":Se(()=>[we("div",{class:z(X.$style["empty-state"])},[$[4]||($[4]=ut(" No assignee available. ",-1)),$[5]||($[5]=we("br",null,null,-1)),ye(ft,{onClick:B,variant:["tertiary"],size:"small"},{default:Se(()=>[...$[3]||($[3]=[ut(" Go to Access Settings to add team. ",-1)])]),_:1})],2)]),_:2},[h.value?{name:"error",fn:Se(()=>[we("div",{class:z(X.$style["error-message"])},[ut(bt(h.value)+" ",1),ye(ft,{onClick:G,size:"small"},{default:Se(()=>[...$[2]||($[2]=[ut(" Retry ",-1)])]),_:1})],2)]),key:"0"}:void 0]),1040,["selected-id","options","loading","loading-more","has-more","onSearch"]))}}),[["__cssModules",{$style:{action:"_action_1dg6a_1","item-assignee":"_item-assignee_1dg6a_6","item-action":"_item-action_1dg6a_6","item-label":"_item-label_1dg6a_16","unassign-icon":"_unassign-icon_1dg6a_25","error-message":"_error-message_1dg6a_36","empty-state":"_empty-state_1dg6a_46"}}]]),G8=lt({__name:"AssignneeUpdateButton",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{},variant:{}},emits:["update"],setup(e,{emit:t}){const n=e;Fa("bulkUpdate",!0);const i=t,o=Z(null),s=f=>{var g;h.value=!1,i("update",f),(g=o.value)==null||g.clearInternal()},{triggerRef:r,popupRef:a,hide:l,isVisible:c}=Qs(),u=Z(null),d=f=>{f.key==="Escape"&&a.value&&l()};vn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.addEventListener("keydown",d)}),Yn(()=>{var g;const f=u.value instanceof HTMLElement?u.value:(g=u.value)==null?void 0:g.$el;f&&f.removeEventListener("keydown",d)}),ct(c,f=>{var g,m;f?(g=o.value)==null||g.focus():(m=o.value)==null||m.clearInternal()});const h=Z(!1);return(f,g)=>(K(),Ce("div",{ref_key:"mainRef",ref:u},[we("div",{ref_key:"triggerRef",ref:r},[ye(ft,{class:"action-button",variant:n.variant,loading:h.value},{default:Se(()=>[ye(gt,{src:"UserPlus",class:"icon"}),g[1]||(g[1]=ut(" Assignee ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:a,style:{display:"none"}},[ye($P,xn({ref_key:"assigneeGroupEditorRef",ref:o},n,{ids:e.ids,onUpdated:s,onStartUpdate:g[0]||(g[0]=m=>h.value=!0)}),null,16,["ids"])],512)],512))}}),$8=["aria-label"],W8=["disabled","readOnly","aria-label","data-date","data-weekday","tabindex","onClick"],z8=Ct(lt({__name:"MainCalendar",props:vE({year:{},month:{},startDate:{},endDate:{},timezone:{default:"UTC"},activeField:{default:"start"},requireConfirm:{type:Boolean,default:!1},locale:{default:"en-US"},weekdayLabelStyle:{default:"narrow"},weekStart:{default:0},cancelLabel:{default:"Cancel"},confirmLabel:{default:"Confirm"},immediatelyUpdate:{type:Boolean,default:!1},disabled:{type:Boolean},readOnly:{type:Boolean},disableConfirm:{type:Boolean,default:!1}},{tracingCase:{default:()=>({case:"",behavior:""})},tracingCaseModifiers:{}}),emits:vE(["select-start","select-end","select-start-utc","select-end-utc","update:activeField","update:tracingCase","update:month","update:year","close","confirm","cancel"],["update:tracingCase"]),setup(e,{emit:t}){const n=e,i=j(()=>n.startDate&&n.endDate),o=cV(e,"tracingCase"),s=t,r=Z(n.year),a=Z(n.month);ct(()=>[n.year,n.month],([B,H])=>{r.value=B,a.value=H});const l=j(()=>tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}).setLocale(n.locale||"en-US").toFormat("LLLL yyyy")),c=j(()=>tt.now().setZone(n.timezone)),u=j(()=>n.startDate?tt.fromJSDate(n.startDate,{zone:n.timezone}):null),d=j(()=>n.endDate?tt.fromJSDate(n.endDate,{zone:n.timezone}):null),h=Z(u.value),f=Z(d.value),g=Z(u.value),m=Z(d.value);ct([u,d],()=>{n.requireConfirm||(h.value=u.value,f.value=d.value,g.value=u.value,m.value=d.value)},{immediate:!0});const y=j(()=>n.requireConfirm?h.value:u.value),b=j(()=>n.requireConfirm?f.value:d.value);ct(()=>n.activeField,B=>{const H=B==="start"?y.value:b.value;H&&(r.value=H.year,a.value=H.month)}),ct(()=>{var B,H;return[(B=y.value)==null?void 0:B.toISODate(),(H=b.value)==null?void 0:H.toISODate(),n.activeField]},()=>{const B=n.activeField==="start"?y.value:b.value;B&&(B.year!==r.value||B.month!==a.value)&&(r.value=B.year,a.value=B.month)});function S(B){return B.setZone("utc")}const F=Z("");function C(B){F.value=B.toISODate()||"",qt(()=>{const H=document.querySelector(`.arbo-calendar-day[data-date="${F.value}"]`);H==null||H.focus()})}ct(()=>{var B,H;return[r.value,a.value,n.activeField,(B=y.value)==null?void 0:B.toISODate(),(H=b.value)==null?void 0:H.toISODate()]},()=>{const B=n.activeField==="start"?y.value:b.value;let H;B&&B.year===r.value&&B.month===a.value?H=B:y.value&&y.value.year===r.value&&y.value.month===a.value?H=y.value:H=c.value,C(H)});function R(B){return B.toFormat("d")}const E=j(()=>{const B=tt.fromObject({year:r.value,month:a.value,day:1},{zone:n.timezone}),H=B.weekday,X=n.weekStart===1?(H+6)%7:H%7;let $=B.minus({days:X});const ce=[],ue=cc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"}),De=Sf();for(let Fe=0;Fe<42;Fe++){const Me=[];$.month!==a.value&&Me.push(De["is-outside"]),$.hasSame(c.value,"day")&&Me.push(De["is-today"]),y.value&&$.hasSame(y.value,"day")&&Me.push(De["is-selected-start"]),b.value&&$.hasSame(b.value,"day")&&Me.push(De["is-selected-end"]),y.value&&b.value&&$>y.value&&$<b.value&&Me.push(De["is-in-range"]);const Je=R($),pt=ue[$.weekday-1]||"";ce.push({dt:$,iso:$.toISODate()||"",label:$.toFormat("d"),displayLabel:Je,weekdayLabel:pt,aria:$.setLocale(n.locale||"en-US").toFormat("cccc, d LLLL yyyy"),classes:Me}),$=$.plus({days:1})}const ae=[];for(let Fe=0;Fe<6;Fe++)ae.push(ce.slice(Fe*7,Fe*7+7));return ae}),_=j(()=>{const B=cc.weekdays(n.weekdayLabelStyle||"short",{locale:n.locale||"en-US"});return n.weekStart===1?B:[B[6],...B.slice(0,6)]});function I(B,H,X){const $=B==="start"?H.startOf("day"):H.endOf("day"),ce=S($),ue={year:$.year,month:$.month,day:$.day,utc:ce.toISO()||""};B==="start"?(s("select-start",ue,X??!0),s("select-start-utc",ue.utc)):(s("select-end",ue),s("select-end-utc",ue.utc))}function O(B){let H=r.value,X=a.value+B;for(;X<1;)X+=12,H-=1;for(;X>12;)X-=12,H+=1;r.value=H,a.value=X,s("update:year",H),s("update:month",X)}function k(B){const X=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).plus({days:B});(X.month!==a.value||X.year!==r.value)&&(a.value=X.month,r.value=X.year,s("update:year",X.year),s("update:month",X.month)),C(X)}function x(B=!1){const X=(F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value).weekday%7,$=B?6-X:-X;k($)}function P(B){switch(B.key){case"ArrowLeft":B.preventDefault(),k(-1);break;case"ArrowRight":B.preventDefault(),k(1);break;case"ArrowUp":B.preventDefault(),k(-7);break;case"ArrowDown":B.preventDefault(),k(7);break;case"Home":B.preventDefault(),x(!1);break;case"End":B.preventDefault(),x(!0);break;case"PageUp":B.preventDefault(),O(B.shiftKey?-12:-1);break;case"PageDown":B.preventDefault(),O(B.shiftKey?12:1);break;case"Enter":case" ":{B.preventDefault();const H=F.value?tt.fromISO(F.value,{zone:n.timezone}):c.value,X=E.value.flat().find($=>$.iso===H.toISODate());X&&N(X);break}}}function N(B){var Be,jt;const H=!!u.value,X=!!d.value,$=n.activeField,ce=((Be=u.value)==null?void 0:Be.toISODate())||"null",ue=((jt=d.value)==null?void 0:jt.toISODate())||"null",De=B.dt.toISODate()||"",ae=(nn,Ot)=>{o.value={case:nn,behavior:Ot}},Fe=()=>`Selected start ${De} > existing end ${ue} -> reset both to ${De}`,Me=()=>`Selected end ${De} < existing start ${ce} -> reset both to ${De}`,Je=()=>{I("start",B.dt,!0),I("end",B.dt),s("update:activeField","end")},pt=(nn=!1)=>{I("start",B.dt,nn),nn&&s("update:activeField","end")},Mt=(nn=!1)=>{console.trace("doSelectEnd called with closeAfter:",nn,n.immediatelyUpdate),I("end",B.dt),nn&&s("close")};if(H&&X){$==="start"?d.value&&B.dt>d.value?(Je(),ae("INVERT_RANGE_FROM_START",Fe())):(pt(!1),ae("UPDATE_START_IN_RANGE",`Updated start from ${ce} to ${De}; end remains ${ue}`)):u.value&&B.dt<u.value?(Je(),ae("INVERT_RANGE_FROM_END",Me())):(Mt(!1),ae("UPDATE_END_IN_RANGE",`Updated end from ${ue} to ${De}; start remains ${ce}`));return}if(!H&&X&&$==="start"&&d.value&&B.dt>d.value){Je(),ae("CREATE_RANGE_FROM_LATE_START",Fe());return}if(H&&!X&&$==="end"&&u.value&&B.dt<u.value){Je(),ae("CREATE_RANGE_FROM_EARLY_END",Me());return}if(!H&&!X){if($==="start"){pt(!0),ae("INIT_START",`Picked start ${De}; awaiting end selection`);return}Mt(n.immediatelyUpdate),ae("INIT_END",`Picked end ${De}; awaiting start selection`);return}if(!H&&X){if($==="start"){pt(!0),ae("FILL_MISSING_START",`Inserted start ${De}; existing end ${ue}`);return}Mt(!1),ae("STRICT_UPDATE_END_ONLY",`Updated end to ${De}; start still null`);return}if(H&&!X){if($==="start"){pt(!0),ae("RESELECT_START_BEFORE_END",`Replaced start with ${De}; end still null, switching to end`);return}Mt(n.immediatelyUpdate),ae("FILL_MISSING_END",`Picked end ${De}; start ${ce}`);return}}function G(){g.value=h.value,m.value=f.value,s("confirm")}function ie(){h.value=g.value,f.value=m.value,s("cancel")}return(B,H)=>(K(),Ce("div",{class:z([B.$style["arbo-calendar"],{[B.$style["arbo-date-range-picker"]]:i.value}]),role:"grid","aria-label":l.value,tabindex:"0",onKeydown:P},[we("div",{class:z([B.$style["arbo-calendar-header"],B.$style["arbo-calendar-week"]]),role:"row"},[(K(!0),Ce(kt,null,Un(_.value,X=>(K(),Ce("div",{key:X,class:z(B.$style["arbo-calendar-weekday"]),role:"columnheader"},bt(X),3))),128))],2),we("div",{class:z(B.$style["arbo-calendar-weeks"])},[(K(!0),Ce(kt,null,Un(E.value,(X,$)=>(K(),Ce("div",{key:$,class:z(B.$style["arbo-calendar-week"]),role:"row"},[(K(!0),Ce(kt,null,Un(X,ce=>(K(),Ce("div",{key:ce.iso,class:z([B.$style["arbo-calendar-day"],ce.classes,{[B.$style["is-focused"]]:ce.iso===F.value}]),disabled:n.disabled,readOnly:n.readOnly,role:"gridcell","aria-label":ce.aria,"data-date":ce.iso,"data-weekday":ce.weekdayLabel,tabindex:ce.iso===F.value?0:-1,onClick:ue=>N(ce)},bt(ce.displayLabel),11,W8))),128))],2))),128))],2),n.readOnly?ot("",!0):(K(),Ce("div",{key:0,class:z(B.$style["arbo-calendar-actions"])},[ye(ft,{disabled:n.disabled,readOnly:n.readOnly,variant:"secondary",size:"medium",onClick:ie},{default:Se(()=>[ut(bt(n.cancelLabel),1)]),_:1},8,["disabled","readOnly"]),ye(ft,{disabled:n.disabled||n.disableConfirm,readOnly:n.readOnly,variant:"primary",size:"medium",onClick:G},{default:Se(()=>[ut(bt(n.confirmLabel),1)]),_:1},8,["disabled","readOnly"])],2))],42,$8))}}),[["__cssModules",{$style:{"arbo-date-range-picker":"_arbo-date-range-picker_1xc07_1","arbo-calendar-day":"_arbo-calendar-day_1xc07_2","arbo-calendar-week":"_arbo-calendar-week_1xc07_3","arbo-calendar":"_arbo-calendar_1xc07_2","arbo-calendar-nav":"_arbo-calendar-nav_1xc07_37","arbo-calendar-nav-btn":"_arbo-calendar-nav-btn_1xc07_45","arbo-calendar-nav-label":"_arbo-calendar-nav-label_1xc07_52","arbo-calendar-weekday":"_arbo-calendar-weekday_1xc07_57","arbo-calendar-weeks":"_arbo-calendar-weeks_1xc07_62","is-today":"_is-today_1xc07_93","is-selected-start":"_is-selected-start_1xc07_99","is-outside":"_is-outside_1xc07_108","is-selected-end":"_is-selected-end_1xc07_108","is-in-range":"_is-in-range_1xc07_136","arbo-calendar-actions":"_arbo-calendar-actions_1xc07_141","arbo-calendar-btn":"_arbo-calendar-btn_1xc07_150",cancel:"_cancel_1xc07_159",confirm:"_confirm_1xc07_164"}}]]),U8=Ct(lt({__name:"CalendarNavigationControl",props:{year:{},month:{},minYear:{default:1970},maxYear:{default:2100},yearSpan:{default:12},monthLabels:{},locale:{default:"en-US"},monthLabelStyle:{default:"short"},ariaPrevLabel:{default:"Previous"},ariaNextLabel:{default:"Next"},ariaToolbarLabel:{default:"Calendar navigation"},ariaSelectYearLabel:{default:"Select year"},ariaSelectMonthLabel:{default:"Select month"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["update:year","update:month","mode-change","year-selected","month-selected"],setup(e,{emit:t}){const n=e,i=j(()=>{if(n.monthLabels&&n.monthLabels.length===12)return n.monthLabels;const x=n.locale||"en-US",P=n.monthLabelStyle||"short",N=new Intl.DateTimeFormat(x,{month:P,timeZone:"UTC"});return Array.from({length:12},(ie,B)=>N.format(new Date(Date.UTC(2020,B,1))))}),o=t,s=Z(n.year),r=Z(n.month);ct(()=>n.year,x=>{x!==s.value&&(s.value=x)}),ct(()=>n.month,x=>{x!==r.value&&(r.value=x)});const a=Z("days");function l(x){a.value!==x&&(a.value=x,o("mode-change",x))}const c=j(()=>n.minYear),u=j(()=>n.maxYear),d=j(()=>{const x=n.yearSpan;return s.value-s.value%x}),h=j(()=>d.value+n.yearSpan-1);function f(){const x=n.yearSpan,P=d.value-x;P>=c.value&&(s.value=P)}function g(){const x=n.yearSpan,P=d.value+x;P<=u.value&&(s.value=P)}const m=j(()=>d.value-n.yearSpan<c.value),y=j(()=>h.value+n.yearSpan>u.value),b=j(()=>{const x=n.yearSpan;return Math.ceil(x/3)});function S(x){const N=d.value+(x-1)*3;return Array.from({length:3},(G,ie)=>N+ie).filter(G=>G<=h.value)}function F(){a.value==="months"?l("days"):l("months")}function C(){a.value==="years"?l("days"):l("years")}function R(x){s.value=x,o("update:year",x),o("year-selected",x),l("months")}function E(x){r.value=x,o("update:month",x),o("month-selected",x),l("days")}function _(){if(a.value==="days"){let x=s.value,P=r.value-1;if(P<1&&(P=12,x--),x<c.value)return;s.value=x,r.value=P,o("update:year",x),o("update:month",P)}else if(a.value==="months"){if(s.value-1<c.value)return;s.value--,o("update:year",s.value)}else a.value==="years"&&f()}function I(){if(a.value==="days"){let x=s.value,P=r.value+1;if(P>12&&(P=1,x++),x>u.value)return;s.value=x,r.value=P,o("update:year",x),o("update:month",P)}else if(a.value==="months"){if(s.value+1>u.value)return;s.value++,o("update:year",s.value)}else a.value==="years"&&g()}const O=j(()=>a.value==="days"?s.value===c.value&&r.value===1:a.value==="months"?s.value-1<c.value:m.value),k=j(()=>a.value==="days"?s.value===u.value&&r.value===12:a.value==="months"?s.value+1>u.value:y.value);return(x,P)=>(K(),Ce("div",{class:z(x.$style["cal-nav-wrapper"])},[_t(x.$slots,"selection"),we("div",{class:z(x.$style["cal-nav-bar"]),role:"toolbar","aria-label":"Calendar navigation"},[ye(ft,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.prev]),"aria-label":"Previous",disabled:O.value,label:"",onClick:_},{default:Se(()=>[ye(gt,{src:"ChevronLeft",source:"remote"})]),_:1},8,["class","disabled"]),we("div",{class:z(x.$style["cal-nav-center"])},[ye(ft,{"aria-pressed":a.value==="months",onClick:F,variant:"secondary"},{default:Se(()=>[ut(bt(i.value[r.value-1]),1)]),_:1},8,["aria-pressed"]),ye(ft,{variant:"secondary","aria-pressed":a.value==="years",onClick:C},{default:Se(()=>[ut(bt(s.value),1)]),_:1},8,["aria-pressed"])],2),ye(ft,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.next]),"aria-label":"Next",disabled:k.value,label:"",onClick:I},{default:Se(()=>[ye(gt,{src:"ChevronRight",source:"remote"})]),_:1},8,["class","disabled"])],2),a.value==="years"?(K(),Ce("div",{key:0,class:z(x.$style["year-grid"])},[we("div",{class:z(x.$style["year-grid-header"])},[ye(ft,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.prev]),"aria-label":"Next",disabled:m.value,"prefix-icon":"AnglesRight",label:"",onClick:f},{default:Se(()=>[ye(gt,{src:"AnglesRight",source:"remote",class:z(x.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"]),we("div",{class:z(x.$style["range-label"])},bt(d.value)+" - "+bt(h.value),3),ye(ft,{variant:"secondary",class:z([x.$style["cal-nav-btn"],x.$style.next]),"aria-label":"Next",disabled:y.value,"prefix-icon":"AnglesRight",label:"",onClick:g},{default:Se(()=>[ye(gt,{src:"AnglesRight",source:"remote",class:z(x.$style["arbo-label__prefix--icon"])},null,8,["class"])]),_:1},8,["class","disabled"])],2),we("div",{class:z(x.$style["year-grid-body"]),role:"grid"},[(K(!0),Ce(kt,null,Un(b.value,N=>(K(),Ce("div",{key:"yr-row-"+N,class:z(x.$style["year-grid-row"]),role:"row"},[(K(!0),Ce(kt,null,Un(S(N),G=>(K(),Xe(ft,{key:G,variant:"secondary",class:z([x.$style["year-cell"],{[x.$style.selected]:G===s.value}]),role:"gridcell",disabled:G<c.value||G>u.value,onClick:ie=>R(G)},{default:Se(()=>[ut(bt(G),1)]),_:2},1032,["class","disabled","onClick"]))),128))],2))),128))],2)],2)):a.value==="months"?(K(),Ce("div",{key:1,class:z(x.$style["month-grid"]),role:"dialog","aria-label":"Select month"},[we("div",{class:z(x.$style.months),role:"grid"},[(K(!0),Ce(kt,null,Un(i.value,(N,G)=>(K(),Xe(ft,{disabled:n.disabled,"read-only":n.readOnly,key:N,variant:"secondary",class:z([x.$style["month-cell"],{[x.$style.selected]:G+1===r.value}]),role:"gridcell",onClick:ie=>E(G+1)},{default:Se(()=>[ut(bt(N),1)]),_:2},1032,["disabled","read-only","class","onClick"]))),128))],2)],2)):(K(),Ce("div",{key:2,class:z(x.$style["days-slot"])},[_t(x.$slots,"default",{year:s.value,month:r.value,mode:a.value})],2))],2))}}),[["__cssModules",{$style:{"cal-nav-wrapper":"_cal-nav-wrapper_lnmem_1","cal-nav-bar":"_cal-nav-bar_lnmem_11","cal-nav-btn":"_cal-nav-btn_lnmem_19","year-grid-header":"_year-grid-header_lnmem_33",prev:"_prev_lnmem_33","cal-nav-center":"_cal-nav-center_lnmem_45","cal-nav-label":"_cal-nav-label_lnmem_51","month-grid":"_month-grid_lnmem_65","year-grid":"_year-grid_lnmem_33",months:"_months_lnmem_78","month-cell":"_month-cell_lnmem_85","pg-btn":"_pg-btn_lnmem_100","year-grid-body":"_year-grid-body_lnmem_113","year-grid-row":"_year-grid-row_lnmem_120","year-cell":"_year-cell_lnmem_126",selected:"_selected_lnmem_134","days-slot":"_days-slot_lnmem_143","range-label":"_range-label_lnmem_147"}}]]);function j8(e){const{format:t="dd/MM/yyyy",timezone:n="local",minDate:i,maxDate:o}=e,s=Z(""),r=j(()=>{const m=tt.fromFormat(s.value,t,{zone:n});return m.isValid?m:null}),a=j(()=>{if(!i||!r.value)return!0;const m={year:i.getFullYear(),month:i.getMonth()+1,day:i.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year>m.year?!0:y.year<m.year?!1:y.month>m.month?!0:y.month<m.month?!1:l(y,m)>=0}),l=(m,y)=>{const b=new Date(m.year,m.month-1,m.day),S=new Date(y.year,y.month-1,y.day);return b<S?-1:b>S?1:0},c=j(()=>{if(!o||!r.value)return!0;const m={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},y={year:r.value.year,month:r.value.month,day:r.value.day};return y.year<m.year?!0:y.year>m.year?!1:y.month<m.month?!0:y.month>m.month?!1:l(y,m)<=0}),u=j(()=>s.value.length==0||s.value.length>0&&r.value!==null&&a.value&&c.value),d=j(()=>s.value.length===t.length&&u.value);return{inputValue:s,isValid:u,isComplete:d,clear:()=>{s.value=""},setDate:m=>{let y;m instanceof Date?y=tt.fromJSDate(m,{zone:n}):y=m.setZone(n),y.isValid?s.value=y.toFormat(t):s.value=""},getDate:()=>u.value?r.value:null}}const K8=["disabled","readonly","placeholder"],WP=Ct(lt({__name:"DateInput",props:{modelValue:{},format:{default:"dd/MM/yyyy"},showDebug:{type:Boolean,default:!0},allowPastDates:{type:Boolean,default:!0},allowFutureDates:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},timezone:{default:""},placeholder:{default:""},size:{},minDate:{default:void 0},maxDate:{default:void 0}},emits:["complete","invalid","clear"],setup(e,{expose:t,emit:n}){const i=yn,o=e,s=n,r=Z(null),a=Z(null),{isValid:l,isComplete:c,inputValue:u,clear:d,setDate:h,getDate:f}=j8({format:o.format,allowPastDates:o.allowPastDates,allowFutureDates:o.allowFutureDates,timezone:o.timezone,minDate:o.minDate,maxDate:o.maxDate}),g=j(()=>o.active),m=j(()=>({disabled:o.disabled,error:!l.value&&u.value.length>0,readOnly:o.readOnly,isEmpty:u.value.length===0,inputRef:r,wrapperRef:a,active:g})),{argsMain:y,isHover:b,isFocus:S}=ir(m),F=R=>{var _;const E=(_=R.clipboardData)==null?void 0:_.getData("text/plain");E&&(u.value=E.trim())},C=()=>{d(),s("clear")};return t({clear:C,setDate:h,getDate:f,focus:()=>{var R;return(R=r.value)==null?void 0:R.focus()}}),ct(()=>o.modelValue,R=>{R?h(R):d()},{immediate:!0}),ct([()=>c.value,()=>u.value],()=>{if(u.value.length===0){s("complete",null);return}else if(l.value&&!o.readOnly&&!o.disabled&&c.value){const R=f();(R||u.value.length===0)&&s("complete",R)}}),ct(()=>l.value,R=>{R||s("invalid","")}),(R,E)=>(K(),Xe(or,xn(J(y),{ref_key:"wrapperRef",ref:a,size:26,style:{padding:0,background:"var(--bg-secondary,)"}}),{default:Se(()=>{var _;return[we("div",{class:z([R.$style["date-input-wrapper"]])},[ye(gt,{src:"Calendar",source:"remote",class:z(R.$style["icon-calendar"]),color:"var(--primary-color)"},null,8,["class"]),nt(we("input",{disabled:o.disabled,readonly:o.readOnly,ref_key:"inputRef",ref:r,type:"text","onUpdate:modelValue":E[0]||(E[0]=I=>Qt(u)?u.value=I:null),onPaste:rn(F,["prevent"]),placeholder:(_=o.format)==null?void 0:_.toLocaleUpperCase(),class:z([R.$style["date-input"]])},null,42,K8),[[PR,J(u)]]),_t(R.$slots,"clear",{handleClear:C},()=>[J(u).length>0&&!o.readOnly&&!o.disabled&&(J(b)||J(S))?nt((K(),Xe(ft,{key:0,variant:["icon","primary"],onClick:rn(C,["stop"]),size:16,rounded:!0},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote",size:"8",color:"white"})]),_:1})),[[J(i),"Clear"]]):ot("",!0)])],2)]}),_:3},16))}}),[["__cssModules",{$style:{"date-input-wrapper":"_date-input-wrapper_fako3_1","icon-calendar":"_icon-calendar_fako3_9",focus:"_focus_fako3_12",hover:"_hover_fako3_12",active:"_active_fako3_12","date-input":"_date-input_fako3_1",invalid:"_invalid_fako3_38"}}]]),q8=lt({__name:"Calendar",props:{params:{},label:{},value:{},timezone:{default:fC()},format:{default:"LLL dd"},placeholder:{},enableRangeFeedback:{type:Boolean},messages:{},isCompleted:{type:Boolean},isStarted:{type:Boolean},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},size:{},duePlaceholder:{default:"No due"},startPlaceholder:{default:"No start"},startTooltip:{default:"Select start date"},dueTooltip:{default:"Select due date"},showCalendarIcon:{type:Boolean,default:!0},locale:{default:"en-US"},immediatelyUpdate:{type:Boolean,default:!1}},emits:["clearStart","clearDue","clearAll","update","update:start","update:end","range:invalid","range:corrected","tracing","confirmed","closed","start-update","finish-update"],setup(e,{expose:t,emit:n}){const i=Z({case:"",behavior:""}),o=e,s=Z(null),r=n,a=async(ce,ue)=>{var De,ae;r("start-update"),await ce(),(ae=(De=o.params)==null?void 0:De.api)==null||ae.stopEditing(),qt(()=>{ue(),r("finish-update")})},l=(ce,ue)=>{var De,ae;ce(),(ae=(De=o.params)==null?void 0:De.api)==null||ae.stopEditing(),qt(()=>{ue()})},c=Ao({start:!1,end:!1}),{states:u,selectEndDate:d,cancelSelection:h,confirmSelection:f,selectStartDate:g,beginInteraction:m,clearStart:y,clearDue:b}=j6(o,r,i),S=j(()=>{if(u.isSelectingStart)return"start";if(u.isSelectingEnd)return"end"}),F=ce=>{if(!ce){c.start=!1,y();return}const ue=u.endDate?tt.fromJSDate(u.endDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)>0){const ae={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(ae,!1),d(ae),qt(()=>{u.isSelectingStart=!0,u.isSelectingEnd=!1});return}const De={year:ce.year,month:ce.month,day:ce.day};c.start=!1,g(De,!0)},C=(ce,ue)=>{const De=ce.startOf("day"),ae=ue.startOf("day");return De<ae?-1:De>ae?1:0},R=ce=>{if(!ce){c.end=!1,b();return}const ue=u.startDate?tt.fromJSDate(u.startDate,{zone:o.timezone}):null;if(ue&&C(ce,ue)<0){const ae={year:ce.year,month:ce.month,day:ce.day};c.end=!1,g(ae),d(ae),qt(()=>{u.isSelectingEnd=!0,u.isSelectingStart=!1});return}const De={year:ce.year,month:ce.month,day:ce.day};c.end=!1,d(De)},E=()=>{y()},_=()=>{b()},I=()=>{P()},O=j(()=>u.isSelectingStart||u.isSelectingEnd);function k(){o.disabled||o.readOnly||(m(),u.isSelectingStart=!0,u.isSelectingEnd=!1)}function x(){o.disabled||o.readOnly||(m(),u.isSelectingEnd=!0,u.isSelectingStart=!1)}function P(){u.isSelectingStart=!1,u.isSelectingEnd=!1,r("closed")}function N(ce){ce.key==="Escape"&&(ce.stopPropagation(),P())}const G=Z(new Date().getFullYear()),ie=Z(new Date().getMonth()+1);ct(()=>[u.isSelectingStart,u.isSelectingEnd,u.startDate,u.endDate],()=>{u.isSelectingStart&&u.startDate?(G.value=u.startDate.getFullYear(),ie.value=u.startDate.getMonth()+1):u.isSelectingEnd&&u.endDate&&(G.value=u.endDate.getFullYear(),ie.value=u.endDate.getMonth()+1)},{immediate:!0});const B=Z(null);function H(){if(Array.isArray(o.value)){const[ue,De]=o.value;u.startDate=ue||null,u.endDate=De||null}u.isSelectingStart=!1,u.isSelectingEnd=!1;const ce=u.startDate||u.endDate||new Date;G.value=ce.getFullYear(),ie.value=ce.getMonth()+1}ct(()=>{var ce,ue,De,ae,Fe,Me,Je,pt;return[((De=(ue=(ce=o.value)==null?void 0:ce[0])==null?void 0:ue.getTime)==null?void 0:De.call(ue))||((ae=o.value)==null?void 0:ae[0]),((Je=(Me=(Fe=o.value)==null?void 0:Fe[1])==null?void 0:Me.getTime)==null?void 0:Je.call(Me))||((pt=o.value)==null?void 0:pt[1]),o.timezone,o.format,o.placeholder,o.enableRangeFeedback]},()=>{H()},{immediate:!0,deep:!0}),t({resetCalendarLogic:H,openStart:k,openEnd:x,closePicker:P,clearAll:I,isOpen:O,drpRef:B,getValues:()=>({startDate:u.startDate,endDate:u.endDate,dateRange:[u.startDate,u.endDate]}),focus:()=>{var ce;u.startDate||u.endDate?u.startDate?k():x():(k(),(ce=s.value)==null||ce.focus())}});const $=Z(null);return ct(()=>O.value,ce=>{if(o.disabled||o.readOnly)return;const ue=$.value;ue&&(ce?ue.show():ue.hide())},{immediate:!0}),(ce,ue)=>(K(),Ce("div",{class:z(ce.$style["calendar-wrapper"])},[ye(U8,{year:G.value,"onUpdate:year":ue[6]||(ue[6]=De=>G.value=De),month:ie.value,"onUpdate:month":ue[7]||(ue[7]=De=>ie.value=De),locale:o.locale,disabled:o.disabled,readOnly:o.readOnly,onKeydown:N},{selection:Se(()=>[we("div",{class:z(ce.$style["calendar-input-section"])},[ye(WP,{ref_key:"starDateRef",ref:s,"model-value":J(u).startDate,placeholder:o.startPlaceholder,timezone:o.timezone,active:J(u).isSelectingStart,onClick:k,onClear:E,onComplete:F,onInvalid:ue[0]||(ue[0]=De=>c.start=!0),disabled:o.disabled,readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"]),ye(WP,{"model-value":J(u).endDate,placeholder:o.duePlaceholder,timezone:o.timezone,active:J(u).isSelectingEnd,onClick:x,onClear:_,disabled:o.disabled,onComplete:R,onInvalid:ue[1]||(ue[1]=De=>c.end=!0),readOnly:o.readOnly},null,8,["model-value","placeholder","timezone","active","disabled","readOnly"])],2)]),default:Se(({year:De,month:ae})=>[ye(z8,{disabled:o.disabled,disableConfirm:c.end||c.start,readOnly:o.readOnly,ref_key:"drpRef",ref:B,"tracing-case":i.value,"onUpdate:tracingCase":ue[2]||(ue[2]=Fe=>i.value=Fe),year:De,month:ae,"start-date":J(u).startDate,"end-date":J(u).endDate,"active-field":S.value,timezone:o.timezone,immediatelyUpdate:e.immediatelyUpdate,onSelectStart:J(g),onSelectEnd:J(d),onConfirm:ue[3]||(ue[3]=()=>{a(J(f),P)}),onCancel:ue[4]||(ue[4]=Fe=>l(J(h),P)),onClose:ue[5]||(ue[5]=Fe=>a(J(f),P))},null,8,["disabled","disableConfirm","readOnly","tracing-case","year","month","start-date","end-date","active-field","timezone","immediatelyUpdate","onSelectStart","onSelectEnd"])]),_:1},8,["year","month","locale","disabled","readOnly"])],2))}}),zP=Ct(q8,[["__cssModules",{$style:{"calendar-wrapper":"_calendar-wrapper_f7hcw_1","calendar-input-section":"_calendar-input-section_f7hcw_10","display-wrapper":"_display-wrapper_f7hcw_18","calendar-actions":"_calendar-actions_f7hcw_22","clear-all-btn":"_clear-all-btn_f7hcw_28"}}]]),Y8={ref:"mainRef"},Z8=lt({__name:"DateUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=t,i=e,o=Hi("bulkUpdate",!1),{apiServices:s}=po(!o,i),r=async g=>{var y,b;f.value=!0;const m={workspaceId:i.workspaceId,itemIds:i.ids,startDate:g.start?LF(g.start):null,dueDate:g.end?LF(g.end):null};await((b=(y=s.value)==null?void 0:y.changeDate)==null?void 0:b.call(y,m).then(()=>{n("updated",{workspaceId:i.workspaceId,itemIds:i.ids,data:[g.start,g.end]})})),f.value=!1};ct(()=>i.ids,g=>{h.value=[null,null]});const a=Z(null),{triggerRef:l,popupRef:c,hide:u,isVisible:d}=Qs(),h=Z([null,null]);ct(d,g=>{var m;g&&((m=a.value)==null||m.focus())});const f=Z(!1);return(g,m)=>(K(),Ce("div",Y8,[we("div",{ref_key:"triggerRef",ref:l},[ye(ft,{variant:i.variant,loading:f.value},{default:Se(()=>[ye(gt,{src:"Calendar"}),m[1]||(m[1]=ut(" Date ",-1))]),_:1},8,["variant","loading"])],512),we("div",{ref_key:"popupRef",ref:c,style:{display:"none"}},[ye(zP,{immediatelyUpdate:!1,value:h.value,onConfirmed:r,ref_key:"calendarRef",ref:a,onClosed:J(u),onStartUpdate:m[0]||(m[0]=y=>f.value=!0)},null,8,["value","onClosed"])],512)],512))}}),UP=Ct(lt({__name:"DropdownWrapper",props:{placement:{default:"bottom-start"},show:{type:Boolean,default:!1},maxWidth:{default:400}},emits:["open","close"],setup(e,{expose:t,emit:n}){const i=e,o=n,{hide:s,triggerRef:r,popupRef:a,isVisible:l}=Qs({placement:i.placement,trigger:"click",interactive:!0,arrow:!1,offset:[0,4],showOnInit:i.show,maxWidth:i.maxWidth}),c=j(()=>l.value);ct(l,h=>{o(h?"open":"close")});const u=()=>{s()};t({closeDropdown:u,isOpen:c});const d=h=>{h.key==="Escape"&&a.value&&s()};return vn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.addEventListener("keydown",d)}),Yn(()=>{var f;const h=r.value instanceof HTMLElement?r.value:(f=r.value)==null?void 0:f.$el;h&&h.removeEventListener("keydown",d)}),(h,f)=>(K(),Ce("div",{ref_key:"triggerRef",ref:r,class:z(h.$style["dropdown-wrapper"])},[_t(h.$slots,"trigger",{open:J(l)},()=>[we("button",{class:z(h.$style["editable-dropdown__trigger"]),"aria-label":"Select or type"}," ▼ ",2)]),we("div",{ref_key:"popupRef",ref:a,class:z(h.$style["dropdown-content"]),style:mn({display:J(l)?"block":"none",maxWidth:i.maxWidth?i.maxWidth+"px":"unset"})},[_t(h.$slots,"content",{closeDropdown:u,visible:J(l)},()=>[we("div",{class:z(h.$style["dropdown-list"])},null,2)])],6)],2))}}),[["__cssModules",{$style:{"dropdown-wrapper":"_dropdown-wrapper_1fn64_1","dropdown-content":"_dropdown-content_1fn64_5","dropdown-list":"_dropdown-list_1fn64_9"}}]]),jP=lt({__name:"StatusEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},ids:{}},emits:["updated","error","cancel","start-update"],setup(e,{expose:t,emit:n}){const i={PER_PAGE:50,INITIAL_PAGE:1},o=e,s=n,r=Z([]),a=Z(!1),l=Z(!1),c=Z(null),u=Z(i.INITIAL_PAGE),d=Z(!0),h=Z(0),f=Z(""),g=j(()=>{var k;return(k=o.value)==null?void 0:k.id}),m=j(()=>!!(o.id||o.ids&&o.ids.length>0)),y=k=>({label:k.name,value:k.id,selected:g.value===k.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:k,id:k.id,color:k.color}),b=j(()=>{const k=new Set;return o.id&&k.add(String(o.id)),o.ids&&o.ids.forEach(x=>{x&&k.add(String(x))}),Array.from(k)}),S=Hi("bulkUpdate",!1),{apiServices:F}=po(!S,o),C=async(k=i.INITIAL_PAGE,x="",P=!1)=>{var N,G,ie,B;if(!m.value){console.error("Missing required props",o);return}P?l.value=!0:a.value=!0,c.value=null;try{const H={workspaceId:String(o.workspaceId),itemIds:b.value,page:k,perPage:i.PER_PAGE,name_like:x.trim()};if(((N=F.value)==null?void 0:N.getAssignableStatus)===void 0)throw new Error("API service getAssignableStatus is undefined");const X=await((G=F.value)==null?void 0:G.getAssignableStatus(H));if(!(X!=null&&X.data)){P||(r.value=[]),d.value=!1;return}const $=X.data.map(y);r.value=P?[...r.value,...$]:$,h.value=((ie=X.meta)==null?void 0:ie.total)??X.data.length,d.value=!((B=X.meta)!=null&&B.on_last_page),u.value=k}catch(H){console.error("Error fetching statuses:",H),c.value="Failed to load statuses",P||(r.value=[]),d.value=!1,s("error",c.value)}finally{a.value=!1,l.value=!1}},R=Ho(async k=>{f.value=k,u.value=i.INITIAL_PAGE,await C(i.INITIAL_PAGE,k,!1)},gp),E=async()=>{!d.value||l.value||await C(u.value+1,f.value,!0)},_=async k=>{var x,P,N;if(!m.value){console.error("Missing required props for updating status",o);return}try{s("start-update");const G=await F.value.updateItemStatus({workspaceId:String(o.workspaceId),itemIds:b.value,statusId:String(k.value)});if(!(G!=null&&G.message))throw s("error","API did not return success"),new Error("API did not return success");o.params&&((P=o.params)==null||P.node.setData({...(x=o.params)==null?void 0:x.node.data,status:{id:k.id,name:k.label,color:k.color}}),(N=o.params)==null||N.api.stopEditing()),s("updated",{workspaceId:String(o.workspaceId),itemIds:b.value,data:{id:k.id,name:k.label,color:k.color}})}catch(G){console.error("Error updating status:",G),c.value="Failed to update status",s("error",c.value)}},I=j(()=>r.value.map(k=>({...k})));ct([()=>o.id,()=>o.workspaceId,()=>o.ids],()=>{C()},{deep:!0,immediate:!0}),t({refresh:()=>C(i.INITIAL_PAGE,f.value,!1),loadMore:E});const O=Z(null);return vn(()=>{qt(()=>{var k;(k=O.value)==null||k.focus()})}),(k,x)=>{var P;return K(),Xe(qC,xn({ref_key:"popupRef",ref:O},o,{"selected-id":(P=o.value)==null?void 0:P.id,options:I.value,loading:a.value,"loading-more":l.value,"has-more":d.value,error:c.value,onSearch:J(R),onSelect:_,onLoadMore:E,onCancel:x[0]||(x[0]=N=>s("cancel"))}),null,16,["selected-id","options","loading","loading-more","has-more","error","onSearch"])}}}),X8=lt({__name:"StatusUpdateButton",props:{ids:{},workspaceId:{},entityId:{},variant:{}},emits:["updated"],setup(e,{emit:t}){const n=e,i=j(()=>{const g=Si();return g==null?void 0:g.appContext.config.globalProperties.apiServices}),{popupRef:o,triggerRef:s,isVisible:r,hide:a}=Qs(),l=t,c=Z(!1),u=g=>{c.value=!1,l("updated",g),a()},d=j(()=>({apiServices:i.value,ids:n.ids,workspaceId:n.workspaceId,entityId:n.entityId})),h=Z(null),f=g=>{g.key==="Escape"&&o.value&&a()};return vn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.addEventListener("keydown",f)}),Yn(()=>{var m;const g=h.value instanceof HTMLElement?h.value:(m=h.value)==null?void 0:m.$el;g&&g.removeEventListener("keydown",f)}),Fa("bulkUpdate",!0),(g,m)=>(K(),Ce("div",{ref_key:"mainRef",ref:h},[ye(ft,{ref_key:"triggerRef",ref:s,variant:e.variant,loading:c.value},{default:Se(()=>[ye(gt,{src:"Square",class:"icon"}),m[2]||(m[2]=ut(" Status ",-1))]),_:1},8,["variant","loading"]),we("div",{ref_key:"popupRef",ref:o},[J(r)?(K(),Xe(jP,xn({key:0},d.value,{onUpdated:u,onCancel:J(a),onStartUpdate:m[0]||(m[0]=y=>c.value=!0),onError:m[1]||(m[1]=y=>c.value=!1)}),null,16,["onCancel"])):ot("",!0)],512)],512))}}),YC=Ap("bulkUpdate",()=>{const e=Ao({loaded:0,total:0}),t=u=>{e.total=u},n=u=>{e.loaded=u},i=Ao({isBulkUpdating:!1});function o(u){i.isBulkUpdating=u}const s=Z({}),r=u=>{s.value=u},a=(u,d)=>{s.value[u]=d},l=Z(0);return{bulkUpdateState:i,setIsBulkUpdating:o,selectionIds:s,setSelectionIds:r,setCheckedForId:a,setSelectionStatus:u=>{l.value=u},selectionStatus:l,rowCount:e,setTotalRowCount:t,setLoadedRowCount:n}}),J8=Ct(lt({__name:"BulkUpdate",props:{selectRowData:{},workspaceId:{},entityId:{},gridApi:{},selectedAll:{type:Boolean},takeName:{}},emits:["close","assignStatus","assignAssignee","assignDate","assignMetric","moreActions","deleteSelected","unselect"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=YC(),{selectionStatus:r}=nr(s),a=j(()=>i.selectRowData.map(x=>x.id));Fa("bulkUpdate",!0);const l=({itemIds:x,data:P})=>{const N=i.gridApi;x.forEach(G=>{if(!N){console.error("Grid API is undefined");return}const ie=N.getRowNode(G);if(ie){const B={...ie.data,status:P};ie.setData(B)}})},c=({itemIds:x,data:P})=>{const N=i.gridApi;x.forEach(G=>{if(!N){console.error("Grid API is undefined");return}const ie=N.getRowNode(G);if(ie){const B={...ie.data,dateRange:P};ie.setData(B)}})},u=["primary"],d=[{label:"Delete Thumbnail",icon:"Image",id:"delete-thumbnail",type:"icon",value:"delete-thumbnail"},{label:"Delete Rendition",icon:"Film",id:"delete-rendition",type:"icon",value:"delete-rendition"},{label:"Unarchive",value:"UnBoxArchive",type:"icon",icon:"BoxArchive",id:"unarchive",clickable:!0},{label:"Archive",value:"BoxArchive",type:"icon",icon:"BoxArchive",id:"archive",clickable:!0},{label:"Delete",value:"delete",type:"icon",icon:"TrashCan",id:"delete",danger:!0,clickable:!0}],h=()=>{o("unselect")},f=zC(),{userPermissions:g}=nr(f),m=j(()=>g.value.includes(UC)),y=()=>{const P=`https://review.dev.arbocollab.com/w:yngazem?scene_ids=${i.selectRowData.map(N=>N.id).join(",")}`;window.open(P,"_blank")},b=x=>{const{assignees:P,type:N}=x,G=i.gridApi;if(!G){console.error("Grid API is not available for bulk update.");return}i.selectRowData.map(B=>{const H=G.getRowNode(B.id);if(!H)return null;const X=H.data.assignees||[];let $=[];switch(N){case"add":{const ce=new Set(X.map(De=>De.id)),ue=P.filter(De=>!ce.has(De.id));$=[...X,...ue];break}case"overwrite":{$=P;break}case"remove":{const ce=new Set(P.map(ue=>ue.id));$=X.filter(ue=>!ce.has(ue.id));break}case"removeAll":{$=[];break}}return{...H.data,assignees:$}}).filter(B=>B!==null).forEach(B=>{const H=G.getRowNode(B.id);H&&H.setData(B)})},{apiServices:S}=po(!1,i),F=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk delete.");return}const N=await((G=S.value)==null?void 0:G.bulkDeleteItems(String(i.workspaceId),x));(N==null?void 0:N.message)=="Done"&&(x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,isDeleted:!0,disabled:!0};B.setData(H)}}),P.deselectAll())},C=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id);if(!i.gridApi){console.error("Grid API is not available for bulk unarchive.");return}const N=await((G=S.value)==null?void 0:G.bulkUnarchiveItems(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to unarchive items.");return}E(x,"isArchived",!1)},R=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id);if(!i.gridApi){console.error("Grid API is not available for bulk archive.");return}const N=await((G=S.value)==null?void 0:G.bulkArchiveItems(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to archive items.");return}E(x,"isArchived",!0)},E=(x,P,N)=>{const G=i.gridApi;if(!G){console.error("Grid API is not available for bulk update.");return}const ie=x.map(B=>{const H=G.getRowNode(B);if(H){const X={...H.data,[P]:N};H.setData(X)}return H}).filter(B=>B!=null);G.redrawRows({rowNodes:ie})},_=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk thumbnail deletion.");return}const N=await((G=S.value)==null?void 0:G.deleteThumbnail(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to delete thumbnails.");return}x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,thumbnail:null};B.setData(H)}})},I=async()=>{var G;const x=i.selectRowData.map(ie=>ie.id),P=i.gridApi;if(!P){console.error("Grid API is not available for bulk rendition deletion.");return}const N=await((G=S.value)==null?void 0:G.deleteRendition(String(i.workspaceId),x));if((N==null?void 0:N.message)!="Done"){console.error("Failed to delete renditions.");return}x.forEach(ie=>{const B=P.getRowNode(ie);if(B){const H={...B.data,rendition:null};B.setData(H)}})},O=Z(!1),k=async x=>{O.value=!0,x.id==="unarchive"?await C():x.id==="delete"?await F():x.id==="archive"?await R():x.id==="delete-thumbnail"?await _():x.id==="delete-rendition"&&await I(),qt(()=>{O.value=!1})};return(x,P)=>nt((K(),Ce("div",{class:z(x.$style["bulk-update-action"])},[we("div",{class:z(x.$style["left-actions"])},[we("div",{class:z(x.$style["selection-track"])},[ye(ft,{variant:["icon","tertiary"],onClick:h},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1}),J(r)==1?(K(),Ce("span",{key:0,class:z(x.$style["selected-count"])},bt(e.selectRowData.length)+" selected ",3)):ot("",!0),J(r)==2?(K(),Ce("span",{key:1,class:z(x.$style["selected-count"])}," All in "+bt(e.takeName),3)):ot("",!0),we("span",{class:z(x.$style.divider)},null,2)],2),ye(X8,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:l},null,8,["ids","workspace-id","entity-id"]),ye(G8,{onUpdate:b,ids:a.value,"workspace-id":e.workspaceId,variant:u,"entity-id":e.entityId},null,8,["ids","workspace-id","entity-id"]),ye(Z8,{ids:a.value,"workspace-id":e.workspaceId,"entity-id":e.entityId,variant:u,onUpdated:c},null,8,["ids","workspace-id","entity-id"]),we("span",{class:z(x.$style.divider)},null,2),m.value?nt((K(),Xe(ft,{key:0,class:z(x.$style["action-button"]),variant:[...u,"icon"],onClick:y},{default:Se(()=>[ye(gt,{src:"PenRuler",class:z(x.$style["icon-btn"])},null,8,["class"])]),_:1},8,["class","variant"])),[[J(n),{content:"Open in Review"}]]):ot("",!0),we("span",{class:z(x.$style.divider)},null,2),ye(UP,{placement:"top-end"},{trigger:Se(({open:N})=>[nt((K(),Xe(ft,{actived:N,class:z(x.$style["action-button"]),variant:[...u,"icon"],loading:O.value},{default:Se(()=>[ye(gt,{src:"EllipsisVertical",class:z(x.$style.icon),source:"remote"},null,8,["class"])]),_:1},8,["actived","class","variant","loading"])),[[J(n),{content:"More actions"}]])]),content:Se(({visible:N,closeDropdown:G})=>[(K(),Ce(kt,null,Un(d,ie=>ye(Op,xn({key:ie.id,selected:!1},{ref_for:!0},ie,{show:N,onSelect:()=>{k(ie),G()}}),null,16,["show","onSelect"])),64))]),_:1})],2)],2)),[[as,e.selectRowData.length>0]])}}),[["__cssModules",{$style:{"bulk-update-action":"_bulk-update-action_o4psi_1","left-actions":"_left-actions_o4psi_19","right-actions":"_right-actions_o4psi_20","selection-track":"_selection-track_o4psi_25","close-icon":"_close-icon_o4psi_30","selected-count":"_selected-count_o4psi_34",divider:"_divider_o4psi_37","more-button":"_more-button_o4psi_42",dropdown:"_dropdown_o4psi_46","dropdown-content":"_dropdown-content_o4psi_49",delete:"_delete_o4psi_72","icon-btn":"_icon-btn_o4psi_79","selected-list":"_selected-list_o4psi_83"}}]]),Ya=Ct(lt({name:"LabelRenderer",__name:"LabelRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=ls,n=yn,i=e,o=j(()=>({disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:i.value===void 0||i.value===null||i.value==="",clickable:!0})),{argsMain:s}=ir(o),r=j(()=>{var l,c,u;return!!((l=i.params)!=null&&l.api||(c=i.params)!=null&&c.node||(u=i.params)!=null&&u.context)}),a=j(()=>i.value===void 0);return(l,c)=>nt((K(),Xe(or,Wm(mf(J(s))),{default:Se(()=>[we("span",{class:z(l.$style["item-table-label-renderer"])},bt(i.value||"-"),3)]),_:1},16)),[[J(t),{isLoading:a.value||!r.value}],[J(n),i.tooltip?i.tooltip:{content:void 0}]])}}),[["__cssModules",{$style:{"item-table-label-renderer":"_item-table-label-renderer_s1gdy_1"}}]]),Q8=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const eK=Object.prototype.toString,tK=e=>eK.call(e)==="[object Object]",Mp=()=>{};function ZC(e){return Array.isArray(e)?e:[e]}function nK(e,t,n){return ct(e,t,{...n,immediate:!0})}const KP=Q8?window:void 0;function wd(e){var t;const n=wa(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function XC(...e){const t=(i,o,s,r)=>(i.addEventListener(o,s,r),()=>i.removeEventListener(o,s,r)),n=j(()=>{const i=ZC(wa(e[0])).filter(o=>o!=null);return i.every(o=>typeof o!="string")?i:void 0});return nK(()=>{var i,o;return[(i=(o=n.value)===null||o===void 0?void 0:o.map(s=>wd(s)))!==null&&i!==void 0?i:[KP].filter(s=>s!=null),ZC(wa(n.value?e[1]:e[0])),ZC(J(n.value?e[2]:e[1])),wa(n.value?e[3]:e[2])]},([i,o,s,r],a,l)=>{if(!(i!=null&&i.length)||!(o!=null&&o.length)||!(s!=null&&s.length))return;const c=tK(r)?{...r}:r,u=i.flatMap(d=>o.flatMap(h=>s.map(f=>t(d,h,f,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function qP(e,t,n={}){const{window:i=KP,ignore:o=[],capture:s=!0,detectIframe:r=!1,controls:a=!1}=n;if(!i)return a?{stop:Mp,cancel:Mp,trigger:Mp}:Mp;let l=!0;const c=y=>wa(o).some(b=>{if(typeof b=="string")return Array.from(i.document.querySelectorAll(b)).some(S=>S===y.target||y.composedPath().includes(S));{const S=wd(b);return S&&(y.target===S||y.composedPath().includes(S))}});function u(y){const b=wa(y);return b&&b.$.subTree.shapeFlag===16}function d(y,b){const S=wa(y),F=S.$.subTree&&S.$.subTree.children;return F==null||!Array.isArray(F)?!1:F.some(C=>C.el===b.target||b.composedPath().includes(C.el))}const h=y=>{const b=wd(e);if(y.target!=null&&!(!(b instanceof Element)&&u(e)&&d(e,y))&&!(!b||b===y.target||y.composedPath().includes(b))){if("detail"in y&&y.detail===0&&(l=!c(y)),!l){l=!0;return}t(y)}};let f=!1;const g=[XC(i,"click",y=>{f||(f=!0,setTimeout(()=>{f=!1},0),h(y))},{passive:!0,capture:s}),XC(i,"pointerdown",y=>{const b=wd(e);l=!c(y)&&!!(b&&!y.composedPath().includes(b))},{passive:!0}),r&&XC(i,"blur",y=>{setTimeout(()=>{var b;const S=wd(e);((b=i.document.activeElement)===null||b===void 0?void 0:b.tagName)==="IFRAME"&&!(S!=null&&S.contains(i.document.activeElement))&&t(y)},0)},{passive:!0})].filter(Boolean),m=()=>g.forEach(y=>y());return a?{stop:m,cancel:()=>{l=!1},trigger:y=>{l=!0,h(y),l=!1}}:m}const iK=["placeholder","maxlength"],oK={key:0,class:"wrapper-suffix"},YP=Ct(lt({name:"LabelEditor",__name:"LabelEditor",props:{value:{},placeholder:{default:"Enter name"},disabled:{type:Boolean},readOnly:{type:Boolean},maxLength:{}},emits:["update:value","enter","blur"],setup(e,{expose:t,emit:n}){const i=ls,o=yn,s=e,r=n,a=Z(s.value),l=Z(null),c=Z(null),u=j(()=>{var R;return{disabled:s.disabled,error:!1,readOnly:s.readOnly,isEmpty:((R=s.value)==null?void 0:R.length)===0,inputRef:l,wrapperRef:c,clickable:!0}}),{argsMain:d,isFocus:h}=ir(u),f=R=>{const E=document.createElement("div");return E.textContent=R,E.innerHTML},g=R=>{h.value=!1,C.value=a.value,r("update:value",a.value)},m=R=>{if(!h.value||!l.value)return;const E=f(l.value.value);r("update:value",E),r("enter",E),h.value=!1},y=R=>{var E;if(R.ctrlKey&&R.key=="a"||R.key=="A"){(E=l.value)==null||E.select();return}R.key==="Enter"?(R.preventDefault(),m()):R.key==="Escape"&&(R.preventDefault(),g())},b=()=>{a.value=s.value,h.value=!0,qt(()=>{var R;(R=l.value)==null||R.focus()})},S={focus:()=>{var R;h.value=!0,(R=l.value)==null||R.focus()}};vn(()=>{const R=c.value.$el;R&&(R.__sceneNameEditor=S)}),Yn(()=>{const R=c.value;R&&delete R.__sceneNameEditor}),t({focus:()=>{b()}});const F=j(()=>s.value===void 0),C=Z(s.value||"");return qP(c,R=>{h.value&&m()}),(R,E)=>nt((K(),Xe(J(or),xn(J(d),{ref_key:"wrapperRef",ref:c}),Su({default:Se(()=>[J(h)?ot("",!0):_t(R.$slots,"default",{key:0},()=>[nt((K(),Ce("span",{class:z(R.$style["label-renderer"])},[ut(bt(C.value),1)],2)),[[J(o),{content:C.value||void 0}]])]),nt(we("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":E[0]||(E[0]=_=>C.value=_),class:z(R.$style["label-editor"]),placeholder:e.placeholder,maxlength:e.maxLength,onKeydown:y},null,42,iK),[[as,J(h)],[PR,C.value]])]),_:2},[!e.disabled&&!e.readOnly?{name:"suffix",fn:Se(({hovered:_,focused:I})=>[_||I?(K(),Ce("div",oK,[_&&!I?nt((K(),Xe(J(ft),{key:0,variant:["icon","secondary"],size:24,onClick:rn(b,["prevent","stop"])},{default:Se(()=>[ye(J(gt),{src:"Pen",source:"remote"})]),_:1})),[[J(o),"Edit"]]):I?nt((K(),Xe(J(ft),{key:1,variant:["icon","tertiary","danger"],size:24,onMousedown:rn(g,["prevent"])},{default:Se(()=>[ye(J(gt),{src:"XMarkSolid",source:"remote"})]),_:1})),[[J(o),"Cancel"]]):ot("",!0)])):ot("",!0)]),key:"0"}:void 0]),1040)),[[J(i),{isLoading:F.value}]])}}),[["__cssModules",{$style:{"label-renderer":"_label-renderer_cyzth_1","label-editor":"_label-editor_cyzth_10"}}]]);/*! js-cookie v3.0.5 | MIT */function Lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}var sK={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function JC(e,t){function n(o,s,r){if(!(typeof document>"u")){r=Lp({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in r)r[l]&&(a+="; "+l,r[l]!==!0&&(a+="="+r[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function i(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],r={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(r[u]=e.read(c,u),o===u)break}catch{}}return o?r[o]:r}}return Object.create({set:n,get:i,remove:function(o,s){n(o,"",Lp({},s,{expires:-1}))},withAttributes:function(o){return JC(this.converter,Lp({},this.attributes,o))},withConverter:function(o){return JC(Lp({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var ZP=JC(sK,{path:"/"});const rK=["href"],XP=Ct(lt({name:"SceneNameEditor",__name:"SceneNameEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},placeholder:{default:"Enter name"}},emits:["update:value","enter","blur"],setup(e,{emit:t}){const n=sessionStorage.getItem("ws.code"),i=sessionStorage.getItem("BASE_URL")||"https://app.dev.arbocollab.com",o=yn,s=ls,r=e,a=t,l=Z(r.value),c=Z(r.value),u=Z(null),d=Z(null),h=Hi("bulkUpdate",!1),{apiServices:f}=po(!h,r),g=j(()=>{var I;return{componentType:void 0,disabled:r.disabled,error:!1,readOnly:r.readOnly,isEmpty:((I=l==null?void 0:l.value)==null?void 0:I.length)===0,inputRef:u,wrapperRef:d,clickable:!0}}),{isFocus:m}=ir(g),y=j(()=>{const I=n||r.workspaceId;return Vo({type:"scene_hub",config:{baseDomain:i,ws_code:I,scene_id:String(r.id)}}).url}),b=j(()=>{var I,O,k;return((I=r.data)==null?void 0:I.isDeleted)==!0||((k=(O=r.data)==null?void 0:O.isProcessing)==null?void 0:k.length)>0}),S=j(()=>{var I;return(I=r.data)==null?void 0:I.isProcessing}),F=j(()=>{var I;return((I=r.data)==null?void 0:I.isArchived)==1}),C=j(()=>r.value===void 0),R=async I=>{var O,k,x,P;l.value=I,m.value=!1;try{const N=await((k=(O=f.value)==null?void 0:O.updateSceneName)==null?void 0:k.call(O,{workspaceId:r.workspaceId,entityId:r.entityId,itemId:r.id,name:l.value})),G=ZP.get(TF)||"UTC";if(N){const ie=kF(N,G),B={...r.data,...ie};(P=(x=r.params)==null?void 0:x.node)==null||P.setData(B),c.value=l.value,a("enter")}else l.value=c.value}catch(N){console.error("Failed to update scene name:",N),l.value=c.value}},E={focus:()=>{m.value=!0,setTimeout(()=>{var I;return(I=d.value)==null?void 0:I.focus()},0)}},_=()=>d.value?"$el"in d.value?d.value.$el:d.value:null;return ct(()=>r.value,I=>{l.value=I,c.value=I}),vn(()=>{const I=_();I&&(I.__sceneNameEditor=E)}),Yn(()=>{const I=d.value,O=I&&"$el"in I?I.$el:I;O&&delete O.__sceneNameEditor}),(I,O)=>nt((K(),Xe(YP,{"save-on-blur":!0,ref_key:"wrapperRef",ref:d,disabled:r.disabled,"read-only":r.readOnly,placeholder:r.placeholder,value:l.value,"onUpdate:value":O[0]||(O[0]=k=>l.value=k),id:`scene-name-${r.id}`,onEnter:R,"max-length":25},{default:Se(()=>[nt(we("div",{class:z(I.$style["scene-name-display"])},[nt((K(),Ce("a",{href:y.value,target:"_blank",class:z(I.$style["scene-name-text"])},[ut(bt(l.value),1)],10,rK)),[[J(o),{content:l.value}]]),F.value?(K(),Ce("div",{key:0,class:z([I.$style["icon-processing"],I.$style.archived])},[ye(gt,{src:"BoxArchive",color:"#959595"})],2)):ot("",!0),b.value?nt((K(),Ce("div",{key:1,class:z([I.$style["icon-processing"],I.$style.processing])},[ye(gt,{src:"AnimatedHourglass",color:"#DE851A"})],2)),[[J(o),S.value]]):ot("",!0)],2),[[as,!J(m)]])]),_:1},8,["disabled","read-only","placeholder","value","id"])),[[J(s),{isLoading:C.value}]])}}),[["__cssModules",{$style:{"scene-name-editor":"_scene-name-editor_nlzfn_1","scene-name-display":"_scene-name-display_nlzfn_11","icon-processing":"_icon-processing_nlzfn_18",archived:"_archived_nlzfn_26",processing:"_processing_nlzfn_29","scene-name-text":"_scene-name-text_nlzfn_33"}}]]),aK=Ct(lt({__name:"OptionList",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},options:{}},emits:["select"],setup(e,{emit:t}){const n=t;function i(o){n("select",o)}return(o,s)=>(K(),Ce("div",{class:z(o.$style["dropdown-list"])},[(K(!0),Ce(kt,null,Un(e.options,r=>(K(),Xe(Op,xn({key:r.value},{ref_for:!0},{...r},{"icon-name":r.icon,onClick:rn(a=>i(r.value),["stop","prevent"])}),{label:Se(()=>[ut(bt(r.label),1)]),_:2},1040,["icon-name","onClick"]))),128)),e.options.length==0?(K(),Ce("div",{key:0,class:z(o.$style["empty-list"])}," No options available. ",2)):ot("",!0)],2))}}),[["__cssModules",{$style:{"dropdown-list":"_dropdown-list_1d2i1_1","empty-list":"_empty-list_1d2i1_8"}}]]),QC=Ct(lt({__name:"ButtonDropdown",props:{label:{},value:{},variant:{},options:{default:()=>[]},size:{},placement:{default:"bottom"},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["select","handleClick"],setup(e,{expose:t,emit:n}){const i=e,o=j(()=>typeof i.size=="number"?`${i.size}px`:{small:"24px",medium:"32px",large:"48px"}[i.size]??"32px"),s=j(()=>{let g=[];return typeof i.variant=="string"?g.push(i.variant):Array.isArray(i.variant)&&(g=[...i.variant]),[...g,"icon"]}),r=n,{hide:a,isVisible:l,show:c,triggerRef:u,popupRef:d,instance:h}=Qs();function f(g){r("select",g),a()}return sf(()=>{h.value&&h.value.setProps({placement:i.placement})}),t({show:c,hide:a,popupRef:d}),(g,m)=>(K(),Ce("div",{class:z(g.$style["button-dropdown-wrapper"]),style:mn({"--button-size":o.value})},[we("div",{class:z(g.$style["button-group"])},[_t(g.$slots,"prefix"),we("div",{ref_key:"triggerRef",ref:u,class:z(J(l)?g.$style.open:"")},[_t(g.$slots,"triggerDropdown",{open:J(l)},()=>[i.readOnly?ot("",!0):(K(),Xe(ft,{key:0,actived:J(l),class:z(g.$style["button-dropdown-trigger"]),variant:s.value,size:e.size,disabled:i.disabled},{default:Se(()=>[_t(g.$slots,"iconDropdown",{},()=>[ye(gt,{class:z(g.$style["icon-dropdown"]),src:"ChevronDown",source:"remote"},null,8,["class"])])]),_:3},8,["actived","class","variant","size","disabled"]))])],2)],2),we("div",{ref_key:"popupRef",ref:d,class:z(g.$style["button-dropdown-list"])},[ye(aK,{options:e.options,onSelect:f,style:{width:"max-content"}},null,8,["options"])],2)],6))}}),[["__cssModules",{$style:{"button-dropdown-wrapper":"_button-dropdown-wrapper_12xlv_1","button-group":"_button-group_12xlv_7","overflow-elipsis":"_overflow-elipsis_12xlv_26","button-dropdown-list":"_button-dropdown-list_12xlv_33",show:"_show_12xlv_36","button-dropdown-item":"_button-dropdown-item_12xlv_39","icon-dropdown":"_icon-dropdown_12xlv_43",open:"_open_12xlv_46"}}]]),lK=Ct(lt({name:"AssigneeGroupRenderer",__name:"AssigneeGroupRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean},maxVisible:{default:4}},setup(e){const t=yn,n=ls,i=kD,o=e,{isEditing:s}=jC(o),r=Z(o.value),a=Z(null),l=Z(null),{apiServices:c}=po(!0,o),u=j(()=>({disabled:o.disabled,readOnly:o.readOnly,error:o.error,inputRef:a,wrapperRef:l,clickable:!0,active:s})),{argsMain:d,isHover:h}=ir(u),f=j(()=>o.value===void 0),g=j(()=>{var C;return((C=r.value)==null?void 0:C.slice(0,o.maxVisible))||[]}),m=j(()=>{var C;return Math.max(0,(((C=r.value)==null?void 0:C.length)||0)-o.maxVisible)}),y=j(()=>{var C;return m.value<=0?"":((C=r.value)==null?void 0:C.slice(o.maxVisible).map(R=>R.name).join(", "))||""}),b=j(()=>g.value.map(C=>({id:C.id,name:C.name,initial:C.initial,avatarId:C.id,profile_image:C.profile_image,color:C.color,size:24,user:C}))),S=j(()=>({color:h.value?"var(--primary-color)":"var(--grey-300)",display:"flex",alignItems:"center",marginLeft:"4px"})),F=async C=>{var E;const R=o.workspaceId;return await((E=c.value)==null?void 0:E.getUserInformation(R,C))??void 0};return ct(()=>o.value,C=>{r.value=C},{immediate:!0,deep:!0}),(C,R)=>nt((K(),Xe(or,Wm(mf(J(d))),{default:Se(()=>{var E;return[we("div",{class:z(C.$style.assigneeGroupRenderer)},[(E=r.value)!=null&&E.length?ot("",!0):(K(),Xe(gt,{key:0,src:"UserPlus",source:"remote",style:mn(S.value)},null,8,["style"])),(K(!0),Ce(kt,null,Un(b.value,_=>nt((K(),Xe(Ku,{key:_.id,readOnly:!0,class:z(C.$style["ib-assignee-avatar"]),name:_.name,initial:_.initial,id:`assignee-avatar-${_.avatarId}`,profile_image:_.profile_image,color:_.color,size:_.size},null,8,["class","name","initial","id","profile_image","color","size"])),[[J(i),{user:_.user,placement:"bottom-start",showInsightButton:!0,showCopyLinkButton:!0,apiUpdateFunction:F}]])),128)),m.value>0?nt((K(),Ce("div",{key:1,class:z(C.$style["extra-avatars"])},[ut(" +"+bt(m.value),1)],2)),[[J(t),y.value]]):ot("",!0)],2)]}),_:1},16)),[[J(n),{isLoading:f.value}]])}}),[["__cssModules",{$style:{assigneeGroupRenderer:"_assigneeGroupRenderer_1tgm9_1","ib-assignee-group-renderer":"_ib-assignee-group-renderer_1tgm9_7","ib-assignee-avatar":"_ib-assignee-avatar_1tgm9_17","assignee-wrapper":"_assignee-wrapper_1tgm9_21","extra-avatars":"_extra-avatars_1tgm9_28"}}]]),cK=Ct(lt({name:"DateRangeRenderer",__name:"DateRangeRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{}},setup(e){var R,E;const t=yn,n=ls,i=fC(),o=e,s=Z(null),r=Z(null),a=_=>{if(_){if(typeof _=="string")return _;if(_ instanceof Date)return _.toISOString()}},l=j(()=>o.value===void 0),c=j(()=>{var _;return(_=o.data)==null?void 0:_.isStarted}),u=j(()=>{var _;return(_=o.data)==null?void 0:_.isCompleted}),d=j(()=>!!(o.value&&(o.value[0]||o.value[1]))),h=j(()=>d.value?o.disabled&&!o.readOnly?"var(--disabled-color)":"var(--primary-color)":"var(--grey-300)"),f=j(()=>({disabled:o.disabled,error:!1,readOnly:o.readOnly,inputRef:s,wrapperRef:r,clickable:!0})),{argsMain:g}=ir(f),{startDate:m,endDate:y,startClasses:b,endClasses:S,fullStartDate:F,fullEndDate:C}=K6({start:a((R=o.value)==null?void 0:R[0]),end:a((E=o.value)==null?void 0:E[1]),isStarted:c.value,isEnded:u.value,timezone:o.timezone||i});return(_,I)=>nt((K(),Xe(or,xn(J(g),{ref_key:"wrapperRef",ref:r}),{default:Se(()=>[l.value?ot("",!0):(K(),Ce("div",{key:0,class:z(_.$style.dateRangeRenderer)},[d.value?ot("",!0):(K(),Xe(gt,{key:0,src:"Calendar",class:z(_.$style.calendarIcon),color:h.value},null,8,["class","color"])),d.value?(K(),Ce(kt,{key:1},[nt((K(),Ce("span",{class:z([_.$style.dateLabelDisplay,...J(b).map(O=>_.$style[O])])},[ut(bt(J(m)),1)],2)),[[J(t),J(F)]]),I[0]||(I[0]=we("span",null,"→",-1)),nt((K(),Ce("span",{class:z([_.$style.dateLabelDisplay,...J(S).map(O=>_.$style[O])])},[ut(bt(J(y)),1)],2)),[[J(t),J(C)]])],64)):ot("",!0)],2))]),_:1},16)),[[J(n),{isLoading:l.value,fullwidth:!0}]])}}),[["__cssModules",{$style:{dateRangeRenderer:"_dateRangeRenderer_1hon8_1",calendarIcon:"_calendarIcon_1hon8_7",dateSection:"_dateSection_1hon8_11",dateLabelDisplay:"_dateLabelDisplay_1hon8_18",empty:"_empty_1hon8_28","end-today":"_end-today_1hon8_34",actual:"_actual_1hon8_37","end-tomorrow":"_end-tomorrow_1hon8_40","end-yesterday":"_end-yesterday_1hon8_46","end-past":"_end-past_1hon8_52","end-future":"_end-future_1hon8_58","start-today":"_start-today_1hon8_61","start-tomorrow":"_start-tomorrow_1hon8_67","start-yesterday":"_start-yesterday_1hon8_73","start-past":"_start-past_1hon8_79","start-future":"_start-future_1hon8_85"}}]]),uK=lt({__name:"DateRangeEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{default:void 0},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},isStarted:{type:Boolean},isCompleted:{type:Boolean},timezone:{default:fC()}},emits:["closed"],setup(e,{expose:t,emit:n}){const i=Z(null);vn(()=>{qt(()=>{i.value&&i.value.focus()})});const o=e,s=n,r=y=>`${tt.fromJSDate(y,{zone:"utc"}).toFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")}999Z`,a=async y=>{await m({startDate:y[0]?r(y[0]):null,dueDate:y[1]?r(y[1]):null})},l=async()=>{await m({startDate:null})},c=async()=>{await m({dueDate:null})},u=async y=>{await m({startDate:y?r(y):null})},d=async y=>{await m({dueDate:y?r(y):null})},h=async()=>{await m({startDate:null,dueDate:null})},f=Hi("bulkUpdate",!1),{apiServices:g}=po(!f,o),m=async y=>{var b,S,F,C,R;try{const E=(b=i.value)==null?void 0:b.getValues(),_=await((F=(S=g.value)==null?void 0:S.changeDate)==null?void 0:F.call(S,{workspaceId:o.workspaceId,itemIds:[o.id],startDate:y.startDate,dueDate:y.dueDate}));_!=null&&_.message&&((R=o.params)==null||R.node.setData({...(C=o.params)==null?void 0:C.node.data,dateRange:E==null?void 0:E.dateRange}))}catch(E){console.error("Failed to update scene name:",E)}};return t({focus:()=>{qt(()=>{var y;(y=i.value)==null||y.focus()})}}),(y,b)=>(K(),Xe(zP,xn(o,{onUpdate:a,"onUpdate:end":d,"onUpdate:start":u,onClearAll:h,onClearDue:c,onClearStart:l,onClosed:b[0]||(b[0]=S=>s("closed")),ref_key:"calendarRef",ref:i}),null,16))}}),dK=Ct(lt({__name:"item-table-layout",props:{isSidebarOpen:{type:Boolean,default:!1}},emits:["close-sidebar","sidebar-clear","sidebar-apply"],setup(e,{emit:t}){const n=Z(null),i=Z(0);let o=null;vn(()=>{n.value&&(o=new ResizeObserver(r=>{for(const a of r)i.value=a.contentRect.height}),o.observe(n.value))}),Ll(()=>{o&&n.value&&o.unobserve(n.value)});const s=j(()=>{const r=i.value;return r>120?r-42-36:0});return(r,a)=>(K(),Ce("div",{class:z(r.$style["item-table-wrapper"]),ref_key:"itemTableWrapperRef",ref:n},[we("div",{class:z(r.$style["item-header"])},[we("div",{class:z(r.$style["item-header__left"])},[_t(r.$slots,"header-left",{},()=>[we("h1",{class:z(r.$style["item-header__title"])},[_t(r.$slots,"title",{},()=>[a[0]||(a[0]=ut("Items",-1))])],2)])],2),we("div",{class:z(r.$style["item-header__spacer"])},null,2),we("div",{class:z(r.$style["item-header__actions"])},[_t(r.$slots,"header-actions")],2)],2),_t(r.$slots,"grid",{availableHeight:s.value}),we("div",{class:z(r.$style.footer)},[_t(r.$slots,"footer")],2),_t(r.$slots,"new-row"),_t(r.$slots,"bulk-update-actions"),_t(r.$slots,"snackbar"),_t(r.$slots,"popup")],2))}}),[["__cssModules",{$style:{"item-table-wrapper":"_item-table-wrapper_1o9sg_1","item-header":"_item-header_1o9sg_15","item-header__left":"_item-header__left_1o9sg_23","item-header__title":"_item-header__title_1o9sg_28","item-header__spacer":"_item-header__spacer_1o9sg_33","item-header__actions":"_item-header__actions_1o9sg_36","main-content":"_main-content_1o9sg_42",sidebar:"_sidebar_1o9sg_49","is-open":"_is-open_1o9sg_65","sidebar-header":"_sidebar-header_1o9sg_69","sidebar-footer":"_sidebar-footer_1o9sg_70","sidebar-content":"_sidebar-content_1o9sg_90",footer:"_footer_1o9sg_95"}}]]),JP=Ct(lt({__name:"MoreOptionEditor",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},optionBlock:{},isSubmenu:{type:Boolean,default:!1},layer:{default:0}},emits:["actionExecuted"],setup(e,{emit:t}){const n=e,i=j(()=>(n==null?void 0:n.workspaceId)||""),o=j(()=>(n==null?void 0:n.entityId)||""),s=m=>{const y=`scene-name-${n.id}`,b=document.getElementById(y);b.__sceneNameEditor&&b.__sceneNameEditor.focus()},{apiServices:r}=po(!0,n),a=j(()=>{var m;return{ws_code:i.value,entity_id:o.value,scene_id:n.id,axiosService:r,optionBlock:n.optionBlock,permissions:(m=n.data)==null?void 0:m.permissions}}),l=m=>{var b,S,F,C,R,E;let y=(S=(b=n.params)==null?void 0:b.api)==null?void 0:S.getRowNode(String(n.id));if(y){const _={...y.data,isDeleted:m==="deleted",isArchived:m==="archived"?!0:m==="unarchived"?!1:y.data.isArchived,disabled:!0};(C=(F=n.params)==null?void 0:F.api)==null||C.redrawRows({rowNodes:[y]}),y.setData(_),(E=(R=n.params)==null?void 0:R.api)==null||E.redrawRows({rowNodes:[y]})}},{options:c}=T8(a,l,s),u=t,d=m=>{var y,b;m.id!=="copy-link"&&((b=(y=n==null?void 0:n.params)==null?void 0:y.api)==null||b.stopEditing()),u("actionExecuted",m)},h=m=>{var y,b,S,F;return m=="archive"?!((b=(y=n.params)==null?void 0:y.data)!=null&&b.isArchived):m==="unarchive"?(F=(S=n.params)==null?void 0:S.data)==null?void 0:F.isArchived:!0},f=m=>m.map(y=>({...y,options:y.options.filter(b=>!b.hide)})),g=j(()=>f(c.value));return(m,y)=>(K(),Ce("div",{class:z([m.$style["more-option-section"],{[m.$style.submenu]:e.isSubmenu}])},[(K(!0),Ce(kt,null,Un(g.value,b=>(K(),Ce("div",{key:b.id,style:mn({"--g-number":Math.min(b.options.length,4)}),class:z([m.$style["option-block"],m.$style[b.type]])},[(K(!0),Ce(kt,null,Un(b.options,S=>nt((K(),Ce("div",{key:S.id,class:z(m.$style["option-item"])},[S.hide?ot("",!0):(K(),Xe(fK,{key:0,layer:n.layer,"scene-id":String(n.id),option:S,type:b.type,onActionExecuted:d},null,8,["layer","scene-id","option","type"]))],2)),[[as,h(S.id)]])),128))],6))),128))],2))}}),[["__cssModules",{$style:{"more-option-section":"_more-option-section_1xceh_1","option-block":"_option-block_1xceh_8","option-item":"_option-item_1xceh_18",row:"_row_1xceh_22",column:"_column_1xceh_28",block:"_block_1xceh_32"}}]]),hK={key:0},fK=Ct(lt({__name:"MoreOptionItem",props:{option:{},sceneId:{},type:{},layer:{}},emits:["actionExecuted"],setup(e,{emit:t}){const n=yn,i=e,o=Z(!1),s=Z(!1),r=(C,R)=>{if(!R){h();return}const E=R.target;E.closest(".tippy-content")||E.closest(".tippy-box")||E.closest("[data-tippy-root]")||E.closest(".option-item")||h()},a=Z(null),{triggerRef:l,popupRef:c,show:u,isVisible:d,hide:h}=Qs({interactive:!0,trigger:"click",placement:"left",showArrow:!1,offset:[0,4],hideOnClick:!1,allowHTML:!0,onClickOutside:r,appendTo:a.value||void 0}),f=t,g=async C=>{var R,E;if(!s.value){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(_){console.error("Action execution failed:",_)}finally{s.value=!1,o.value=!1}}},m=async C=>{var R,E;if(C.preventDefault(),C.stopPropagation(),!s.value){if(i.option.isDanger){o.value=!o.value;return}if(!i.option.subMenu){s.value=!0;try{await((E=(R=i.option).action)==null?void 0:E.call(R,C)),f("actionExecuted",i.option)}catch(_){console.error("Action execution failed:",_)}finally{s.value=!1}return}qt(()=>{d.value?h():u()})}},y=C=>{f("actionExecuted",C),h()},b=C=>{C.key==="Escape"?h():(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m(C))},S=C=>({row:"small",column:"large",block:"small"})[C]||"large",F=C=>{const R=i.option.isDanger?["danger","tertiary"]:[];return{row:["secondary","icon",...R],column:["menu-item",...R],block:["secondary",...R]}[C]||[]};return(C,R)=>{var E;return K(),Ce("div",{ref_key:"wrapperRef",ref:a,class:z(C.$style["option-item-wrapper"])},[nt((K(),Xe(ft,{ref_key:"triggerRef",ref:l,class:z(C.$style["option-item"]),disabled:e.option.disabled||s.value,actived:J(d)||o.value,size:S(e.type),variant:F(e.type),tabindex:"0",onClick:rn(m,["stop","prevent"]),onKeydown:b},{prefix:Se(()=>[e.option.icon?nt((K(),Xe(gt,{key:0,src:e.option.icon,source:"remote"},null,8,["src"])),[[J(n),{content:e.option.label,delay:[500,0],contentClass:["extra-padding"]}]]):ot("",!0)]),suffix:Se(()=>[e.option.subMenu?(K(),Xe(gt,{key:0,src:"Play",source:"remote"})):ot("",!0),e.option.isDanger&&o.value?(K(),Ce("div",{key:1,class:z(C.$style["confirm-action"])},[nt((K(),Xe(ft,{variant:["tertiary","icon","danger"],size:"small",onClick:R[0]||(R[0]=rn(_=>o.value=!1,["stop","prevent"]))},{default:Se(()=>[ye(gt,{src:"XMarkSolid",source:"remote"})]),_:1})),[[J(n),{content:"Cancel ",delay:[500,0],contentClass:["extra-padding"]}]]),nt((K(),Xe(ft,{variant:["danger","primary","icon"],size:"small",onClick:rn(g,["stop","prevent"])},{default:Se(()=>[ye(gt,{src:"Check",source:"remote"})]),_:1})),[[J(n),{delay:[500,0],contentClass:["extra-padding"],content:"Confirm ",theme:"warning"}]])],2)):ot("",!0)]),default:Se(()=>[e.option.label?(K(),Ce("span",hK,bt(e.option.label),1)):ot("",!0)]),_:1},8,["class","disabled","actived","size","variant"])),[[J(n),{content:e.option.description,contentClass:["extra-padding"],theme:e.option.isDanger?"warning":"arbo",hideOnClick:!1,trigger:"mouseenter focus"}]]),e.option.subMenu?(K(),Ce("div",{key:0,ref_key:"popupRef",ref:c,class:z(C.$style["submenu-container"])},[ye(JP,{layer:i.layer+1,ref:"submenuRef","option-block":[((E=e.option)==null?void 0:E.subMenu)||[]],"is-submenu":!1,onActionExecuted:y},null,8,["layer","option-block"])],2)):ot("",!0)],2)}}}),[["__cssModules",{$style:{"option-item":"_option-item_82ug7_1","icon-wrapper":"_icon-wrapper_82ug7_11","confirm-action":"_confirm-action_82ug7_19"}}]]);var Cc=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Cc||{});const pK=["width","height","viewBox"],gK=["d"],mK="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",vK=lt({__name:"RatingComponent",props:{params:{default:()=>({maxRating:5,readOnly:!1,disabled:!1})},modelValue:{},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},emits:["update","update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=Z(n.modelValue??0),s=j(()=>{var b;return((b=n.params)==null?void 0:b.size)??40}),r=j(()=>{var b;return((b=n.params)==null?void 0:b.iconViewBox)??"0 0 24 24"}),a=j(()=>{var b;return((b=n.params)==null?void 0:b.iconPath)??mK}),l=j(()=>{var b;return((b=n.params)==null?void 0:b.wrapperTag)??"span"}),c=j(()=>{var b;return n.disabled||((b=n.params)==null?void 0:b.disabled)||!1}),u=j(()=>{var b;return n.readOnly||((b=n.params)==null?void 0:b.readOnly)||!1}),d=j(()=>!c.value&&!u.value),h=j(()=>c.value?"not-allowed":u.value?"default":"pointer");ct(()=>n.modelValue,b=>{typeof b=="number"&&b!==o.value&&(o.value=b)});const f=b=>{var S;return((S=n.params)==null?void 0:S.maxRating)-b+1<=o.value},g=b=>{d.value&&y(b)},m=b=>{d.value&&y(b)},y=b=>{var F,C;if(!d.value)return;const S=((F=n.params)==null?void 0:F.maxRating)-b+1;o.value=S,i("update:modelValue",S),i("update",S),i("change",S),(C=n.params)!=null&&C.onUpdate&&n.params.onUpdate(S)};return(b,S)=>(K(),Ce("div",{class:z(["rating-component",{"rating-component--disabled":c.value,"rating-component--readOnly":u.value}])},[(K(!0),Ce(kt,null,Un(e.params.maxRating,F=>(K(),Xe(jN(l.value),{key:F,class:z(["rating-item",{filled:f(F),"rating-item--disabled":c.value,"rating-item--readOnly":u.value}]),style:mn({cursor:h.value,order:e.params.maxRating-F,height:s.value+"px",width:s.value+"px"}),"aria-checked":f(F),"aria-disabled":c.value,"aria-readOnly":u.value,tabindex:c.value?-1:0,onClick:rn(C=>g(F),["prevent","stop"]),onKeyup:[IR(rn(C=>m(F),["prevent"]),["enter"]),IR(rn(C=>m(F),["prevent"]),["space"])]},{default:Se(()=>[_t(b.$slots,"icon",{index:F,filled:f(F),size:s.value,iconViewBox:r.value,disabled:c.value,readOnly:u.value},()=>[(K(),Ce("svg",{class:"rating-icon",width:s.value,height:s.value,viewBox:r.value,"aria-hidden":"true",focusable:"false"},[we("path",{d:a.value},null,8,gK)],8,pK))]),_t(b.$slots,"overlay",{index:F,filled:f(F),disabled:c.value,readOnly:u.value})]),_:2},1064,["class","style","aria-checked","aria-disabled","aria-readOnly","tabindex","onClick","onKeyup"]))),128))],2))}}),yK={key:2},Np=14,CK=Ct(lt({name:"MetricRenderer",__name:"MetricRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean},error:{type:Boolean}},emits:["update:value","clear","copy"],setup(e,{emit:t}){const n=ls,i=yn,o=e,s=Z(Number(o.value)),r=U0(!1),a=Z(null),l=Z(null),c=j(()=>o.value),u=j(()=>{var G,ie;const P=c.value=="N/A"||c.value===null||c.value===void 0||String(c.value).length===0,N=!!o.error;return{pendingCalculation:c.value=="N/A",isEmpty:P,isError:N,hasPrefix:!P&&!N&&d.value.morpheme_type==="prefix",hasSuffix:!P&&!N&&d.value.morpheme_type==="suffix",isDropdown:d.value.format_type==="dropdown",isFormula:((ie=(G=d.value)==null?void 0:G.metric_type)==null?void 0:ie.code)==="formula",isLoading:c.value===void 0,isRating:d.value.format_type==="icon"&&d.value.format_type=="icon"}}),d=j(()=>{var P,N;return{...(N=(P=o.params)==null?void 0:P.colDef)==null?void 0:N.context}}),h=j(()=>o.value===void 0),f=j(()=>{if(u.value.isError)return"Something went wrong. Review formula, inputs and retry.";if(u.value.pendingCalculation)return"Can’t calculate yet. Complete required fields.";if(u.value.isEmpty)return;const P=R.value,N=d.value.morpheme_type;return N==="prefix"?`${d.value.morpheme_value||""} ${P}`.trim():N==="suffix"?`${P} ${d.value.morpheme_value||""}`.trim():`${P}`}),g=j(()=>(d.value.format_symbol||"").split(/[\s-_]+/).map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join("").replace(/Outline|Solid/g,"")),m=j(()=>{const{format_type:P,format_value:N}=d.value;if(P==="dropdown"&&typeof N=="string"&&N.startsWith("["))try{return JSON.parse(N)}catch{return[]}return[]}),y=j(()=>u.value.isError?"var(--error-color, #d32f2f)":"var(--grey-300)"),b=j(()=>r.value&&!u.value.isEmpty&&!o.disabled&&!u.value.isRating),S=j(()=>({disabled:o.disabled,error:u.value.isError,inputRef:a,wrapperRef:l,clickable:!0,readOnly:!0,isEmpty:u.value.isEmpty})),{argsMain:F,isHover:C}=ir(S),R=j(()=>{if(u.value.isEmpty)return"";if(u.value.pendingCalculation)return"pending";const P=o.value,{format_type:N,format_value:G,mapping:ie}=d.value;if(ie&&typeof ie=="object"&&!Array.isArray(ie)){const H=ie[`!${P}`];if(H)return H}if(N==="dropdown"){const H=m.value.find(X=>String(X.name)===String(P));if(H)return H.name}if(typeof P=="string"&&Number.isNaN(Number(P)))return P;const B=Number.parseInt(String(G)||"2",10)||2;try{return Number(P).toFixed(B)}catch(H){return console.error("Error formatting metric value:",H),String(P)}}),E=j(()=>({content:I.value,hideOnClick:!1,contentClass:"extra-padding"})),{copyToClipboard:_,tooltip:I}=pC(R.value),O=j(()=>({maxRating:d.value.range||5,readOnly:o.readOnly,disabled:o.disabled,size:Np}));ct(()=>o.value,P=>{const N=Number(P);Number.isFinite(N)&&N!==s.value?s.value=N:P==null&&s.value!==0&&(s.value=0)},{immediate:!0});const k=()=>{o.disabled||(r.value=!0)},x=()=>{r.value=!1};return(P,N)=>u.value.isRating?nt((K(),Xe(vK,{key:0,modelValue:s.value,"onUpdate:modelValue":N[0]||(N[0]=G=>s.value=G),params:O.value,readOnly:!1,disabled:o.disabled},{icon:Se(()=>[ye(gt,{source:"rating",src:g.value||"Star",size:Np},null,8,["src"])]),_:1},8,["modelValue","params","disabled"])),[[J(n),{isLoading:h.value}]]):nt((K(),Xe(or,xn({key:1},J(F),{onMouseenter:k,style:{"--icon-size":"24px"},onMouseleave:x,ref_key:"wrapperRef",ref:l}),Su({default:Se(()=>[nt((K(),Ce("div",{class:z(P.$style["metric-wrapper"])},[we("div",{class:z([P.$style["metric-content"],o.disabled?P.$style.disabled:""])},[!u.value.isError&&u.value.isEmpty?(K(),Ce(kt,{key:0},[u.value.isDropdown?(K(),Xe(gt,{key:0,src:"ChevronDown",source:"remote",size:12,style:{width:"20px"},color:"var(--grey-300)"})):u.value.isFormula?(K(),Xe(gt,{key:1,src:"SquareRootVariable",source:"remote",size:Np,color:y.value},null,8,["color"])):ot("",!0),u.value.pendingCalculation?(K(),Ce("span",{key:2,class:z(P.$style["metric-empty"])}," Pending ",2)):u.value.isDropdown?ot("",!0):(K(),Ce("span",{key:3,class:z(P.$style["metric-empty"])}," - ",2))],64)):u.value.isFormula?(K(),Xe(gt,{key:1,src:"SquareRootVariable",source:"remote",size:Np,color:y.value},null,8,["color"])):ot("",!0),u.value.isError?(K(),Ce("div",yK,"Error")):ot("",!0),!u.value.isEmpty&&!u.value.isError?(K(),Ce(kt,{key:3},[u.value.hasPrefix?(K(),Ce("span",{key:0,class:z([P.$style["metric-morpheme"],P.$style["metric-morpheme--prefix"]])},bt(d.value.morpheme_value),3)):ot("",!0),we("span",{class:z([P.$style["metric-value"],J(C)?P.$style.hovered:"",{[P.$style["with-morpheme"]]:u.value.hasPrefix||u.value.hasSuffix,[P.$style["with-formula-icon"]]:u.value.isFormula,[P.$style.disabled]:o.disabled}])},bt(R.value),3),u.value.hasSuffix?(K(),Ce("span",{key:1,class:z([P.$style["metric-morpheme"],P.$style["metric-morpheme--suffix"]])},bt(d.value.morpheme_value),3)):ot("",!0)],64)):ot("",!0)],2)],2)),[[J(i),{content:f.value,bypassOverflowCheck:!1}]])]),_:2},[J(C)&&!o.disabled?{name:"suffix",fn:Se(()=>[we("div",{class:z([P.$style.suffix,"wrapper-suffix"])},[b.value&&!u.value.isEmpty&&!u.value.isError?nt((K(),Xe(ft,{key:0,variant:["icon","secondary"],size:24,onClick:rn(J(_),["prevent","stop"])},{default:Se(()=>[ye(gt,{src:"Copy",source:"remote",size:12})]),_:1},8,["onClick"])),[[J(i),E.value]]):ot("",!0)],2)]),key:"0"}:void 0]),1040)),[[J(n),{isLoading:h.value}]])}}),[["__cssModules",{$style:{"metric-wrapper":"_metric-wrapper_tcd7x_1","metric-content":"_metric-content_tcd7x_5",disabled:"_disabled_tcd7x_15","metric-value":"_metric-value_tcd7x_19",hovered:"_hovered_tcd7x_19","with-morpheme":"_with-morpheme_tcd7x_34","with-formula-icon":"_with-formula-icon_tcd7x_37","metric-value--number":"_metric-value--number_tcd7x_43","metric-value--currency":"_metric-value--currency_tcd7x_43","metric-value--percentage":"_metric-value--percentage_tcd7x_43","metric-morpheme":"_metric-morpheme_tcd7x_47","metric-empty":"_metric-empty_tcd7x_60","metric-icon":"_metric-icon_tcd7x_67"}}]]),wK=Ct(lt({__name:"HeaderSorting",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean},modelValue:{}},emits:["sort-changed","update:modelValue"],setup(e,{emit:t}){const n=yn,i={START_ASC:{value:"start_asc",label:"Soonest to furthest start",id:"start_asc"},START_DESC:{value:"start_desc",label:"Furthest to soonest start",id:"start_desc"},DUE_ASC:{value:"due_asc",label:"Soonest to furthest due",id:"due_asc"},DUE_DESC:{value:"due_desc",label:"Furthest to soonest due",id:"due_desc"}},o={desc:{value:"desc",label:"Newest to oldest",id:"desc"},asc:{value:"asc",label:"Oldest to newest",id:"asc"}},s={asc:{value:"asc",label:"Smallest to largest",id:"asc"},desc:{value:"desc",label:"Largest to smallest",id:"desc"}},r={asc:{value:"asc",label:"Ascending",id:"asc"},desc:{value:"desc",label:"Descending",id:"desc"}},a=e,l={assignees:"default",completedOn:"date",dateRange:"dateRange",id:"number",isArchived:"default",isCompleted:"default",isDeleted:"default",isProcessing:"default",isStarted:"default",lastUpdated:"date",name:"default",status:"default",permissions:"default",options:"default"},c=j(()=>{var O,k;if(a.headerType)return a.headerType;if(((k=(O=a.params)==null?void 0:O.column)==null?void 0:k.getColId()).includes("metric"))return"default";const I=a.headerType??a.params.column.getColId();return l[I]||"default"}),u=j(()=>{var _;return((_=a.params)==null?void 0:_.displayName)??""}),d=j(()=>{let _=[];switch(c.value){case"dateRange":_=Object.values(i).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;case"date":_=Object.values(o).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;case"number":_=Object.values(s).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break;default:_=Object.values(r).map(I=>({...I,selected:f.value===I.value,type:"text",hover:C.value===I.value}));break}return f.value!=="none"&&_.push({id:"clear",label:"Clear",value:"none",selected:!1,type:"text",icon:"XMark",hover:C.value=="none"}),_}),h=j(()=>String(f.value).endsWith("asc")?"SortUp":String(f.value).endsWith("desc")?"SortDown":"Sort"),f=Z(a.modelValue??"none"),g=_=>{S("update:modelValue",_),S("sort-changed",_)},m=_=>{f.value=_},y=Ho(()=>{if(c.value==="date"||c.value==="default"||c.value==="number"){let _;f.value==="none"?_="asc":f.value==="asc"?_="desc":_="none",f.value=_}else{const _=[i.START_ASC.value,i.START_DESC.value,i.DUE_ASC.value,i.DUE_DESC.value,"none"],O=(_.indexOf(f.value)+1)%_.length;f.value=_[O]}},300),b=j(()=>{if(f.value==="none")return"No sorting applied";const _=d.value.find(I=>I.value===f.value);return(_==null?void 0:_.label)||""}),S=t,F=j(()=>{if(a.disabled&&!a.readOnly)return"var(--disabled-color)";if(f.value!=="none")return"var(--primary-color-hover)"});ct(()=>a.modelValue,_=>{_!=f.value&&(f.value=_)}),ct(f,_=>{_!==a.modelValue&&g(_)});const C=Z(f.value);ct(()=>f.value,_=>{C.value=_});const R=_=>{var x,P;if(a.readOnly||a.disabled)return;let I=0;_.key==="ArrowDown"?I=1:_.key==="ArrowUp"&&(I=-1);const O=d.value.findIndex(N=>N.value===C.value),k=d.value.length;if(_.key==="Enter"||_.key===" ")_.preventDefault(),f.value=C.value,(x=E.value)==null||x.hide();else if(I!==0){_.preventDefault();let N=(O+I+k)%k;C.value=d.value[N].value}else _.key==="Escape"&&((P=E.value)==null||P.hide())},E=Z(null);return vn(()=>{var _,I;(I=(_=E.value)==null?void 0:_.$el)==null||I.addEventListener("keydown",R)}),Ll(()=>{var _,I;(I=(_=E.value)==null?void 0:_.$el)==null||I.removeEventListener("keydown",R)}),(_,I)=>(K(),Xe(QC,{ref_key:"dropdownRef",ref:E,options:d.value,label:u.value,readOnly:a.readOnly,disabled:a.disabled,variant:["icon","tertiary"],size:"small",onHandleClick:J(y),onSelect:I[0]||(I[0]=O=>m(O))},{prefix:Se(()=>[ye(ft,{variant:["text"],onClick:J(y),label:u.value,size:"small"},null,8,["onClick","label"])]),iconDropdown:Se(()=>[nt(ye(gt,{src:h.value,source:"remote",color:F.value},null,8,["src","color"]),[[J(n),b.value]])]),_:1},8,["options","label","readOnly","disabled","onHandleClick"]))}}),[["__cssModules",{$style:{iconSorting:"_iconSorting_18bqx_1","button-group":"_button-group_18bqx_7","ab-table-button":"_ab-table-button_18bqx_18","button-main":"_button-main_18bqx_24","button-dropdown-trigger":"_button-dropdown-trigger_18bqx_29",headerSorting:"_headerSorting_18bqx_39"}}]]),bK=["disabled","readonly","checked","indeterminate"],ew=Ct(lt({__name:"Checkbox",props:{modelValue:{type:[Number,Boolean]},disabled:{type:Boolean},readOnly:{type:Boolean},tooltipText:{},allowIndeterminate:{type:Boolean},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=j(()=>i.allowIndeterminate?[0,1,2]:[0,2]),r=j(()=>{if(typeof i.tooltipText=="string"||!i.tooltipText)return i.tooltipText||"";switch(l.value){case 0:return i.tooltipText.unchecked;case 1:return i.tooltipText.indeterminate;case 2:return i.tooltipText.checked;default:return""}}),a=()=>{if(u.value)return;const h=(s.value.indexOf(l.value)+1)%s.value.length;l.value=s.value[h]},l=Z(typeof i.modelValue=="boolean"?i.modelValue?2:0:i.modelValue),c=j(()=>({checked:l.value===2,indeterminate:l.value===1,none:l.value===0})),u=j(()=>i.disabled||i.readOnly);return ct(()=>l.value,d=>{o("update:modelValue",d===2)}),(d,h)=>nt((K(),Ce("input",{disabled:i.disabled,key:l.value,readonly:i.readOnly,type:"checkbox",class:z([d.$style["input-checkbox"],d.$style[i.size||"medium"]]),checked:c.value.checked,indeterminate:c.value.indeterminate,onChange:a,"aria-label":"Select All Items"},null,42,bK)),[[J(n),{content:r.value,hideOnClick:!1,contentClass:"extra-padding"}]])}}),[["__cssModules",{$style:{small:"_small_p7d2l_68",large:"_large_p7d2l_72",medium:"_medium_p7d2l_76"}}]]),SK=Ct(lt({name:"HeaderCheckbox",__name:"HeaderCheckbox",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=e,n=yn,i=YC(),{setSelectionStatus:o}=i,{rowCount:s}=nr(i),r=Z(0);ct(r,S=>{o(r.value)},{immediate:!0});const a=j(()=>r.value!==0),l=j(()=>({checked:r.value===2,indeterminate:r.value===1,UNCHECK:r.value===0})),c=j(()=>({0:"Click to select check visible items",1:"Click to select All",2:"Click to clear selection"})[r.value]),u=j(()=>{const S=[{label:"All visible",value:"INDETERMINATE",type:"text",clickable:!0,selected:r.value===1,id:"indeterminate"},{label:"All",value:"CHECKED",type:"text",clickable:!0,selected:r.value===2,id:"checked"}];return a.value&&S.push({label:"None",value:"UNCHECK",type:"text",clickable:!0,selected:r.value===0,id:"uncheck"}),S}),d=S=>({selected:S.getSelectedRows().length,total:s.value.total,loaded:s.value.loaded}),h=({api:S,state:F})=>{r.value=F,F===0?S==null||S.deselectAll():S==null||S.forEachNode(C=>C.setSelected(!0))},f=()=>{var C;const S=(C=t.params)==null?void 0:C.api;S||console.error("[HeaderCheckbox] There is no API available"),h({api:S,state:{0:1,1:2,2:0}[r.value]})},g=S=>{var R;const F=(R=t.params)==null?void 0:R.api;F||console.error("no api"),h({api:F,state:{INDETERMINATE:1,CHECKED:2,UNCHECK:0}[S]})},m=Ho(S=>{const{selected:F,total:C}=d(S);F===0?r.value=0:F===C?r.value=2:r.value=1},300);let y=[];vn(()=>{var R;const S=(R=t.params)==null?void 0:R.api;if(!S)return;const F=E=>m(E.api),C=()=>m(S);S.addEventListener("selectionChanged",F),S.addEventListener("rowDataUpdated",C),S.addEventListener("modelUpdated",C),y=[()=>S.removeEventListener("selectionChanged",F),()=>S.removeEventListener("rowDataUpdated",C),()=>S.removeEventListener("modelUpdated",C)]}),Yn(()=>{y.forEach(S=>S())});const b=`header-checkbox-${Math.random().toString(36).substr(2,9)}`;return(S,F)=>(K(),Xe(QC,{options:u.value,size:24,disabled:t.disabled,readOnly:t.readOnly,variant:["icon","tertiary"],placement:"bottom-start",onSelect:g},{prefix:Se(()=>[nt((K(),Xe(ew,{id:b,disabled:t.disabled,key:r.value,readonly:t.readOnly,type:"checkbox",checked:l.value.checked,indeterminate:l.value.indeterminate,modelValue:r.value,"onUpdate:modelValue":F[0]||(F[0]=C=>r.value=C),onChange:f,"aria-label":"Select CHECKED Items",class:z(S.$style["ag-checkbox-input"])},null,8,["disabled","readonly","checked","indeterminate","modelValue","class"])),[[J(n),{content:c.value,hideOnClick:!1,contentClass:"extra-padding"}]])]),_:1},8,["options","disabled","readOnly"]))}}),[["__cssModules",{$style:{"ag-checkbox-input":"_ag-checkbox-input_1efbt_1","button-group":"_button-group_1efbt_46","button-main":"_button-main_1efbt_46",headerCheckbox:"_headerCheckbox_1efbt_50"}}]]),EK={key:1},RK=Ct(lt({name:"StatusRenderer",__name:"StatusRenderer",props:{disabled:{type:Boolean},readOnly:{type:Boolean},value:{},data:{},id:{},params:{},workspaceId:{},entityId:{},tooltip:{},__checkboxSelection:{type:Boolean}},setup(e){const t=ls,n=yn,i=e,{isEditing:o}=jC(i),s=Z(null),r=Z(null),a=j(()=>i.value),l=j(()=>a.value===void 0),c=j(()=>{var f;return((f=a.value)==null?void 0:f.name)||"No status"}),u=j(()=>{var g;const f=(g=a.value)==null?void 0:g.color;return{backgroundColor:py(f)?f:"#fff",border:gy(f,"white")?"1px solid #ccc":"1px solid #fff"}}),d=j(()=>{var f;return{disabled:i.disabled,error:!1,readOnly:i.readOnly,isEmpty:R3((f=a.value)==null?void 0:f.label),inputRef:s,wrapperRef:r,clickable:!i.disabled&&!i.readOnly,active:o}}),{argsMain:h}=ir(d);return(f,g)=>nt((K(),Xe(J(or),xn(J(h),{ref_key:"wrapperRef",ref:r}),{default:Se(()=>[l.value?ot("",!0):(K(),Ce("div",{key:0,class:z(f.$style["status-renderer"])},[a.value?(K(),Ce(kt,{key:0},[we("div",{class:z(f.$style["status-renderer__color-code"]),style:mn(u.value)},null,6),nt((K(),Ce("div",{class:z(f.$style["status-renderer__status-name"])},[ut(bt(c.value),1)],2)),[[J(n),{content:c.value}]])],64)):l.value?ot("",!0):(K(),Ce("div",EK,"No status"))],2))]),_:1},16)),[[J(t),{isLoading:l.value}]])}}),[["__cssModules",{$style:{"status-renderer":"_status-renderer_ui0ga_1","status-renderer__color-code":"_status-renderer__color-code_ui0ga_10","status-renderer__status-name":"_status-renderer__status-name_ui0ga_20"}}]]),QP=Ct(lt({__name:"PopupLayout",props:{popupName:{},showOverlay:{type:Boolean,default:!0},overlayOpacity:{default:.5},closeOnOverlayClick:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0}},emits:["shown","hidden"],setup(e,{expose:t,emit:n}){const i=e,{popupRef:o,show:s,hide:r,isVisible:a}=Q6({useTrigger:!1,arrow:!1,centered:!0,showOverlay:i.showOverlay,overlayOpacity:i.overlayOpacity,closeOnOverlayClick:i.closeOnOverlayClick,appendTo(u){return document.body}}),l=u=>{i.closeOnEscape&&u.key==="Escape"&&a.value&&r()};vn(()=>{document.addEventListener("keydown",l)}),Yn(()=>{document.removeEventListener("keydown",l)}),t({show:s,hide:r,isVisible:a});const c=n;return ct(()=>a.value,u=>{c(u?"shown":"hidden")}),(u,d)=>{const h=af("tooltip");return K(),Ce("div",{ref_key:"popupRef",ref:o,class:z(u.$style.popupContainer)},[we("div",{class:z(u.$style.popupWrapper)},[we("div",{class:z(u.$style.header)},[we("span",{class:z(u.$style["header-title"])},bt(e.popupName),3),nt((K(),Xe(ft,{style:{position:"absolute",top:"0",right:"0"},variant:"text",onClick:J(r),"aria-label":"Close popup"},{default:Se(()=>[ye(gt,{src:"Xmark"})]),_:1},8,["onClick"])),[[h,"Close"]])],2),we("div",{class:z(u.$style.body)},[_t(u.$slots,"default")],2),we("div",{class:z(u.$style.footer)},[_t(u.$slots,"footer")],2)],2)],2)}}}),[["__cssModules",{$style:{popupContainer:"_popupContainer_1cwaa_1",popupWrapper:"_popupWrapper_1cwaa_5",popupFadeIn:"_popupFadeIn_1cwaa_1",header:"_header_1cwaa_19","header-title":"_header-title_1cwaa_28",body:"_body_1cwaa_38",footer:"_footer_1cwaa_43"}}]]),DK={list_cursor:{error:"Failed to fetch data. Please reload table."},assignedUser:{error:"Failed to fetch assignees. Please reload table."},metricValues:{error:"Failed to fetch metric values. Please reload table."},assignableUser:{error:"Failed to fetch people. Please try again."},assignableStatus:{error:"Failed to fetch statuses. Please try again."},basicInfor:{error:"Failed to fetch data. Please try again."},item:{error:"Update failed. Please try again."},removeAssignee:{error:"Update failed. Please try again."},createNewScene:{error:"Creation failed. Please try again."},metricList:{error:"Failed to fetch metrics. Please try again."},multipleAssignableUser:{error:"Failed to fetch data. Please reload table."},getPermission:{error:"Failed to fetch permissions."},delete_rendition:{success:"Deletion successful.",error:"Deletion failed. Please try again."},delete_thumbnail:{success:"Deletion successful.",error:"Deletion failed. Please try again."},archive_item:{success:"Archive successful.",error:"Archive failed. Please try again."},unarchive_item:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},bulkDelete:{success:"Deletion successful.",error:"Deletion failed. Please try again."},bulkArchive:{success:"Archive successful.",error:"Archive failed. Please try again."},bulkDateUpdate:{error:"Failed to update items."},bulkAssignUpdate:{error:"Failed to update assignees."},bulkStatusUpdate:{error:"Failed to update items."},getUserPermission:{error:"Failed to fetch user permissions."},getEntityDetail:{error:"Failed to fetch entity details."},bulkUnarchive:{success:"Unarchive successful.",error:"Unarchive failed. Please try again."},downloadTemplate:{},importItems:{},exportItems:{},updateFromFile:{},getStatuses:{}},bd=Ap("toast",()=>{const e=Z([]),t=(o,s)=>{const r=DK[o];if(r){const a=r[s];if(a){n({id:o,type:s,message:a});return}}else n({id:o,type:s,message:o})},n=(o,s=5e3)=>{const r={...o,id:o.id??Date.now()+Math.random()};e.value.push(r),setTimeout(()=>{i(r.id)},s)};function i(o){e.value=e.value.filter(s=>s.id!==o)}return{notifications:e,addNotification:n,removeNotification:i,showMessage:t}}),_K=["innerHTML"],xK=Ct(lt({__name:"Snackbar",setup(e){const t=kB,n=bd(),{removeNotification:i}=n,{notifications:o}=nr(n),s=c=>c.trim().startsWith("<svg"),r=Z("Copy to clipboard"),a=()=>{setTimeout(()=>{r.value="Copy to clipboard"},1e3)},l=c=>{navigator.clipboard.writeText(c).then(()=>{r.value="Copied!",a()},()=>{r.value="Copy failed",a()})};return(c,u)=>{const d=af("tooltip");return K(),Xe(mB,{name:"list",tag:"div",class:z(c.$style["notification-wrapper"])},{default:Se(()=>[(K(!0),Ce(kt,null,Un(J(o),h=>{var f;return nt((K(),Ce("div",{key:h.id,class:z([c.$style["notification-item"],c.$style[`notification--${h.type||"info"}`],!(h!=null&&h.actions)||((f=h==null?void 0:h.actions)==null?void 0:f.length)==0?c.$style["snackbar-type"]:""])},[we("p",{class:z(c.$style.snackbar__message)},[h.icon&&!s(h.icon)?(K(),Xe(gt,{key:0,src:h.icon,source:"remote"},null,8,["src"])):ot("",!0),h.icon&&s(h.icon)?(K(),Ce("i",{key:1,class:z(c.$style["icon-draw"]),innerHTML:h.icon},null,10,_K)):ot("",!0),nt((K(),Ce("span",{class:z(c.$style["error-message"])},[ut(bt(h.message),1)],2)),[[d,{content:h.message}]])],2),h.actions?(K(),Ce("div",{key:0,class:z(c.$style["actions-notification"])},[(K(!0),Ce(kt,null,Un(h.actions,g=>(K(),Xe(ft,xn({key:g.label},{ref_for:!0},g,{onClick:g.action}),{prefix:Se(()=>[g.btnIcon?(K(),Xe(gt,{key:0,src:g.btnIcon,source:"remote",color:"white"},null,8,["src"])):ot("",!0)]),_:2},1040,["onClick"]))),128))],2)):ot("",!0),h.type=="error"?nt((K(),Xe(ft,{key:1,variant:"tertiary",onClick:g=>l(h.message)},{prefix:Se(()=>[ye(gt,{src:"Copy",source:"remote",color:"white"})]),_:1},8,["onClick"])),[[d,r.value]]):ot("",!0),ye(ft,{variant:"tertiary",onClick:g=>J(i)(h.id),class:z(c.$style["close-btn"]),size:18},{default:Se(()=>[ye(gt,{src:"Xmark",color:"var(--icon-color)"})]),_:1},8,["onClick","class"])],2)),[[J(t)]])}),128))]),_:1},8,["class"])}}}),[["__cssModules",{$style:{"notification-wrapper":"_notification-wrapper_1tunr_1","notification-item":"_notification-item_1tunr_16","notification--success":"_notification--success_1tunr_30","notification--error":"_notification--error_1tunr_33","close-btn":"_close-btn_1tunr_37","notification--info":"_notification--info_1tunr_40","notification--warning":"_notification--warning_1tunr_47","notification--interactive":"_notification--interactive_1tunr_54","snackbar-type":"_snackbar-type_1tunr_60",snackbar__message:"_snackbar__message_1tunr_68","error-message":"_error-message_1tunr_80","actions-notification":"_actions-notification_1tunr_89"}}]]);/*!
|
|
88
88
|
* vue-draggable-next v2.3.0
|
|
89
89
|
* (c) 2025 Anish George
|
|
90
90
|
* @license MIT
|
|
@@ -93,7 +93,7 @@ This will fail in production.`);r=ja,r._s.has(e)||(o?WC(e,t,i,r):BP(e,i,r),M.env
|
|
|
93
93
|
* @author RubaXa <trash@rubaxa.org>
|
|
94
94
|
* @author owenm <owen23355@gmail.com>
|
|
95
95
|
* @license MIT
|
|
96
|
-
*/function n1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n1(Object(n),!0).forEach(function(i){AK(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vp(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vp=function(t){return typeof t}:Vp=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vp(e)}function AK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(){return sr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},sr.apply(this,arguments)}function kK(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function OK(e,t){if(e==null)return{};var n=kK(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var MK="1.14.0";function rr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ar=rr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Sd=rr(/Edge/i),i1=rr(/firefox/i),Ed=rr(/safari/i)&&!rr(/chrome/i)&&!rr(/android/i),o1=rr(/iP(ad|od|hone)/i),LK=rr(/chrome/i)&&rr(/android/i),s1={capture:!1,passive:!1};function Zt(e,t,n){e.addEventListener(t,n,!ar&&s1)}function zt(e,t,n){e.removeEventListener(t,n,!ar&&s1)}function Bp(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function NK(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function vs(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Bp(e,t):Bp(e,t))||i&&e===n)return e;if(e===n)break}while(e=NK(e))}return null}var r1=/\s+/g;function Zi(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(r1," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(r1," ")}}function Et(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function wc(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Et(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function a1(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,s=i.length;if(n)for(;o<s;o++)n(i[o],o);return i}return[]}function ys(){var e=document.scrollingElement;return e||document.documentElement}function Kn(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var s,r,a,l,c,u,d;if(e!==window&&e.parentNode&&e!==ys()?(s=e.getBoundingClientRect(),r=s.top,a=s.left,l=s.bottom,c=s.right,u=s.height,d=s.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!ar))do if(o&&o.getBoundingClientRect&&(Et(o,"transform")!=="none"||n&&Et(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Et(o,"border-top-width")),a-=h.left+parseInt(Et(o,"border-left-width")),l=r+s.height,c=a+s.width;break}while(o=o.parentNode);if(i&&e!==window){var f=wc(o||e),g=f&&f.a,m=f&&f.d;f&&(r/=m,a/=g,d/=g,u/=m,l=r+u,c=a+d)}return{top:r,left:a,bottom:l,right:c,width:d,height:u}}}function l1(e,t,n){for(var i=Gr(e,!0),o=Kn(e)[t];i;){var s=Kn(i)[n],r=void 0;if(r=o>=s,!r)return i;if(i===ys())break;i=Gr(i,!1)}return!1}function bc(e,t,n,i){for(var o=0,s=0,r=e.children;s<r.length;){if(r[s].style.display!=="none"&&r[s]!==Rt.ghost&&(i||r[s]!==Rt.dragged)&&vs(r[s],n.draggable,e,!1)){if(o===t)return r[s];o++}s++}return null}function nw(e,t){for(var n=e.lastElementChild;n&&(n===Rt.ghost||Et(n,"display")==="none"||t&&!Bp(n,t));)n=n.previousElementSibling;return n||null}function Co(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Rt.clone&&(!t||Bp(e,t))&&n++;return n}function c1(e){var t=0,n=0,i=ys();if(e)do{var o=wc(e),s=o.a,r=o.d;t+=e.scrollLeft*s,n+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,n]}function VK(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Gr(e,t){if(!e||!e.getBoundingClientRect)return ys();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Et(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ys();if(i||t)return n;i=!0}}while(n=n.parentNode);return ys()}function BK(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function iw(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Rd;function u1(e,t){return function(){if(!Rd){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),Rd=setTimeout(function(){Rd=void 0},t)}}}function HK(){clearTimeout(Rd),Rd=void 0}function d1(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function h1(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Xi="Sortable"+new Date().getTime();function GK(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(Et(o,"display")==="none"||o===Rt.ghost)){e.push({target:o,rect:Kn(o)});var s=ms({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=wc(o,!0);r&&(s.top-=r.f,s.left-=r.e)}o.fromRect=s}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(VK(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,r=0;e.forEach(function(a){var l=0,c=a.target,u=c.fromRect,d=Kn(c),h=c.prevFromRect,f=c.prevToRect,g=a.rect,m=wc(c,!0);m&&(d.top-=m.f,d.left-=m.e),c.toRect=d,c.thisAnimationDuration&&iw(h,d)&&!iw(u,d)&&(g.top-d.top)/(g.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(l=WK(g,h,f,o.options)),iw(d,u)||(c.prevFromRect=u,c.prevToRect=d,l||(l=o.options.animation),o.animate(c,g,d,l)),l&&(s=!0,r=Math.max(r,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},r):typeof i=="function"&&i(),e=[]},animate:function(i,o,s,r){if(r){Et(i,"transition",""),Et(i,"transform","");var a=wc(this.el),l=a&&a.a,c=a&&a.d,u=(o.left-s.left)/(l||1),d=(o.top-s.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,Et(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=$K(i),Et(i,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Et(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Et(i,"transition",""),Et(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},r)}}}}function $K(e){return e.offsetWidth}function WK(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Sc=[],ow={initializeByDefault:!0},Dd={mount:function(t){for(var n in ow)ow.hasOwnProperty(n)&&!(n in t)&&(t[n]=ow[n]);Sc.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Sc.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var s=t+"Global";Sc.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][s]&&n[r.pluginName][s](ms({sortable:n},i)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](ms({sortable:n},i)))})},initializePlugins:function(t,n,i,o){Sc.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,n,t.options);c.sortable=t,c.options=t.options,t[l]=c,sr(i,c.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var r=this.modifyOption(t,s,t.options[s]);typeof r<"u"&&(t.options[s]=r)}},getEventProperties:function(t,n){var i={};return Sc.forEach(function(o){typeof o.eventProperties=="function"&&sr(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return Sc.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(o=s.optionListeners[n].call(t[s.pluginName],i))}),o}};function zK(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,s=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Xi],!!t){var m,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ar&&!Sd?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=r||n,m.from=a||n,m.item=o||n,m.clone=s,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var S=ms(ms({},g),Dd.getEventProperties(i,t));for(var F in S)m[F]=S[F];n&&n.dispatchEvent(m),y[b]&&y[b].call(t,m)}}var UK=["evt"],ki=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,s=OK(i,UK);Dd.pluginEvent.bind(Rt)(t,n,ms({dragEl:Ye,parentEl:Pn,ghostEl:Pt,rootEl:Cn,nextEl:Za,lastDownEl:Hp,cloneEl:In,cloneHidden:$r,dragStarted:xd,putSortable:ni,activeSortable:Rt.active,originalEvent:o,oldIndex:Ec,oldDraggableIndex:_d,newIndex:Ji,newDraggableIndex:Wr,hideGhostForTarget:C1,unhideGhostForTarget:w1,cloneNowHidden:function(){$r=!0},cloneNowShown:function(){$r=!1},dispatchSortableEvent:function(a){Di({sortable:n,name:a,originalEvent:o})}},s))};function Di(e){zK(ms({putSortable:ni,cloneEl:In,targetEl:Ye,rootEl:Cn,oldIndex:Ec,oldDraggableIndex:_d,newIndex:Ji,newDraggableIndex:Wr},e))}var Ye,Pn,Pt,Cn,Za,Hp,In,$r,Ec,Ji,_d,Wr,Gp,ni,Rc=!1,$p=!1,Wp=[],Xa,jo,sw,rw,f1,p1,xd,Dc,Fd,Td=!1,zp=!1,Up,hi,aw=[],lw=!1,jp=[],Kp=typeof document<"u",qp=o1,g1=Sd||ar?"cssFloat":"float",jK=Kp&&!LK&&!o1&&"draggable"in document.createElement("div"),m1=function(){if(Kp){if(ar)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),v1=function(t,n){var i=Et(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=bc(t,0,n),r=bc(t,1,n),a=s&&Et(s),l=r&&Et(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Kn(s).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Kn(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=o&&i[g1]==="none"||r&&i[g1]==="none"&&c+u>o)?"vertical":"horizontal"},KK=function(t,n,i){var o=i?t.left:t.top,s=i?t.right:t.bottom,r=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,c=i?n.width:n.height;return o===a||s===l||o+r/2===a+c/2},qK=function(t,n){var i;return Wp.some(function(o){var s=o[Xi].options.emptyInsertThreshold;if(!(!s||nw(o))){var r=Kn(o),a=t>=r.left-s&&t<=r.right+s,l=n>=r.top-s&&n<=r.bottom+s;if(a&&l)return i=o}}),i},y1=function(t){function n(s,r){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(r||d))return!0;if(s==null||s===!1)return!1;if(r&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,c,u),r)(a,l,c,u);var h=(r?a:l).options.group.name;return s===!0||typeof s=="string"&&s===h||s.join&&s.indexOf(h)>-1}}var i={},o=t.group;(!o||Vp(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},C1=function(){!m1&&Pt&&Et(Pt,"display","none")},w1=function(){!m1&&Pt&&Et(Pt,"display","")};Kp&&document.addEventListener("click",function(e){if($p)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),$p=!1,!1},!0);var Ja=function(t){if(Ye){t=t.touches?t.touches[0]:t;var n=qK(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Xi]._onDragOver(i)}}},YK=function(t){Ye&&Ye.parentNode[Xi]._isOutsideThisEl(t.target)};function Rt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=sr({},t),e[Xi]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return v1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Rt.supportPointer!==!1&&"PointerEvent"in window&&!Ed,emptyInsertThreshold:5};Dd.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);y1(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:jK,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Zt(e,"pointerdown",this._onTapStart):(Zt(e,"mousedown",this._onTapStart),Zt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Zt(e,"dragover",this),Zt(e,"dragenter",this)),Wp.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),sr(this,GK())}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Dc=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ye):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,s=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=o.filter;if(i7(i),!Ye&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Ed&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=vs(l,o.draggable,i,!1),!(l&&l.animated)&&Hp!==l)){if(Ec=Co(l),_d=Co(l,o.draggable),typeof u=="function"){if(u.call(this,t,l,this)){Di({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),ki("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=vs(c,d.trim(),i,!1),d)return Di({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),ki("filter",n,{evt:t}),!0}),u)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!vs(c,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,s=o.el,r=o.options,a=s.ownerDocument,l;if(i&&!Ye&&i.parentNode===s){var c=Kn(i);if(Cn=s,Ye=i,Pn=Ye.parentNode,Za=Ye.nextSibling,Hp=i,Gp=r.group,Rt.dragged=Ye,Xa={target:Ye,clientX:(n||t).clientX,clientY:(n||t).clientY},f1=Xa.clientX-c.left,p1=Xa.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ye.style["will-change"]="all",l=function(){if(ki("delayEnded",o,{evt:t}),Rt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!i1&&o.nativeDraggable&&(Ye.draggable=!0),o._triggerDragStart(t,n),Di({sortable:o,name:"choose",originalEvent:t}),Zi(Ye,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){a1(Ye,u.trim(),cw)}),Zt(a,"dragover",Ja),Zt(a,"mousemove",Ja),Zt(a,"touchmove",Ja),Zt(a,"mouseup",o._onDrop),Zt(a,"touchend",o._onDrop),Zt(a,"touchcancel",o._onDrop),i1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),ki("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Sd||ar))){if(Rt.eventCanceled){this._onDrop();return}Zt(a,"mouseup",o._disableDelayedDrag),Zt(a,"touchend",o._disableDelayedDrag),Zt(a,"touchcancel",o._disableDelayedDrag),Zt(a,"mousemove",o._delayedDragTouchMoveHandler),Zt(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&Zt(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&cw(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;zt(t,"mouseup",this._disableDelayedDrag),zt(t,"touchend",this._disableDelayedDrag),zt(t,"touchcancel",this._disableDelayedDrag),zt(t,"mousemove",this._delayedDragTouchMoveHandler),zt(t,"touchmove",this._delayedDragTouchMoveHandler),zt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Zt(document,"pointermove",this._onTouchMove):n?Zt(document,"touchmove",this._onTouchMove):Zt(document,"mousemove",this._onTouchMove):(Zt(Ye,"dragend",this),Zt(Cn,"dragstart",this._onDragStart));try{document.selection?Zp(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Rc=!1,Cn&&Ye){ki("dragStarted",this,{evt:n}),this.nativeDraggable&&Zt(document,"dragover",YK);var i=this.options;!t&&Zi(Ye,i.dragClass,!1),Zi(Ye,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),Di({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(jo){this._lastX=jo.clientX,this._lastY=jo.clientY,C1();for(var t=document.elementFromPoint(jo.clientX,jo.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(jo.clientX,jo.clientY),t!==n);)n=t;if(Ye.parentNode[Xi]._isOutsideThisEl(t),n)do{if(n[Xi]){var i=void 0;if(i=n[Xi]._onDragOver({clientX:jo.clientX,clientY:jo.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);w1()}},_onTouchMove:function(t){if(Xa){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,r=Pt&&wc(Pt,!0),a=Pt&&r&&r.a,l=Pt&&r&&r.d,c=qp&&hi&&c1(hi),u=(s.clientX-Xa.clientX+o.x)/(a||1)+(c?c[0]-aw[0]:0)/(a||1),d=(s.clientY-Xa.clientY+o.y)/(l||1)+(c?c[1]-aw[1]:0)/(l||1);if(!Rt.active&&!Rc){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Pt){r?(r.e+=u-(sw||0),r.f+=d-(rw||0)):r={a:1,b:0,c:0,d:1,e:u,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Et(Pt,"webkitTransform",h),Et(Pt,"mozTransform",h),Et(Pt,"msTransform",h),Et(Pt,"transform",h),sw=u,rw=d,jo=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pt){var t=this.options.fallbackOnBody?document.body:Cn,n=Kn(Ye,!0,qp,!0,t),i=this.options;if(qp){for(hi=t;Et(hi,"position")==="static"&&Et(hi,"transform")==="none"&&hi!==document;)hi=hi.parentNode;hi!==document.body&&hi!==document.documentElement?(hi===document&&(hi=ys()),n.top+=hi.scrollTop,n.left+=hi.scrollLeft):hi=ys(),aw=c1(hi)}Pt=Ye.cloneNode(!0),Zi(Pt,i.ghostClass,!1),Zi(Pt,i.fallbackClass,!0),Zi(Pt,i.dragClass,!0),Et(Pt,"transition",""),Et(Pt,"transform",""),Et(Pt,"box-sizing","border-box"),Et(Pt,"margin",0),Et(Pt,"top",n.top),Et(Pt,"left",n.left),Et(Pt,"width",n.width),Et(Pt,"height",n.height),Et(Pt,"opacity","0.8"),Et(Pt,"position",qp?"absolute":"fixed"),Et(Pt,"zIndex","100000"),Et(Pt,"pointerEvents","none"),Rt.ghost=Pt,t.appendChild(Pt),Et(Pt,"transform-origin",f1/parseInt(Pt.style.width)*100+"% "+p1/parseInt(Pt.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,s=i.options;if(ki("dragStart",this,{evt:t}),Rt.eventCanceled){this._onDrop();return}ki("setupClone",this),Rt.eventCanceled||(In=h1(Ye),In.draggable=!1,In.style["will-change"]="",this._hideClone(),Zi(In,this.options.chosenClass,!1),Rt.clone=In),i.cloneId=Zp(function(){ki("clone",i),!Rt.eventCanceled&&(i.options.removeCloneOnHide||Cn.insertBefore(In,Ye),i._hideClone(),Di({sortable:i,name:"clone"}))}),!n&&Zi(Ye,s.dragClass,!0),n?($p=!0,i._loopId=setInterval(i._emulateDragOver,50)):(zt(document,"mouseup",i._onDrop),zt(document,"touchend",i._onDrop),zt(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(i,o,Ye)),Zt(document,"drop",i),Et(Ye,"transform","translateZ(0)")),Rc=!0,i._dragStartId=Zp(i._dragStarted.bind(i,n,t)),Zt(document,"selectstart",i),xd=!0,Ed&&Et(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,s,r,a=this.options,l=a.group,c=Rt.active,u=Gp===l,d=a.sort,h=ni||c,f,g=this,m=!1;if(lw)return;function y(X,$){ki(X,g,ms({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:s,canSort:d,fromSortable:h,target:i,completed:S,onMove:function(ue,De){return Yp(Cn,n,Ye,o,ue,Kn(ue),t,De)},changed:F},$))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function S(X){return y("dragOverCompleted",{insertion:X}),X&&(u?c._hideClone():c._showClone(g),g!==h&&(Zi(Ye,ni?ni.options.ghostClass:c.options.ghostClass,!1),Zi(Ye,a.ghostClass,!0)),ni!==g&&g!==Rt.active?ni=g:g===Rt.active&&ni&&(ni=null),h===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===Ye&&!Ye.animated||i===n&&!i.animated)&&(Dc=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(Ye.parentNode[Xi]._isOutsideThisEl(t.target),!X&&Ja(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function F(){Ji=Co(Ye),Wr=Co(Ye,a.draggable),Di({sortable:g,name:"change",toEl:n,newIndex:Ji,newDraggableIndex:Wr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=vs(i,a.draggable,n,!0),y("dragOver"),Rt.eventCanceled)return m;if(Ye.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return S(!1);if($p=!1,c&&!a.disabled&&(u?d||(r=Pn!==Cn):ni===this||(this.lastPutMode=Gp.checkPull(this,c,Ye,t))&&l.checkPut(this,c,Ye,t))){if(f=this._getDirection(t,i)==="vertical",o=Kn(Ye),y("dragOverValid"),Rt.eventCanceled)return m;if(r)return Pn=Cn,b(),this._hideClone(),y("revert"),Rt.eventCanceled||(Za?Cn.insertBefore(Ye,Za):Cn.appendChild(Ye)),S(!0);var C=nw(n,a.draggable);if(!C||QK(t,f,this)&&!C.animated){if(C===Ye)return S(!1);if(C&&n===t.target&&(i=C),i&&(s=Kn(i)),Yp(Cn,n,Ye,o,i,s,t,!!i)!==!1)return b(),n.appendChild(Ye),Pn=n,F(),S(!0)}else if(C&&JK(t,f,this)){var R=bc(n,0,a,!0);if(R===Ye)return S(!1);if(i=R,s=Kn(i),Yp(Cn,n,Ye,o,i,s,t,!1)!==!1)return b(),n.insertBefore(Ye,R),Pn=n,F(),S(!0)}else if(i.parentNode===n){s=Kn(i);var E=0,_,I=Ye.parentNode!==n,O=!KK(Ye.animated&&Ye.toRect||o,i.animated&&i.toRect||s,f),k=f?"top":"left",x=l1(i,"top","top")||l1(Ye,"top","top"),P=x?x.scrollTop:void 0;Dc!==i&&(_=s[k],Td=!1,zp=!O&&a.invertSwap||I),E=e7(t,i,s,f,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,zp,Dc===i);var N;if(E!==0){var G=Co(Ye);do G-=E,N=Pn.children[G];while(N&&(Et(N,"display")==="none"||N===Pt))}if(E===0||N===i)return S(!1);Dc=i,Fd=E;var ie=i.nextElementSibling,B=!1;B=E===1;var H=Yp(Cn,n,Ye,o,i,s,t,B);if(H!==!1)return(H===1||H===-1)&&(B=H===1),lw=!0,setTimeout(XK,30),b(),B&&!ie?n.appendChild(Ye):i.parentNode.insertBefore(Ye,B?ie:i),x&&d1(x,0,P-x.scrollTop),Pn=Ye.parentNode,_!==void 0&&!zp&&(Up=Math.abs(_-Kn(i)[k])),F(),S(!0)}if(n.contains(Ye))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){zt(document,"mousemove",this._onTouchMove),zt(document,"touchmove",this._onTouchMove),zt(document,"pointermove",this._onTouchMove),zt(document,"dragover",Ja),zt(document,"mousemove",Ja),zt(document,"touchmove",Ja)},_offUpEvents:function(){var t=this.el.ownerDocument;zt(t,"mouseup",this._onDrop),zt(t,"touchend",this._onDrop),zt(t,"pointerup",this._onDrop),zt(t,"touchcancel",this._onDrop),zt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(Ji=Co(Ye),Wr=Co(Ye,i.draggable),ki("drop",this,{evt:t}),Pn=Ye&&Ye.parentNode,Ji=Co(Ye),Wr=Co(Ye,i.draggable),Rt.eventCanceled){this._nulling();return}Rc=!1,zp=!1,Td=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uw(this.cloneId),uw(this._dragStartId),this.nativeDraggable&&(zt(document,"drop",this),zt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ed&&Et(document.body,"user-select",""),Et(Ye,"transform",""),t&&(xd&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Pt&&Pt.parentNode&&Pt.parentNode.removeChild(Pt),(Cn===Pn||ni&&ni.lastPutMode!=="clone")&&In&&In.parentNode&&In.parentNode.removeChild(In),Ye&&(this.nativeDraggable&&zt(Ye,"dragend",this),cw(Ye),Ye.style["will-change"]="",xd&&!Rc&&Zi(Ye,ni?ni.options.ghostClass:this.options.ghostClass,!1),Zi(Ye,this.options.chosenClass,!1),Di({sortable:this,name:"unchoose",toEl:Pn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Cn!==Pn?(Ji>=0&&(Di({rootEl:Pn,name:"add",toEl:Pn,fromEl:Cn,originalEvent:t}),Di({sortable:this,name:"remove",toEl:Pn,originalEvent:t}),Di({rootEl:Pn,name:"sort",toEl:Pn,fromEl:Cn,originalEvent:t}),Di({sortable:this,name:"sort",toEl:Pn,originalEvent:t})),ni&&ni.save()):Ji!==Ec&&Ji>=0&&(Di({sortable:this,name:"update",toEl:Pn,originalEvent:t}),Di({sortable:this,name:"sort",toEl:Pn,originalEvent:t})),Rt.active&&((Ji==null||Ji===-1)&&(Ji=Ec,Wr=_d),Di({sortable:this,name:"end",toEl:Pn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ki("nulling",this),Cn=Ye=Pn=Pt=Za=In=Hp=$r=Xa=jo=xd=Ji=Wr=Ec=_d=Dc=Fd=ni=Gp=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,jp.forEach(function(t){t.checked=!0}),jp.length=sw=rw=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(t),ZK(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,s=i.length,r=this.options;o<s;o++)n=i[o],vs(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||n7(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(s,r){var a=o.children[r];vs(a,this.options.draggable,o,!1)&&(i[s]=a)},this),n&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(o.removeChild(i[s]),o.appendChild(i[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return vs(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Dd.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&y1(i)},destroy:function(){ki("destroy",this);var t=this.el;t[Xi]=null,zt(t,"mousedown",this._onTapStart),zt(t,"touchstart",this._onTapStart),zt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(zt(t,"dragover",this),zt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Wp.splice(Wp.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!$r){if(ki("hideClone",this),Rt.eventCanceled)return;Et(In,"display","none"),this.options.removeCloneOnHide&&In.parentNode&&In.parentNode.removeChild(In),$r=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if($r){if(ki("showClone",this),Rt.eventCanceled)return;Ye.parentNode==Cn&&!this.options.group.revertClone?Cn.insertBefore(In,Ye):Za?Cn.insertBefore(In,Za):Cn.appendChild(In),this.options.group.revertClone&&this.animate(Ye,In),Et(In,"display",""),$r=!1}}};function ZK(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Yp(e,t,n,i,o,s,r,a){var l,c=e[Xi],u=c.options.onMove,d;return window.CustomEvent&&!ar&&!Sd?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=s||Kn(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),u&&(d=u.call(c,l,r)),d}function cw(e){e.draggable=!1}function XK(){lw=!1}function JK(e,t,n){var i=Kn(bc(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}function QK(e,t,n){var i=Kn(nw(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function e7(e,t,n,i,o,s,r,a){var l=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!r){if(a&&Up<c*o){if(!Td&&(Fd===1?l>u+c*s/2:l<d-c*s/2)&&(Td=!0),Td)h=!0;else if(Fd===1?l<u+Up:l>d-Up)return-Fd}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return t7(t)}return h=h||r,h&&(l<u+c*s/2||l>d-c*s/2)?l>u+c/2?1:-1:0}function t7(e){return Co(Ye)<Co(e)?1:-1}function n7(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function i7(e){jp.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&jp.push(i)}}function Zp(e){return setTimeout(e,0)}function uw(e){return clearTimeout(e)}Kp&&Zt(document,"touchmove",function(e){(Rt.active||Rc)&&e.cancelable&&e.preventDefault()}),Rt.utils={on:Zt,off:zt,css:Et,find:a1,is:function(t,n){return!!vs(t,n,t,!1)},extend:BK,throttle:u1,closest:vs,toggleClass:Zi,clone:h1,index:Co,nextTick:Zp,cancelNextTick:uw,detectDirection:v1,getChild:bc},Rt.get=function(e){return e[Xi]},Rt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Rt.utils=ms(ms({},Rt.utils),i.utils)),Dd.mount(i)})},Rt.create=function(e,t){return new Rt(e,t)},Rt.version=MK;var Wn=[],Pd,dw,hw=!1,fw,pw,Xp,Id;function o7(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?Zt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Zt(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Zt(document,"touchmove",this._handleFallbackAutoScroll):Zt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?zt(document,"dragover",this._handleAutoScroll):(zt(document,"pointermove",this._handleFallbackAutoScroll),zt(document,"touchmove",this._handleFallbackAutoScroll),zt(document,"mousemove",this._handleFallbackAutoScroll)),b1(),Jp(),HK()},nulling:function(){Xp=dw=Pd=hw=Id=fw=pw=null,Wn.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,s=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(s,r);if(Xp=n,i||this.options.forceAutoScrollFallback||Sd||ar||Ed){gw(n,this.options,a,i);var l=Gr(a,!0);hw&&(!Id||s!==fw||r!==pw)&&(Id&&b1(),Id=setInterval(function(){var c=Gr(document.elementFromPoint(s,r),!0);c!==l&&(l=c,Jp()),gw(n,o.options,c,i)},10),fw=s,pw=r)}else{if(!this.options.bubbleScroll||Gr(a,!0)===ys()){Jp();return}gw(n,this.options,Gr(a,!1),!1)}}},sr(e,{pluginName:"scroll",initializeByDefault:!0})}function Jp(){Wn.forEach(function(e){clearInterval(e.pid)}),Wn=[]}function b1(){clearInterval(Id)}var gw=u1(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=ys(),c=!1,u;dw!==n&&(dw=n,Jp(),Pd=t.scroll,u=t.scrollFn,Pd===!0&&(Pd=Gr(n,!0)));var d=0,h=Pd;do{var f=h,g=Kn(f),m=g.top,y=g.bottom,b=g.left,S=g.right,F=g.width,C=g.height,R=void 0,E=void 0,_=f.scrollWidth,I=f.scrollHeight,O=Et(f),k=f.scrollLeft,x=f.scrollTop;f===l?(R=F<_&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),E=C<I&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(R=F<_&&(O.overflowX==="auto"||O.overflowX==="scroll"),E=C<I&&(O.overflowY==="auto"||O.overflowY==="scroll"));var P=R&&(Math.abs(S-o)<=r&&k+F<_)-(Math.abs(b-o)<=r&&!!k),N=E&&(Math.abs(y-s)<=r&&x+C<I)-(Math.abs(m-s)<=r&&!!x);if(!Wn[d])for(var G=0;G<=d;G++)Wn[G]||(Wn[G]={});(Wn[d].vx!=P||Wn[d].vy!=N||Wn[d].el!==f)&&(Wn[d].el=f,Wn[d].vx=P,Wn[d].vy=N,clearInterval(Wn[d].pid),(P!=0||N!=0)&&(c=!0,Wn[d].pid=setInterval((function(){i&&this.layer===0&&Rt.active._onTouchMove(Xp);var ie=Wn[this.layer].vy?Wn[this.layer].vy*a:0,B=Wn[this.layer].vx?Wn[this.layer].vx*a:0;typeof u=="function"&&u.call(Rt.dragged.parentNode[Xi],B,ie,e,Xp,Wn[this.layer].el)!=="continue"||d1(Wn[this.layer].el,B,ie)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=Gr(h,!1)));hw=c}},30),S1=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,s=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var c=i||s;a();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function mw(){}mw.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=bc(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:S1},sr(mw,{pluginName:"revertOnSpill"});function vw(){}vw.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:S1},sr(vw,{pluginName:"removeOnSpill"}),Rt.mount(new o7),Rt.mount(vw,mw);function s7(e,t){return Object.values(e).indexOf(t)}function r7(e,t,n,i){if(!e)return[];const o=Object.values(e),s=t.length-i;return[...t].map((a,l)=>l>=s?o.length:o.indexOf(a))}function a7(e){return["transition-group","TransitionGroup"].includes(e)}function E1(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?a7(t.name):!1}function l7(e,t){return t?{...t.props,...t.attrs}:e}const yw=["Start","Add","Remove","Update","End"],Cw=["Choose","Unchoose","Sort","Filter","Clone"],c7=["Move",...yw,...Cw].map(e=>"on"+e);let ww=null;const u7=lt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...yw.map(e=>e.toLowerCase()),...Cw.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:i}){const o=Z(!1),s=Z(!1),r=Z(0),a=Z(0),l=Z([]),c=Z(null),u=Z(null),d=j(()=>e.list?e.list:e.modelValue),h=Si();function f(){return e.component?UN(e.component):e.tag}function g(ae){if(u.value)for(const Fe in ae){const Me=e1(Fe);c7.indexOf(Me)===-1&&u.value.option(Me,ae[Fe])}}function m(){var ae;return((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.children)||[]}async function y(){var ae;await qt(),l.value=r7(m(),((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.children)||[],o.value,a.value)}function b(ae){const Fe=s7(m()||[],ae);if(Fe===-1)return null;const Me=d.value?d.value[Fe]:null;return{index:Fe,element:Me}}function S(ae){qt(()=>t("change",ae))}function F(ae){if(e.list){ae(e.list);return}const Fe=[...e.modelValue||[]];ae(Fe),t("update:modelValue",Fe)}function C(...ae){F(Me=>Me.splice(...ae))}function R(ae,Fe){F(Je=>Je.splice(Fe,0,Je.splice(ae,1)[0]))}function E(ae){const Fe=l.value,Me=Fe.length;return ae>Me-1?Me:Fe[ae]}function _(){var Fe,Me;return n.default&&((Me=(Fe=n.default()[0])==null?void 0:Fe.component)==null?void 0:Me.proxy)||null}function I(ae){if(!e.noTransitionOnDrag||!o.value)return;const Fe=m();Fe[ae]&&(Fe[ae].data=null);const Me=_();Me&&(Me.children=[],Me.kept=void 0)}function O(ae){y(),c.value=b(ae.item),c.value&&(ae.item._underlying_vm_=e.clone(c.value.element),ww=ae.item)}function k(ae){const Fe=ae.item._underlying_vm_;if(Fe===void 0)return;tw(ae.item);const Me=E(ae.newIndex);C(Me,0,Fe),y(),S({added:{element:Fe,newIndex:Me}})}function x(ae){var Me;if(t1((Me=h==null?void 0:h.proxy)==null?void 0:Me.$el,ae.item,ae.oldIndex),ae.pullMode==="clone"){tw(ae.clone);return}if(!c.value)return;const Fe=c.value.index;C(Fe,1),I(Fe),S({removed:{element:c.value.element,oldIndex:Fe}})}function P(ae){var Je,ft;tw(ae.item),t1(ae.from,ae.item,ae.oldIndex);const Fe=(Je=c.value)==null?void 0:Je.index,Me=E(ae.newIndex);R(Fe,Me),S({moved:{element:(ft=c.value)==null?void 0:ft.element,oldIndex:Fe,newIndex:Me}})}function N(ae,Fe){Object.prototype.hasOwnProperty.call(ae,Fe)&&(ae[Fe]+=r.value)}function G(ae){return ae.__draggable_component__}function ie({to:ae,related:Fe}){const Me=G(ae);if(!Me)return{component:Me};const Je=Me.realList,ft={list:Je,component:Me};if(ae!==Fe&&Je&&Me.getUnderlyingVm){const Mt=Me.getUnderlyingVm(Fe);if(Mt)return Object.assign(Mt,ft)}return ft}function B(ae,Fe){const Me=[...Fe.to.children].filter(Be=>Be.style.display!=="none");if(Me.length===0)return 0;const Je=Me.indexOf(Fe.related),ft=ae.component.getVmIndex(Je);return Me.indexOf(ww)!==-1||!Fe.willInsertAfter?ft:ft+1}const H=()=>{var ft,Mt;const ae={};yw.forEach(Be=>{ae["on"+Be]=$(Be)}),Cw.forEach(Be=>{ae["on"+Be]=X.bind(null,Be)});const Fe=Object.keys(i).reduce((Be,jt)=>(Be[e1(jt)]=i[jt],Be),{}),Me=Object.assign({},Fe,ae,{onMove:(Be,jt)=>ce(Be,jt)});"draggable"in Me||(Me.draggable=">*");const Je=((ft=h==null?void 0:h.proxy)==null?void 0:ft.$el.nodeType)===1?h.proxy.$el:((Mt=h==null?void 0:h.proxy)==null?void 0:Mt.$el.parentElement)||null;Je&&(u.value=new Rt(Je,Me),Je.__draggable_component__=h==null?void 0:h.proxy,y())};function X(ae,Fe){qt(()=>t(ae.toLowerCase(),Fe))}function $(ae){return Fe=>{if(d.value!==null){const Me="onDrag"+ae,Je=De[Me];Je&&Je(Fe)}X(ae,Fe)}}function ce(ae,Fe){const Me=e.move;if(!Me||!d.value)return!0;const Je=ie(ae),ft=c.value,Mt=B(Je,ae);ft&&Object.assign(ft,{futureIndex:Mt});const Be=Object.assign({},ae,{relatedContext:Je,draggedContext:ft});return Me(Be,Fe)}function ue(){y(),ww=null}const De={onDragStart:O,onDragAdd:k,onDragRemove:x,onDragUpdate:P,onDragMove:ce,onDragEnd:ue};return vn(()=>{H()}),e.list!==null&&e.modelValue!==null&&TK.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:s,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:y,updateOptions:g,getChildrenNodes:m,getUnderlyingVm:b,emitChanges:S,alterList:F,spliceList:C,updatePosition:R,getVmIndex:E,getComponent:_,resetTransitionData:I,onDragStart:O,onDragAdd:k,onDragRemove:x,onDragUpdate:P,updateProperty:N,onDragMove:ce,onDragEnd:ue,mounted:H,context:c,sortableInstance:u,getRelatedContextFromMoveEvent:ie,getTargetedComponent:G,computeFutureIndex:B}},render(){const e=this.getTag(),t=l7(this.$attrs,this.componentData);if(typeof e=="string"){const i=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return i?(this.transitionMode=E1(i),kv(e,t,i)):kv(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const i=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=E1(i||[])}return kv(e,t,n)}}),d7=Ct(lt({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed"],setup(e,{emit:t}){const n=Z([]),i=e,o=t,s=Z({}),r=()=>{n.value=i.modelValue.map(l=>({id:l.field,name:l.headerName,...l}))||[],i.modelValue.forEach(l=>{s.value[l.field]={...l}})};ct(()=>i.modelValue,l=>{r()},{immediate:!0}),ct(n,l=>{if(l.length===i.modelValue.length&&!l.every((u,d)=>u.id===i.modelValue[d].field)){const u=l.map(d=>s.value[d.id]);o("changed",u)}});const a=l=>!i.readOnly;return(l,c)=>(K(),Xe(J(u7),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),tag:"transition-group",disabled:i.readOnly,onMove:a,"component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:Se(()=>[(K(!0),Ce(kt,null,Un(n.value,u=>(K(),Ce("div",{key:u.id,class:"fade-item"},[_t(l.$slots,"item",{item:u},()=>[ut(bt(u.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-f4ff0810"]]),bw=Ct(lt({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=yn,i=e,o=Z(!1),s=Z(i.columnStates[String(i.item.field)]||!1),r=t,a=c=>{s.value=c},l=j(()=>{var c,u;return(u=(c=i.item)==null?void 0:c.field)==null?void 0:u.includes("metric")});return ct(()=>s.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(c,u)=>(K(),Ce("div",{key:e.item.field,class:z([c.$style["column-config__item"],{[c.$style.disabled]:e.disabled||i.readOnly}])},[ye(ew,{id:`col-${e.item.field}`,"model-value":s.value,"onUpdate:modelValue":a,disabled:e.disabled},null,8,["id","model-value","disabled"]),ye(gt,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:z(c.$style.handler)},null,8,["color","class"]),nt((K(),Ce("span",{class:z(c.$style["column-config__item-label"])},[ut(bt(e.item.headerName),1)],2)),[[J(n),{content:e.item.headerName}]]),l.value?nt((K(),Ce("div",{key:0,class:z(c.$style.badge),onHover:u[0]||(u[0]=d=>o.value=!0)},[...u[1]||(u[1]=[ut(" M ",-1)])],34)),[[J(n),"Metric"]]):ot("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),h7=Ct(lt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=Z(""),r=Z([]),a=Z({}),{triggerRef:l,popupRef:c,isVisible:u}=Qs({placement:"bottom-end",trigger:"click"}),d=j(()=>r.value.filter(C=>C.pinned==="left"&&C.field&&C.headerName)),h=j(()=>r.value.filter(C=>C.pinned==="right"&&C.field||C.field==="blank")),f=j({get:()=>r.value.filter(C=>!C.pinned&&C.field&&C.field!=="blank"),set:C=>{r.value=[...d.value,...C,...h.value]}}),g=j(()=>{if(!s.value)return{};const C=s.value.toLowerCase();return[...r.value,...f.value].reduce((R,E)=>{var _;return(_=E.headerName)!=null&&_.toLowerCase().includes(C)&&E.field&&(R[E.field]=!0),R},{})}),m=j(()=>i.modelValue),y=()=>{const C={};r.value.forEach(R=>{R.field&&(C[R.field]=!R.hide)}),a.value=C},b=()=>{const C=r.value.map(R=>({...R,hide:R.field?!a.value[R.field]:!1}));o("update:modelValue",C),o("input",C)},S=C=>{const R=[...d.value,...C,...h.value];i.checkboxColumn&&R.unshift(i.checkboxColumn),r.value=R,b()},F=(C,R)=>{!R&&C&&(a.value[C]=!a.value[C],b())};return ct(m,C=>{C&&C.length>0&&(r.value=[...C],y())},{immediate:!0}),(C,R)=>(K(),Ce("div",{class:z(C.$style["table-customization"])},[we("div",{ref_key:"triggerRef",ref:l},[_t(C.$slots,"trigger",{},()=>[nt((K(),Xe(pt,{variant:["secondary"],disabled:i.disabled,actived:J(u)},{prefix:Se(()=>[ye(gt,{src:"Gear"})]),default:Se(()=>[R[1]||(R[1]=ut(" Customise ",-1))]),_:1},8,["disabled","actived"])),[[J(n),"Customise table columns"]])])],512),we("div",{ref_key:"popupRef",ref:c,class:z(C.$style["tippy-content-wrapper"])},[we("div",{class:z(C.$style["column-config"])},[ye(KC,{modelValue:s.value,"onUpdate:modelValue":R[0]||(R[0]=E=>s.value=E)},null,8,["modelValue"]),we("div",{class:z(C.$style["column-config__header"])},[...R[2]||(R[2]=[we("label",null,"Manage columns",-1)])],2),Object.entries(g.value).length===0&&s.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["no-columns"])},[...R[3]||(R[3]=[ut(" No results. ",-1),we("br",null,null,-1),ut(" Try another search. ",-1)])],2)):ot("",!0),we("div",{class:z(C.$style["column-config__list"])},[d.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(kt,null,Un(d.value,E=>nt((K(),Xe(bw,{key:E.field,item:E,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[as,g.value[E.field]||!s.value]])),128))],2)):ot("",!0),ye(d7,{"model-value":f.value,"group-name":"columns",onChanged:S,disabled:i.disabled,readOnly:i.readOnly},{item:Se(({item:E})=>[nt((K(),Xe(bw,{key:E.id,item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:F},null,8,["item","columnStates","disabled","readOnly"])),[[as,g.value[E.field]||!s.value]])]),_:1},8,["model-value","disabled","readOnly"]),h.value.length>0?(K(),Ce("div",{key:1,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(kt,null,Un(h.value.filter(E=>{var _;return E.headerName&&((_=E.headerName)==null?void 0:_.length)>0}),E=>nt((K(),Xe(bw,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[as,g.value[E.field]||!s.value]])),128))],2)):ot("",!0)],2),we("div",{class:z(C.$style["column-config__footer"])},[ye(pt,{type:"button",variant:"secondary",disabled:!0},{default:Se(()=>[...R[4]||(R[4]=[we("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),f7={class:"wrapper-suffix"},p7=Ct(lt({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const i=yn,o={PER_PAGE:20,INITIAL_PAGE:1},s=e,r=Z(s.modelValue),a=n,l=j(()=>f.value.find(x=>x.id===r.value)||null),c=x=>{r.value=x.id,a("update:modelValue",x.id)},u=j(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const x=f.value.find(N=>N.id===r.value),P=String((x==null?void 0:x.color)||"white");return{backgroundColor:P,border:gy(P,"white")?"1px solid #ccc":"1px solid #fff"}}),d=Z(null),h=()=>{var x;(x=d.value)==null||x.focus()},f=Z([]),g=Z(!1),m=Z(!1),y=Z(null),b=Z(o.INITIAL_PAGE),S=Z(!0),F=Z(0),C=Z(""),R=j(()=>!!(s.id&&s.workspaceId)),E=x=>{const P=f.value.find(N=>N.id===x.value);P&&c(P)},_=x=>({label:x.name,value:x.id,selected:r.value===x.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:x,id:x.id,color:x.color}),I=async(x=o.INITIAL_PAGE,P="",N=!1)=>{var G;if(!R.value){console.error("Missing required props",s);return}N?m.value=!0:g.value=!0,y.value=null;try{const ie={workspaceId:String(s.workspaceId),itemIds:s.id,page:x,perPage:o.PER_PAGE,name_like:P.trim()};if(s.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const B=await s.getStatusFunc(ie);if(!B){N||(f.value=[]),S.value=!1;return}const H=B.data.map(_);f.value=N?[...f.value,...H]:H,F.value=((G=B.meta)==null?void 0:G.total)??B.data.length,S.value=f.value.length<F.value,b.value=x}catch(ie){console.error("Error fetching statuses:",ie),y.value="Failed to load statuses",N||(f.value=[]),S.value=!1,a("error",y.value)}finally{g.value=!1,m.value=!1}},O=async()=>{!S.value||m.value||await I(b.value+1,C.value,!0)};ct([()=>s.id,()=>s.workspaceId],()=>{I()},{deep:!0,immediate:!0});const k=async x=>{C.value=x,b.value=o.INITIAL_PAGE,await I(o.INITIAL_PAGE,x,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(x,P)=>(K(),Xe(UP,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:Se(({open:N})=>[ye(or,{actived:N,class:z(x.$style["status-wrapper"])},{suffix:Se(()=>[we("div",f7,[ye(gt,{src:"ChevronUp",source:"remote",class:z([[x.$style["dropdown-icon"]],{[x.$style["dropdown-icon-show"]]:!N}])},null,8,["class"])])]),default:Se(()=>{var G;return[we("div",{class:z(x.$style.status)},[we("div",{class:z(x.$style["color-indicator"]),style:mn(u.value)},null,6),nt((K(),Ce("span",{style:{"max-width":"400px"},class:z({[x.$style.empty]:!l.value})},[ut(bt(l.value?l.value.label:"Select status"),1)],2)),[[J(i),{content:((G=l.value)==null?void 0:G.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:Se(({closeDropdown:N})=>{var G;return[ye(qC,{ref_key:"popupRef",ref:d,"selected-id":(G=l.value)==null?void 0:G.id,options:f.value,loading:g.value,"loading-more":m.value,"has-more":S.value,error:y.value,onSearch:k,onSelect:ie=>{E(ie),N()},onLoadMore:O,onCancel:P[0]||(P[0]=ie=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_fb8p7_1",status:"_status_fb8p7_1","color-indicator":"_color-indicator_fb8p7_12",empty:"_empty_fb8p7_21","dropdown-icon":"_dropdown-icon_fb8p7_25","dropdown-icon-show":"_dropdown-icon-show_fb8p7_30",options:"_options_fb8p7_34"}}]]),g7=Ct(lt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=j(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=j(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(s,r)=>(K(),Ce("div",{class:z(s.$style["no-data-item-table"])},[we("div",{class:z(s.$style.visual)},[ye(kp,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),we("div",{class:z(s.$style.description)},bt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),R1=Ap("sortStore",()=>{const e=Z({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=j(()=>{const a=e.value;return Object.values(a).filter(c=>c.sort!=="none"&&!!c.sort).map(c=>{let u;switch(c.colId){case"dateRange":u=n[c.sort];break;default:if(c.colId.includes("metric")){const[d,h]=c.colId.split("_");u={column:d,direction:c.sort,type:h}}else u={column:t[c.colId]||c.colId,direction:c.sort};break}return u})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},s=()=>{e.value={}},r=Z(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:o,clearSorting:s,isSortingRunning:r}}),Qa=lt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=R1(),{sorts:i}=nr(n),o=j(()=>{var l,c;return((c=(l=t.params)==null?void 0:l.column)==null?void 0:c.getColId())||"template_col_id"}),s=l=>{o.value&&n.setSort(o.value,l)},r=j(()=>t.params.headerType||void 0),a=Z("none");return ct(()=>i.value,Ho(()=>{if(o.value){const l=i.value[o.value];a.value=l?l.sort:"none"}},200),{deep:!0,immediate:!0}),(l,c)=>o.value?(K(),Xe(wK,xn({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=u=>a.value=u),onSortChanged:s}),null,16,["header-type","modelValue"])):ot("",!0)}});function m7(){const e=Ao({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const o=e.name.trim();o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const v7=Ct(lt({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=cE("target"),o=cE("newSceneInputRef");qP(i,f=>r());const s=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,c()},{newItemData:a,validateNewItem:l,resetNewItemForm:c,closeNewItemForm:u}=m7(),d=n,h=f=>{d("create-new-item",f)};return ct(()=>a.isCreating,f=>{f&&qt(()=>{o.value&&o.value.focus()})}),t({show:s,hide:r}),(f,g)=>nt((K(),Ce("div",{class:z(f.$style.newRow),ref_key:"target",ref:i},[ye(GP,{ref_key:"newSceneInputRef",ref:o,modelValue:J(a).name,"onUpdate:modelValue":g[0]||(g[0]=m=>J(a).name=m),onChange:J(l),onEnter:g[1]||(g[1]=m=>h(J(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Se(()=>[J(a).name.length==0?(K(),Xe(gt,{key:0,src:"Pen",color:"#f7941d"})):ot("",!0)]),_:1},8,["modelValue","onChange"]),ye(pt,{onClick:g[2]||(g[2]=m=>h(J(a).name)),disabled:!!J(a).error||!J(a).name.trim()},{prefix:Se(()=>[ye(gt,{src:"Plus"})]),default:Se(()=>[g[3]||(g[3]=ut(" Create ",-1))]),_:1},8,["disabled"]),ye(pt,{variant:["secondary","icon"],onClick:J(u)},{prefix:Se(()=>[ye(gt,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[as,J(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),y7=["innerHTML"],C7=["accept"],D1=Ct(lt({__name:"FileUploader",props:{modelValue:{},acceptTypes:{default:()=>["xlsx","xls","csv"]}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Z(null),o=I=>`<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="none">
|
|
96
|
+
*/function n1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n1(Object(n),!0).forEach(function(i){AK(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Vp(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vp=function(t){return typeof t}:Vp=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vp(e)}function AK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(){return sr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},sr.apply(this,arguments)}function kK(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,s;for(s=0;s<i.length;s++)o=i[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function OK(e,t){if(e==null)return{};var n=kK(e,t),i,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var MK="1.14.0";function rr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ar=rr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Sd=rr(/Edge/i),i1=rr(/firefox/i),Ed=rr(/safari/i)&&!rr(/chrome/i)&&!rr(/android/i),o1=rr(/iP(ad|od|hone)/i),LK=rr(/chrome/i)&&rr(/android/i),s1={capture:!1,passive:!1};function Zt(e,t,n){e.addEventListener(t,n,!ar&&s1)}function zt(e,t,n){e.removeEventListener(t,n,!ar&&s1)}function Bp(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function NK(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function vs(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Bp(e,t):Bp(e,t))||i&&e===n)return e;if(e===n)break}while(e=NK(e))}return null}var r1=/\s+/g;function Zi(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(r1," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(r1," ")}}function Et(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function wc(e,t){var n="";if(typeof e=="string")n=e;else do{var i=Et(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function a1(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,s=i.length;if(n)for(;o<s;o++)n(i[o],o);return i}return[]}function ys(){var e=document.scrollingElement;return e||document.documentElement}function Kn(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var s,r,a,l,c,u,d;if(e!==window&&e.parentNode&&e!==ys()?(s=e.getBoundingClientRect(),r=s.top,a=s.left,l=s.bottom,c=s.right,u=s.height,d=s.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!ar))do if(o&&o.getBoundingClientRect&&(Et(o,"transform")!=="none"||n&&Et(o,"position")!=="static")){var h=o.getBoundingClientRect();r-=h.top+parseInt(Et(o,"border-top-width")),a-=h.left+parseInt(Et(o,"border-left-width")),l=r+s.height,c=a+s.width;break}while(o=o.parentNode);if(i&&e!==window){var f=wc(o||e),g=f&&f.a,m=f&&f.d;f&&(r/=m,a/=g,d/=g,u/=m,l=r+u,c=a+d)}return{top:r,left:a,bottom:l,right:c,width:d,height:u}}}function l1(e,t,n){for(var i=Gr(e,!0),o=Kn(e)[t];i;){var s=Kn(i)[n],r=void 0;if(r=o>=s,!r)return i;if(i===ys())break;i=Gr(i,!1)}return!1}function bc(e,t,n,i){for(var o=0,s=0,r=e.children;s<r.length;){if(r[s].style.display!=="none"&&r[s]!==Rt.ghost&&(i||r[s]!==Rt.dragged)&&vs(r[s],n.draggable,e,!1)){if(o===t)return r[s];o++}s++}return null}function nw(e,t){for(var n=e.lastElementChild;n&&(n===Rt.ghost||Et(n,"display")==="none"||t&&!Bp(n,t));)n=n.previousElementSibling;return n||null}function Co(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Rt.clone&&(!t||Bp(e,t))&&n++;return n}function c1(e){var t=0,n=0,i=ys();if(e)do{var o=wc(e),s=o.a,r=o.d;t+=e.scrollLeft*s,n+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,n]}function VK(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function Gr(e,t){if(!e||!e.getBoundingClientRect)return ys();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Et(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ys();if(i||t)return n;i=!0}}while(n=n.parentNode);return ys()}function BK(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function iw(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Rd;function u1(e,t){return function(){if(!Rd){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),Rd=setTimeout(function(){Rd=void 0},t)}}}function HK(){clearTimeout(Rd),Rd=void 0}function d1(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function h1(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var Xi="Sortable"+new Date().getTime();function GK(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(Et(o,"display")==="none"||o===Rt.ghost)){e.push({target:o,rect:Kn(o)});var s=ms({},e[e.length-1].rect);if(o.thisAnimationDuration){var r=wc(o,!0);r&&(s.top-=r.f,s.left-=r.e)}o.fromRect=s}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(VK(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,r=0;e.forEach(function(a){var l=0,c=a.target,u=c.fromRect,d=Kn(c),h=c.prevFromRect,f=c.prevToRect,g=a.rect,m=wc(c,!0);m&&(d.top-=m.f,d.left-=m.e),c.toRect=d,c.thisAnimationDuration&&iw(h,d)&&!iw(u,d)&&(g.top-d.top)/(g.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(l=WK(g,h,f,o.options)),iw(d,u)||(c.prevFromRect=u,c.prevToRect=d,l||(l=o.options.animation),o.animate(c,g,d,l)),l&&(s=!0,r=Math.max(r,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},r):typeof i=="function"&&i(),e=[]},animate:function(i,o,s,r){if(r){Et(i,"transition",""),Et(i,"transform","");var a=wc(this.el),l=a&&a.a,c=a&&a.d,u=(o.left-s.left)/(l||1),d=(o.top-s.top)/(c||1);i.animatingX=!!u,i.animatingY=!!d,Et(i,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=$K(i),Et(i,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Et(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Et(i,"transition",""),Et(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},r)}}}}function $K(e){return e.offsetWidth}function WK(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Sc=[],ow={initializeByDefault:!0},Dd={mount:function(t){for(var n in ow)ow.hasOwnProperty(n)&&!(n in t)&&(t[n]=ow[n]);Sc.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Sc.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var s=t+"Global";Sc.forEach(function(r){n[r.pluginName]&&(n[r.pluginName][s]&&n[r.pluginName][s](ms({sortable:n},i)),n.options[r.pluginName]&&n[r.pluginName][t]&&n[r.pluginName][t](ms({sortable:n},i)))})},initializePlugins:function(t,n,i,o){Sc.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,n,t.options);c.sortable=t,c.options=t.options,t[l]=c,sr(i,c.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var r=this.modifyOption(t,s,t.options[s]);typeof r<"u"&&(t.options[s]=r)}},getEventProperties:function(t,n){var i={};return Sc.forEach(function(o){typeof o.eventProperties=="function"&&sr(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return Sc.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[n]=="function"&&(o=s.optionListeners[n].call(t[s.pluginName],i))}),o}};function zK(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,s=e.cloneEl,r=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Xi],!!t){var m,y=t.options,b="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ar&&!Sd?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=r||n,m.from=a||n,m.item=o||n,m.clone=s,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var S=ms(ms({},g),Dd.getEventProperties(i,t));for(var F in S)m[F]=S[F];n&&n.dispatchEvent(m),y[b]&&y[b].call(t,m)}}var UK=["evt"],ki=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,s=OK(i,UK);Dd.pluginEvent.bind(Rt)(t,n,ms({dragEl:Ye,parentEl:Pn,ghostEl:Pt,rootEl:Cn,nextEl:Za,lastDownEl:Hp,cloneEl:In,cloneHidden:$r,dragStarted:xd,putSortable:ni,activeSortable:Rt.active,originalEvent:o,oldIndex:Ec,oldDraggableIndex:_d,newIndex:Ji,newDraggableIndex:Wr,hideGhostForTarget:C1,unhideGhostForTarget:w1,cloneNowHidden:function(){$r=!0},cloneNowShown:function(){$r=!1},dispatchSortableEvent:function(a){Di({sortable:n,name:a,originalEvent:o})}},s))};function Di(e){zK(ms({putSortable:ni,cloneEl:In,targetEl:Ye,rootEl:Cn,oldIndex:Ec,oldDraggableIndex:_d,newIndex:Ji,newDraggableIndex:Wr},e))}var Ye,Pn,Pt,Cn,Za,Hp,In,$r,Ec,Ji,_d,Wr,Gp,ni,Rc=!1,$p=!1,Wp=[],Xa,jo,sw,rw,f1,p1,xd,Dc,Fd,Td=!1,zp=!1,Up,hi,aw=[],lw=!1,jp=[],Kp=typeof document<"u",qp=o1,g1=Sd||ar?"cssFloat":"float",jK=Kp&&!LK&&!o1&&"draggable"in document.createElement("div"),m1=function(){if(Kp){if(ar)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),v1=function(t,n){var i=Et(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=bc(t,0,n),r=bc(t,1,n),a=s&&Et(s),l=r&&Et(r),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Kn(s).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Kn(r).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=o&&i[g1]==="none"||r&&i[g1]==="none"&&c+u>o)?"vertical":"horizontal"},KK=function(t,n,i){var o=i?t.left:t.top,s=i?t.right:t.bottom,r=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,c=i?n.width:n.height;return o===a||s===l||o+r/2===a+c/2},qK=function(t,n){var i;return Wp.some(function(o){var s=o[Xi].options.emptyInsertThreshold;if(!(!s||nw(o))){var r=Kn(o),a=t>=r.left-s&&t<=r.right+s,l=n>=r.top-s&&n<=r.bottom+s;if(a&&l)return i=o}}),i},y1=function(t){function n(s,r){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(r||d))return!0;if(s==null||s===!1)return!1;if(r&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,c,u),r)(a,l,c,u);var h=(r?a:l).options.group.name;return s===!0||typeof s=="string"&&s===h||s.join&&s.indexOf(h)>-1}}var i={},o=t.group;(!o||Vp(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},C1=function(){!m1&&Pt&&Et(Pt,"display","none")},w1=function(){!m1&&Pt&&Et(Pt,"display","")};Kp&&document.addEventListener("click",function(e){if($p)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),$p=!1,!1},!0);var Ja=function(t){if(Ye){t=t.touches?t.touches[0]:t;var n=qK(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Xi]._onDragOver(i)}}},YK=function(t){Ye&&Ye.parentNode[Xi]._isOutsideThisEl(t.target)};function Rt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=sr({},t),e[Xi]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return v1(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,a){r.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Rt.supportPointer!==!1&&"PointerEvent"in window&&!Ed,emptyInsertThreshold:5};Dd.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);y1(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:jK,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Zt(e,"pointerdown",this._onTapStart):(Zt(e,"mousedown",this._onTapStart),Zt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Zt(e,"dragover",this),Zt(e,"dragenter",this)),Wp.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),sr(this,GK())}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Dc=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ye):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,s=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=o.filter;if(i7(i),!Ye&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Ed&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=vs(l,o.draggable,i,!1),!(l&&l.animated)&&Hp!==l)){if(Ec=Co(l),_d=Co(l,o.draggable),typeof u=="function"){if(u.call(this,t,l,this)){Di({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),ki("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=vs(c,d.trim(),i,!1),d)return Di({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),ki("filter",n,{evt:t}),!0}),u)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!vs(c,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,s=o.el,r=o.options,a=s.ownerDocument,l;if(i&&!Ye&&i.parentNode===s){var c=Kn(i);if(Cn=s,Ye=i,Pn=Ye.parentNode,Za=Ye.nextSibling,Hp=i,Gp=r.group,Rt.dragged=Ye,Xa={target:Ye,clientX:(n||t).clientX,clientY:(n||t).clientY},f1=Xa.clientX-c.left,p1=Xa.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ye.style["will-change"]="all",l=function(){if(ki("delayEnded",o,{evt:t}),Rt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!i1&&o.nativeDraggable&&(Ye.draggable=!0),o._triggerDragStart(t,n),Di({sortable:o,name:"choose",originalEvent:t}),Zi(Ye,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){a1(Ye,u.trim(),cw)}),Zt(a,"dragover",Ja),Zt(a,"mousemove",Ja),Zt(a,"touchmove",Ja),Zt(a,"mouseup",o._onDrop),Zt(a,"touchend",o._onDrop),Zt(a,"touchcancel",o._onDrop),i1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ye.draggable=!0),ki("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Sd||ar))){if(Rt.eventCanceled){this._onDrop();return}Zt(a,"mouseup",o._disableDelayedDrag),Zt(a,"touchend",o._disableDelayedDrag),Zt(a,"touchcancel",o._disableDelayedDrag),Zt(a,"mousemove",o._delayedDragTouchMoveHandler),Zt(a,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&Zt(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ye&&cw(Ye),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;zt(t,"mouseup",this._disableDelayedDrag),zt(t,"touchend",this._disableDelayedDrag),zt(t,"touchcancel",this._disableDelayedDrag),zt(t,"mousemove",this._delayedDragTouchMoveHandler),zt(t,"touchmove",this._delayedDragTouchMoveHandler),zt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Zt(document,"pointermove",this._onTouchMove):n?Zt(document,"touchmove",this._onTouchMove):Zt(document,"mousemove",this._onTouchMove):(Zt(Ye,"dragend",this),Zt(Cn,"dragstart",this._onDragStart));try{document.selection?Zp(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Rc=!1,Cn&&Ye){ki("dragStarted",this,{evt:n}),this.nativeDraggable&&Zt(document,"dragover",YK);var i=this.options;!t&&Zi(Ye,i.dragClass,!1),Zi(Ye,i.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),Di({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(jo){this._lastX=jo.clientX,this._lastY=jo.clientY,C1();for(var t=document.elementFromPoint(jo.clientX,jo.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(jo.clientX,jo.clientY),t!==n);)n=t;if(Ye.parentNode[Xi]._isOutsideThisEl(t),n)do{if(n[Xi]){var i=void 0;if(i=n[Xi]._onDragOver({clientX:jo.clientX,clientY:jo.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);w1()}},_onTouchMove:function(t){if(Xa){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,r=Pt&&wc(Pt,!0),a=Pt&&r&&r.a,l=Pt&&r&&r.d,c=qp&&hi&&c1(hi),u=(s.clientX-Xa.clientX+o.x)/(a||1)+(c?c[0]-aw[0]:0)/(a||1),d=(s.clientY-Xa.clientY+o.y)/(l||1)+(c?c[1]-aw[1]:0)/(l||1);if(!Rt.active&&!Rc){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Pt){r?(r.e+=u-(sw||0),r.f+=d-(rw||0)):r={a:1,b:0,c:0,d:1,e:u,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Et(Pt,"webkitTransform",h),Et(Pt,"mozTransform",h),Et(Pt,"msTransform",h),Et(Pt,"transform",h),sw=u,rw=d,jo=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pt){var t=this.options.fallbackOnBody?document.body:Cn,n=Kn(Ye,!0,qp,!0,t),i=this.options;if(qp){for(hi=t;Et(hi,"position")==="static"&&Et(hi,"transform")==="none"&&hi!==document;)hi=hi.parentNode;hi!==document.body&&hi!==document.documentElement?(hi===document&&(hi=ys()),n.top+=hi.scrollTop,n.left+=hi.scrollLeft):hi=ys(),aw=c1(hi)}Pt=Ye.cloneNode(!0),Zi(Pt,i.ghostClass,!1),Zi(Pt,i.fallbackClass,!0),Zi(Pt,i.dragClass,!0),Et(Pt,"transition",""),Et(Pt,"transform",""),Et(Pt,"box-sizing","border-box"),Et(Pt,"margin",0),Et(Pt,"top",n.top),Et(Pt,"left",n.left),Et(Pt,"width",n.width),Et(Pt,"height",n.height),Et(Pt,"opacity","0.8"),Et(Pt,"position",qp?"absolute":"fixed"),Et(Pt,"zIndex","100000"),Et(Pt,"pointerEvents","none"),Rt.ghost=Pt,t.appendChild(Pt),Et(Pt,"transform-origin",f1/parseInt(Pt.style.width)*100+"% "+p1/parseInt(Pt.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,s=i.options;if(ki("dragStart",this,{evt:t}),Rt.eventCanceled){this._onDrop();return}ki("setupClone",this),Rt.eventCanceled||(In=h1(Ye),In.draggable=!1,In.style["will-change"]="",this._hideClone(),Zi(In,this.options.chosenClass,!1),Rt.clone=In),i.cloneId=Zp(function(){ki("clone",i),!Rt.eventCanceled&&(i.options.removeCloneOnHide||Cn.insertBefore(In,Ye),i._hideClone(),Di({sortable:i,name:"clone"}))}),!n&&Zi(Ye,s.dragClass,!0),n?($p=!0,i._loopId=setInterval(i._emulateDragOver,50)):(zt(document,"mouseup",i._onDrop),zt(document,"touchend",i._onDrop),zt(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(i,o,Ye)),Zt(document,"drop",i),Et(Ye,"transform","translateZ(0)")),Rc=!0,i._dragStartId=Zp(i._dragStarted.bind(i,n,t)),Zt(document,"selectstart",i),xd=!0,Ed&&Et(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,s,r,a=this.options,l=a.group,c=Rt.active,u=Gp===l,d=a.sort,h=ni||c,f,g=this,m=!1;if(lw)return;function y(X,$){ki(X,g,ms({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:r,dragRect:o,targetRect:s,canSort:d,fromSortable:h,target:i,completed:S,onMove:function(ue,De){return Yp(Cn,n,Ye,o,ue,Kn(ue),t,De)},changed:F},$))}function b(){y("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function S(X){return y("dragOverCompleted",{insertion:X}),X&&(u?c._hideClone():c._showClone(g),g!==h&&(Zi(Ye,ni?ni.options.ghostClass:c.options.ghostClass,!1),Zi(Ye,a.ghostClass,!0)),ni!==g&&g!==Rt.active?ni=g:g===Rt.active&&ni&&(ni=null),h===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){y("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===Ye&&!Ye.animated||i===n&&!i.animated)&&(Dc=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(Ye.parentNode[Xi]._isOutsideThisEl(t.target),!X&&Ja(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function F(){Ji=Co(Ye),Wr=Co(Ye,a.draggable),Di({sortable:g,name:"change",toEl:n,newIndex:Ji,newDraggableIndex:Wr,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=vs(i,a.draggable,n,!0),y("dragOver"),Rt.eventCanceled)return m;if(Ye.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return S(!1);if($p=!1,c&&!a.disabled&&(u?d||(r=Pn!==Cn):ni===this||(this.lastPutMode=Gp.checkPull(this,c,Ye,t))&&l.checkPut(this,c,Ye,t))){if(f=this._getDirection(t,i)==="vertical",o=Kn(Ye),y("dragOverValid"),Rt.eventCanceled)return m;if(r)return Pn=Cn,b(),this._hideClone(),y("revert"),Rt.eventCanceled||(Za?Cn.insertBefore(Ye,Za):Cn.appendChild(Ye)),S(!0);var C=nw(n,a.draggable);if(!C||QK(t,f,this)&&!C.animated){if(C===Ye)return S(!1);if(C&&n===t.target&&(i=C),i&&(s=Kn(i)),Yp(Cn,n,Ye,o,i,s,t,!!i)!==!1)return b(),n.appendChild(Ye),Pn=n,F(),S(!0)}else if(C&&JK(t,f,this)){var R=bc(n,0,a,!0);if(R===Ye)return S(!1);if(i=R,s=Kn(i),Yp(Cn,n,Ye,o,i,s,t,!1)!==!1)return b(),n.insertBefore(Ye,R),Pn=n,F(),S(!0)}else if(i.parentNode===n){s=Kn(i);var E=0,_,I=Ye.parentNode!==n,O=!KK(Ye.animated&&Ye.toRect||o,i.animated&&i.toRect||s,f),k=f?"top":"left",x=l1(i,"top","top")||l1(Ye,"top","top"),P=x?x.scrollTop:void 0;Dc!==i&&(_=s[k],Td=!1,zp=!O&&a.invertSwap||I),E=e7(t,i,s,f,O?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,zp,Dc===i);var N;if(E!==0){var G=Co(Ye);do G-=E,N=Pn.children[G];while(N&&(Et(N,"display")==="none"||N===Pt))}if(E===0||N===i)return S(!1);Dc=i,Fd=E;var ie=i.nextElementSibling,B=!1;B=E===1;var H=Yp(Cn,n,Ye,o,i,s,t,B);if(H!==!1)return(H===1||H===-1)&&(B=H===1),lw=!0,setTimeout(XK,30),b(),B&&!ie?n.appendChild(Ye):i.parentNode.insertBefore(Ye,B?ie:i),x&&d1(x,0,P-x.scrollTop),Pn=Ye.parentNode,_!==void 0&&!zp&&(Up=Math.abs(_-Kn(i)[k])),F(),S(!0)}if(n.contains(Ye))return S(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){zt(document,"mousemove",this._onTouchMove),zt(document,"touchmove",this._onTouchMove),zt(document,"pointermove",this._onTouchMove),zt(document,"dragover",Ja),zt(document,"mousemove",Ja),zt(document,"touchmove",Ja)},_offUpEvents:function(){var t=this.el.ownerDocument;zt(t,"mouseup",this._onDrop),zt(t,"touchend",this._onDrop),zt(t,"pointerup",this._onDrop),zt(t,"touchcancel",this._onDrop),zt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(Ji=Co(Ye),Wr=Co(Ye,i.draggable),ki("drop",this,{evt:t}),Pn=Ye&&Ye.parentNode,Ji=Co(Ye),Wr=Co(Ye,i.draggable),Rt.eventCanceled){this._nulling();return}Rc=!1,zp=!1,Td=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uw(this.cloneId),uw(this._dragStartId),this.nativeDraggable&&(zt(document,"drop",this),zt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ed&&Et(document.body,"user-select",""),Et(Ye,"transform",""),t&&(xd&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Pt&&Pt.parentNode&&Pt.parentNode.removeChild(Pt),(Cn===Pn||ni&&ni.lastPutMode!=="clone")&&In&&In.parentNode&&In.parentNode.removeChild(In),Ye&&(this.nativeDraggable&&zt(Ye,"dragend",this),cw(Ye),Ye.style["will-change"]="",xd&&!Rc&&Zi(Ye,ni?ni.options.ghostClass:this.options.ghostClass,!1),Zi(Ye,this.options.chosenClass,!1),Di({sortable:this,name:"unchoose",toEl:Pn,newIndex:null,newDraggableIndex:null,originalEvent:t}),Cn!==Pn?(Ji>=0&&(Di({rootEl:Pn,name:"add",toEl:Pn,fromEl:Cn,originalEvent:t}),Di({sortable:this,name:"remove",toEl:Pn,originalEvent:t}),Di({rootEl:Pn,name:"sort",toEl:Pn,fromEl:Cn,originalEvent:t}),Di({sortable:this,name:"sort",toEl:Pn,originalEvent:t})),ni&&ni.save()):Ji!==Ec&&Ji>=0&&(Di({sortable:this,name:"update",toEl:Pn,originalEvent:t}),Di({sortable:this,name:"sort",toEl:Pn,originalEvent:t})),Rt.active&&((Ji==null||Ji===-1)&&(Ji=Ec,Wr=_d),Di({sortable:this,name:"end",toEl:Pn,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ki("nulling",this),Cn=Ye=Pn=Pt=Za=In=Hp=$r=Xa=jo=xd=Ji=Wr=Ec=_d=Dc=Fd=ni=Gp=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,jp.forEach(function(t){t.checked=!0}),jp.length=sw=rw=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ye&&(this._onDragOver(t),ZK(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,s=i.length,r=this.options;o<s;o++)n=i[o],vs(n,r.draggable,this.el,!1)&&t.push(n.getAttribute(r.dataIdAttr)||n7(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(s,r){var a=o.children[r];vs(a,this.options.draggable,o,!1)&&(i[s]=a)},this),n&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(o.removeChild(i[s]),o.appendChild(i[s]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return vs(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=Dd.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&y1(i)},destroy:function(){ki("destroy",this);var t=this.el;t[Xi]=null,zt(t,"mousedown",this._onTapStart),zt(t,"touchstart",this._onTapStart),zt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(zt(t,"dragover",this),zt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Wp.splice(Wp.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!$r){if(ki("hideClone",this),Rt.eventCanceled)return;Et(In,"display","none"),this.options.removeCloneOnHide&&In.parentNode&&In.parentNode.removeChild(In),$r=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if($r){if(ki("showClone",this),Rt.eventCanceled)return;Ye.parentNode==Cn&&!this.options.group.revertClone?Cn.insertBefore(In,Ye):Za?Cn.insertBefore(In,Za):Cn.appendChild(In),this.options.group.revertClone&&this.animate(Ye,In),Et(In,"display",""),$r=!1}}};function ZK(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Yp(e,t,n,i,o,s,r,a){var l,c=e[Xi],u=c.options.onMove,d;return window.CustomEvent&&!ar&&!Sd?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=s||Kn(t),l.willInsertAfter=a,l.originalEvent=r,e.dispatchEvent(l),u&&(d=u.call(c,l,r)),d}function cw(e){e.draggable=!1}function XK(){lw=!1}function JK(e,t,n){var i=Kn(bc(n.el,0,n.options,!0)),o=10;return t?e.clientX<i.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-o||e.clientY<i.bottom&&e.clientX<i.left}function QK(e,t,n){var i=Kn(nw(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function e7(e,t,n,i,o,s,r,a){var l=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!r){if(a&&Up<c*o){if(!Td&&(Fd===1?l>u+c*s/2:l<d-c*s/2)&&(Td=!0),Td)h=!0;else if(Fd===1?l<u+Up:l>d-Up)return-Fd}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return t7(t)}return h=h||r,h&&(l<u+c*s/2||l>d-c*s/2)?l>u+c/2?1:-1:0}function t7(e){return Co(Ye)<Co(e)?1:-1}function n7(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function i7(e){jp.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&jp.push(i)}}function Zp(e){return setTimeout(e,0)}function uw(e){return clearTimeout(e)}Kp&&Zt(document,"touchmove",function(e){(Rt.active||Rc)&&e.cancelable&&e.preventDefault()}),Rt.utils={on:Zt,off:zt,css:Et,find:a1,is:function(t,n){return!!vs(t,n,t,!1)},extend:BK,throttle:u1,closest:vs,toggleClass:Zi,clone:h1,index:Co,nextTick:Zp,cancelNextTick:uw,detectDirection:v1,getChild:bc},Rt.get=function(e){return e[Xi]},Rt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Rt.utils=ms(ms({},Rt.utils),i.utils)),Dd.mount(i)})},Rt.create=function(e,t){return new Rt(e,t)},Rt.version=MK;var Wn=[],Pd,dw,hw=!1,fw,pw,Xp,Id;function o7(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?Zt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Zt(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Zt(document,"touchmove",this._handleFallbackAutoScroll):Zt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?zt(document,"dragover",this._handleAutoScroll):(zt(document,"pointermove",this._handleFallbackAutoScroll),zt(document,"touchmove",this._handleFallbackAutoScroll),zt(document,"mousemove",this._handleFallbackAutoScroll)),b1(),Jp(),HK()},nulling:function(){Xp=dw=Pd=hw=Id=fw=pw=null,Wn.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,s=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(s,r);if(Xp=n,i||this.options.forceAutoScrollFallback||Sd||ar||Ed){gw(n,this.options,a,i);var l=Gr(a,!0);hw&&(!Id||s!==fw||r!==pw)&&(Id&&b1(),Id=setInterval(function(){var c=Gr(document.elementFromPoint(s,r),!0);c!==l&&(l=c,Jp()),gw(n,o.options,c,i)},10),fw=s,pw=r)}else{if(!this.options.bubbleScroll||Gr(a,!0)===ys()){Jp();return}gw(n,this.options,Gr(a,!1),!1)}}},sr(e,{pluginName:"scroll",initializeByDefault:!0})}function Jp(){Wn.forEach(function(e){clearInterval(e.pid)}),Wn=[]}function b1(){clearInterval(Id)}var gw=u1(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,a=t.scrollSpeed,l=ys(),c=!1,u;dw!==n&&(dw=n,Jp(),Pd=t.scroll,u=t.scrollFn,Pd===!0&&(Pd=Gr(n,!0)));var d=0,h=Pd;do{var f=h,g=Kn(f),m=g.top,y=g.bottom,b=g.left,S=g.right,F=g.width,C=g.height,R=void 0,E=void 0,_=f.scrollWidth,I=f.scrollHeight,O=Et(f),k=f.scrollLeft,x=f.scrollTop;f===l?(R=F<_&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible"),E=C<I&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")):(R=F<_&&(O.overflowX==="auto"||O.overflowX==="scroll"),E=C<I&&(O.overflowY==="auto"||O.overflowY==="scroll"));var P=R&&(Math.abs(S-o)<=r&&k+F<_)-(Math.abs(b-o)<=r&&!!k),N=E&&(Math.abs(y-s)<=r&&x+C<I)-(Math.abs(m-s)<=r&&!!x);if(!Wn[d])for(var G=0;G<=d;G++)Wn[G]||(Wn[G]={});(Wn[d].vx!=P||Wn[d].vy!=N||Wn[d].el!==f)&&(Wn[d].el=f,Wn[d].vx=P,Wn[d].vy=N,clearInterval(Wn[d].pid),(P!=0||N!=0)&&(c=!0,Wn[d].pid=setInterval((function(){i&&this.layer===0&&Rt.active._onTouchMove(Xp);var ie=Wn[this.layer].vy?Wn[this.layer].vy*a:0,B=Wn[this.layer].vx?Wn[this.layer].vx*a:0;typeof u=="function"&&u.call(Rt.dragged.parentNode[Xi],B,ie,e,Xp,Wn[this.layer].el)!=="continue"||d1(Wn[this.layer].el,B,ie)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=Gr(h,!1)));hw=c}},30),S1=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,s=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var c=i||s;a();var u=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function mw(){}mw.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=bc(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:S1},sr(mw,{pluginName:"revertOnSpill"});function vw(){}vw.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:S1},sr(vw,{pluginName:"removeOnSpill"}),Rt.mount(new o7),Rt.mount(vw,mw);function s7(e,t){return Object.values(e).indexOf(t)}function r7(e,t,n,i){if(!e)return[];const o=Object.values(e),s=t.length-i;return[...t].map((a,l)=>l>=s?o.length:o.indexOf(a))}function a7(e){return["transition-group","TransitionGroup"].includes(e)}function E1(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?a7(t.name):!1}function l7(e,t){return t?{...t.props,...t.attrs}:e}const yw=["Start","Add","Remove","Update","End"],Cw=["Choose","Unchoose","Sort","Filter","Clone"],c7=["Move",...yw,...Cw].map(e=>"on"+e);let ww=null;const u7=lt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...yw.map(e=>e.toLowerCase()),...Cw.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:i}){const o=Z(!1),s=Z(!1),r=Z(0),a=Z(0),l=Z([]),c=Z(null),u=Z(null),d=j(()=>e.list?e.list:e.modelValue),h=Si();function f(){return e.component?UN(e.component):e.tag}function g(ae){if(u.value)for(const Fe in ae){const Me=e1(Fe);c7.indexOf(Me)===-1&&u.value.option(Me,ae[Fe])}}function m(){var ae;return((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.children)||[]}async function y(){var ae;await qt(),l.value=r7(m(),((ae=h==null?void 0:h.proxy)==null?void 0:ae.$el.children)||[],o.value,a.value)}function b(ae){const Fe=s7(m()||[],ae);if(Fe===-1)return null;const Me=d.value?d.value[Fe]:null;return{index:Fe,element:Me}}function S(ae){qt(()=>t("change",ae))}function F(ae){if(e.list){ae(e.list);return}const Fe=[...e.modelValue||[]];ae(Fe),t("update:modelValue",Fe)}function C(...ae){F(Me=>Me.splice(...ae))}function R(ae,Fe){F(Je=>Je.splice(Fe,0,Je.splice(ae,1)[0]))}function E(ae){const Fe=l.value,Me=Fe.length;return ae>Me-1?Me:Fe[ae]}function _(){var Fe,Me;return n.default&&((Me=(Fe=n.default()[0])==null?void 0:Fe.component)==null?void 0:Me.proxy)||null}function I(ae){if(!e.noTransitionOnDrag||!o.value)return;const Fe=m();Fe[ae]&&(Fe[ae].data=null);const Me=_();Me&&(Me.children=[],Me.kept=void 0)}function O(ae){y(),c.value=b(ae.item),c.value&&(ae.item._underlying_vm_=e.clone(c.value.element),ww=ae.item)}function k(ae){const Fe=ae.item._underlying_vm_;if(Fe===void 0)return;tw(ae.item);const Me=E(ae.newIndex);C(Me,0,Fe),y(),S({added:{element:Fe,newIndex:Me}})}function x(ae){var Me;if(t1((Me=h==null?void 0:h.proxy)==null?void 0:Me.$el,ae.item,ae.oldIndex),ae.pullMode==="clone"){tw(ae.clone);return}if(!c.value)return;const Fe=c.value.index;C(Fe,1),I(Fe),S({removed:{element:c.value.element,oldIndex:Fe}})}function P(ae){var Je,pt;tw(ae.item),t1(ae.from,ae.item,ae.oldIndex);const Fe=(Je=c.value)==null?void 0:Je.index,Me=E(ae.newIndex);R(Fe,Me),S({moved:{element:(pt=c.value)==null?void 0:pt.element,oldIndex:Fe,newIndex:Me}})}function N(ae,Fe){Object.prototype.hasOwnProperty.call(ae,Fe)&&(ae[Fe]+=r.value)}function G(ae){return ae.__draggable_component__}function ie({to:ae,related:Fe}){const Me=G(ae);if(!Me)return{component:Me};const Je=Me.realList,pt={list:Je,component:Me};if(ae!==Fe&&Je&&Me.getUnderlyingVm){const Mt=Me.getUnderlyingVm(Fe);if(Mt)return Object.assign(Mt,pt)}return pt}function B(ae,Fe){const Me=[...Fe.to.children].filter(Be=>Be.style.display!=="none");if(Me.length===0)return 0;const Je=Me.indexOf(Fe.related),pt=ae.component.getVmIndex(Je);return Me.indexOf(ww)!==-1||!Fe.willInsertAfter?pt:pt+1}const H=()=>{var pt,Mt;const ae={};yw.forEach(Be=>{ae["on"+Be]=$(Be)}),Cw.forEach(Be=>{ae["on"+Be]=X.bind(null,Be)});const Fe=Object.keys(i).reduce((Be,jt)=>(Be[e1(jt)]=i[jt],Be),{}),Me=Object.assign({},Fe,ae,{onMove:(Be,jt)=>ce(Be,jt)});"draggable"in Me||(Me.draggable=">*");const Je=((pt=h==null?void 0:h.proxy)==null?void 0:pt.$el.nodeType)===1?h.proxy.$el:((Mt=h==null?void 0:h.proxy)==null?void 0:Mt.$el.parentElement)||null;Je&&(u.value=new Rt(Je,Me),Je.__draggable_component__=h==null?void 0:h.proxy,y())};function X(ae,Fe){qt(()=>t(ae.toLowerCase(),Fe))}function $(ae){return Fe=>{if(d.value!==null){const Me="onDrag"+ae,Je=De[Me];Je&&Je(Fe)}X(ae,Fe)}}function ce(ae,Fe){const Me=e.move;if(!Me||!d.value)return!0;const Je=ie(ae),pt=c.value,Mt=B(Je,ae);pt&&Object.assign(pt,{futureIndex:Mt});const Be=Object.assign({},ae,{relatedContext:Je,draggedContext:pt});return Me(Be,Fe)}function ue(){y(),ww=null}const De={onDragStart:O,onDragAdd:k,onDragRemove:x,onDragUpdate:P,onDragMove:ce,onDragEnd:ue};return vn(()=>{H()}),e.list!==null&&e.modelValue!==null&&TK.error("list props are mutually exclusive! Please set one."),{getTag:f,realList:d,visibleIndexes:l,noneFunctionalComponentMode:s,headerOffset:r,footerOffset:a,transitionMode:o,computeIndexes:y,updateOptions:g,getChildrenNodes:m,getUnderlyingVm:b,emitChanges:S,alterList:F,spliceList:C,updatePosition:R,getVmIndex:E,getComponent:_,resetTransitionData:I,onDragStart:O,onDragAdd:k,onDragRemove:x,onDragUpdate:P,updateProperty:N,onDragMove:ce,onDragEnd:ue,mounted:H,context:c,sortableInstance:u,getRelatedContextFromMoveEvent:ie,getTargetedComponent:G,computeFutureIndex:B}},render(){const e=this.getTag(),t=l7(this.$attrs,this.componentData);if(typeof e=="string"){const i=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return i?(this.transitionMode=E1(i),kv(e,t,i)):kv(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const i=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=E1(i||[])}return kv(e,t,n)}}),d7=Ct(lt({__name:"DragDropList",props:{modelValue:{},groupName:{},disabled:{type:Boolean},readOnly:{type:Boolean}},emits:["changed"],setup(e,{emit:t}){const n=Z([]),i=e,o=t,s=Z({}),r=()=>{n.value=i.modelValue.map(l=>({id:l.field,name:l.headerName,...l}))||[],i.modelValue.forEach(l=>{s.value[l.field]={...l}})};ct(()=>i.modelValue,l=>{r()},{immediate:!0}),ct(n,l=>{if(l.length===i.modelValue.length&&!l.every((u,d)=>u.id===i.modelValue[d].field)){const u=l.map(d=>s.value[d.id]);o("changed",u)}});const a=l=>!i.readOnly;return(l,c)=>(K(),Xe(J(u7),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),tag:"transition-group",disabled:i.readOnly,onMove:a,"component-data":{tag:"div",type:"transition",name:"fade"},animation:300,easing:"cubic-bezier(0.4, 0, 0.2, 1)","ghost-class":"ghost","chosen-class":"chosen","drag-class":"drag"},{default:Se(()=>[(K(!0),Ce(kt,null,Un(n.value,u=>(K(),Ce("div",{key:u.id,class:"fade-item"},[_t(l.$slots,"item",{item:u},()=>[ut(bt(u.name),1)],!0)]))),128))]),_:3},8,["modelValue","disabled"]))}}),[["__scopeId","data-v-f4ff0810"]]),bw=Ct(lt({__name:"DragDropItem",props:{item:{},disabled:{type:Boolean},readOnly:{type:Boolean},columnStates:{}},emits:["toggle-column"],setup(e,{emit:t}){const n=yn,i=e,o=Z(!1),s=Z(i.columnStates[String(i.item.field)]||!1),r=t,a=c=>{s.value=c},l=j(()=>{var c,u;return(u=(c=i.item)==null?void 0:c.field)==null?void 0:u.includes("metric")});return ct(()=>s.value,()=>{r("toggle-column",i.item.field,i.item.required)}),(c,u)=>(K(),Ce("div",{key:e.item.field,class:z([c.$style["column-config__item"],{[c.$style.disabled]:e.disabled||i.readOnly}])},[ye(ew,{id:`col-${e.item.field}`,"model-value":s.value,"onUpdate:modelValue":a,disabled:e.disabled},null,8,["id","model-value","disabled"]),ye(gt,{color:e.disabled?"var(--disabled-color)":"var(--primary-color)",source:"remote",src:"GripVertical",class:z(c.$style.handler)},null,8,["color","class"]),nt((K(),Ce("span",{class:z(c.$style["column-config__item-label"])},[ut(bt(e.item.headerName),1)],2)),[[J(n),{content:e.item.headerName}]]),l.value?nt((K(),Ce("div",{key:0,class:z(c.$style.badge),onHover:u[0]||(u[0]=d=>o.value=!0)},[...u[1]||(u[1]=[ut(" M ",-1)])],34)),[[J(n),"Metric"]]):ot("",!0)],2))}}),[["__cssModules",{$style:{"column-config__item":"_column-config__item_qpc5s_1",disabled:"_disabled_qpc5s_13",readOnly:"_readOnly_qpc5s_17","column-config__item--pinned":"_column-config__item--pinned_qpc5s_20",handler:"_handler_qpc5s_27",badge:"_badge_qpc5s_31","column-config__item-label":"_column-config__item-label_qpc5s_45"}}]]),h7=Ct(lt({__name:"TableCustomization",props:{modelValue:{},readOnly:{type:Boolean},disabled:{type:Boolean},checkboxColumn:{}},emits:["update:modelValue","input"],setup(e,{emit:t}){const n=yn,i=e,o=t,s=Z(""),r=Z([]),a=Z({}),{triggerRef:l,popupRef:c,isVisible:u}=Qs({placement:"bottom-end",trigger:"click"}),d=j(()=>r.value.filter(C=>C.pinned==="left"&&C.field&&C.headerName)),h=j(()=>r.value.filter(C=>C.pinned==="right"&&C.field||C.field==="blank")),f=j({get:()=>r.value.filter(C=>!C.pinned&&C.field&&C.field!=="blank"),set:C=>{r.value=[...d.value,...C,...h.value]}}),g=j(()=>{if(!s.value)return{};const C=s.value.toLowerCase();return[...r.value,...f.value].reduce((R,E)=>{var _;return(_=E.headerName)!=null&&_.toLowerCase().includes(C)&&E.field&&(R[E.field]=!0),R},{})}),m=j(()=>i.modelValue),y=()=>{const C={};r.value.forEach(R=>{R.field&&(C[R.field]=!R.hide)}),a.value=C},b=()=>{const C=r.value.map(R=>({...R,hide:R.field?!a.value[R.field]:!1}));o("update:modelValue",C),o("input",C)},S=C=>{const R=[...d.value,...C,...h.value];i.checkboxColumn&&R.unshift(i.checkboxColumn),r.value=R,b()},F=(C,R)=>{!R&&C&&(a.value[C]=!a.value[C],b())};return ct(m,C=>{C&&C.length>0&&(r.value=[...C],y())},{immediate:!0}),(C,R)=>(K(),Ce("div",{class:z(C.$style["table-customization"])},[we("div",{ref_key:"triggerRef",ref:l},[_t(C.$slots,"trigger",{},()=>[nt((K(),Xe(ft,{variant:["secondary"],disabled:i.disabled,actived:J(u)},{prefix:Se(()=>[ye(gt,{src:"Gear"})]),default:Se(()=>[R[1]||(R[1]=ut(" Customise ",-1))]),_:1},8,["disabled","actived"])),[[J(n),"Customise table columns"]])])],512),we("div",{ref_key:"popupRef",ref:c,class:z(C.$style["tippy-content-wrapper"])},[we("div",{class:z(C.$style["column-config"])},[ye(KC,{modelValue:s.value,"onUpdate:modelValue":R[0]||(R[0]=E=>s.value=E)},null,8,["modelValue"]),we("div",{class:z(C.$style["column-config__header"])},[...R[2]||(R[2]=[we("label",null,"Manage columns",-1)])],2),Object.entries(g.value).length===0&&s.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["no-columns"])},[...R[3]||(R[3]=[ut(" No results. ",-1),we("br",null,null,-1),ut(" Try another search. ",-1)])],2)):ot("",!0),we("div",{class:z(C.$style["column-config__list"])},[d.value.length>0?(K(),Ce("div",{key:0,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(kt,null,Un(d.value,E=>nt((K(),Xe(bw,{key:E.field,item:E,disabled:!0,readOnly:!0,columnStates:a.value},null,8,["item","columnStates"])),[[as,g.value[E.field]||!s.value]])),128))],2)):ot("",!0),ye(d7,{"model-value":f.value,"group-name":"columns",onChanged:S,disabled:i.disabled,readOnly:i.readOnly},{item:Se(({item:E})=>[nt((K(),Xe(bw,{key:E.id,item:E,columnStates:a.value,disabled:i.disabled,readOnly:i.readOnly,onToggleColumn:F},null,8,["item","columnStates","disabled","readOnly"])),[[as,g.value[E.field]||!s.value]])]),_:1},8,["model-value","disabled","readOnly"]),h.value.length>0?(K(),Ce("div",{key:1,class:z(C.$style["column-config__pinned-section"])},[(K(!0),Ce(kt,null,Un(h.value.filter(E=>{var _;return E.headerName&&((_=E.headerName)==null?void 0:_.length)>0}),E=>nt((K(),Xe(bw,{key:E.field,item:E,disabled:i.disabled,readOnly:i.readOnly,columnStates:a.value},null,8,["item","disabled","readOnly","columnStates"])),[[as,g.value[E.field]||!s.value]])),128))],2)):ot("",!0)],2),we("div",{class:z(C.$style["column-config__footer"])},[ye(ft,{type:"button",variant:"secondary",disabled:!0},{default:Se(()=>[...R[4]||(R[4]=[we("span",null,"Add Column",-1)])]),_:1})],2)],2)],2)],2))}}),[["__cssModules",{$style:{"table-customization":"_table-customization_z1p39_1","table-customization__trigger":"_table-customization__trigger_z1p39_7","column-config":"_column-config_z1p39_23","column-config__header":"_column-config__header_z1p39_33","icon-color":"_icon-color_z1p39_43","column-config__list":"_column-config__list_z1p39_46","column-config__section-label":"_column-config__section-label_z1p39_50","column-config__footer":"_column-config__footer_z1p39_59","column-config__add-button":"_column-config__add-button_z1p39_62","cs-icon":"_cs-icon_z1p39_80","no-columns":"_no-columns_z1p39_84"}}]]),f7={class:"wrapper-suffix"},p7=Ct(lt({__name:"StatusSelect",props:{modelValue:{},getStatusFunc:{type:Function},workspaceId:{},id:{}},emits:["updated","error","cancel","update:modelValue"],setup(e,{expose:t,emit:n}){const i=yn,o={PER_PAGE:20,INITIAL_PAGE:1},s=e,r=Z(s.modelValue),a=n,l=j(()=>f.value.find(x=>x.id===r.value)||null),c=x=>{r.value=x.id,a("update:modelValue",x.id)},u=j(()=>{if(!r.value)return{backgroundColor:"#A6A6A6",border:"1px solid #A6A6A6"};const x=f.value.find(N=>N.id===r.value),P=String((x==null?void 0:x.color)||"white");return{backgroundColor:P,border:gy(P,"white")?"1px solid #ccc":"1px solid #fff"}}),d=Z(null),h=()=>{var x;(x=d.value)==null||x.focus()},f=Z([]),g=Z(!1),m=Z(!1),y=Z(null),b=Z(o.INITIAL_PAGE),S=Z(!0),F=Z(0),C=Z(""),R=j(()=>!!(s.id&&s.workspaceId)),E=x=>{const P=f.value.find(N=>N.id===x.value);P&&c(P)},_=x=>({label:x.name,value:x.id,selected:r.value===x.id,hover:!1,type:"status",disabled:!1,clickable:!0,danger:!1,data:x,id:x.id,color:x.color}),I=async(x=o.INITIAL_PAGE,P="",N=!1)=>{var G;if(!R.value){console.error("Missing required props",s);return}N?m.value=!0:g.value=!0,y.value=null;try{const ie={workspaceId:String(s.workspaceId),itemIds:s.id,page:x,perPage:o.PER_PAGE,name_like:P.trim()};if(s.getStatusFunc===void 0)throw new Error("API service getAssignableStatus is undefined");const B=await s.getStatusFunc(ie);if(!B){N||(f.value=[]),S.value=!1;return}const H=B.data.map(_);f.value=N?[...f.value,...H]:H,F.value=((G=B.meta)==null?void 0:G.total)??B.data.length,S.value=f.value.length<F.value,b.value=x}catch(ie){console.error("Error fetching statuses:",ie),y.value="Failed to load statuses",N||(f.value=[]),S.value=!1,a("error",y.value)}finally{g.value=!1,m.value=!1}},O=async()=>{!S.value||m.value||await I(b.value+1,C.value,!0)};ct([()=>s.id,()=>s.workspaceId],()=>{I()},{deep:!0,immediate:!0});const k=async x=>{C.value=x,b.value=o.INITIAL_PAGE,await I(o.INITIAL_PAGE,x,!1)};return t({focus:h,clear:()=>{r.value=null,a("update:modelValue",null)}}),(x,P)=>(K(),Xe(UP,{onOpen:h,placement:"bottom-start","max-width":500},{trigger:Se(({open:N})=>[ye(or,{actived:N,class:z(x.$style["status-wrapper"])},{suffix:Se(()=>[we("div",f7,[ye(gt,{src:"ChevronUp",source:"remote",class:z([[x.$style["dropdown-icon"]],{[x.$style["dropdown-icon-show"]]:!N}])},null,8,["class"])])]),default:Se(()=>{var G;return[we("div",{class:z(x.$style.status)},[we("div",{class:z(x.$style["color-indicator"]),style:mn(u.value)},null,6),nt((K(),Ce("span",{style:{"max-width":"400px"},class:z({[x.$style.empty]:!l.value})},[ut(bt(l.value?l.value.label:"Select status"),1)],2)),[[J(i),{content:((G=l.value)==null?void 0:G.label)||void 0}]])],2)]}),_:2},1032,["actived","class"])]),content:Se(({closeDropdown:N})=>{var G;return[ye(qC,{ref_key:"popupRef",ref:d,"selected-id":(G=l.value)==null?void 0:G.id,options:f.value,loading:g.value,"loading-more":m.value,"has-more":S.value,error:y.value,onSearch:k,onSelect:ie=>{E(ie),N()},onLoadMore:O,onCancel:P[0]||(P[0]=ie=>a("cancel")),style:{width:"500px"}},null,8,["selected-id","options","loading","loading-more","has-more","error","onSelect"])]}),_:1}))}}),[["__cssModules",{$style:{"status-wrapper":"_status-wrapper_fb8p7_1",status:"_status_fb8p7_1","color-indicator":"_color-indicator_fb8p7_12",empty:"_empty_fb8p7_21","dropdown-icon":"_dropdown-icon_fb8p7_25","dropdown-icon-show":"_dropdown-icon-show_fb8p7_30",options:"_options_fb8p7_34"}}]]),g7=Ct(lt({name:"EmptyData",__name:"EmptyData",props:{isSearching:{type:Boolean},isFiltering:{type:Boolean}},setup(e){const t=e,n={noData:"No data available.",noSearchResults:"No results. Try another search.",noFilterResults:"No results. Try another filter."},i=j(()=>t.isSearching||t.isFiltering?"NoDataSearchFilter":"ClickToCreate"),o=j(()=>t.isSearching?n.noSearchResults:t.isFiltering?n.noFilterResults:n.noData);return(s,r)=>(K(),Ce("div",{class:z(s.$style["no-data-item-table"])},[we("div",{class:z(s.$style.visual)},[ye(kp,{source:"remote",src:i.value,ratio:"4/3",maxWidth:500,maxHeight:350},null,8,["src"])],2),we("div",{class:z(s.$style.description)},bt(o.value),3)],2))}}),[["__cssModules",{$style:{"no-data-item-table":"_no-data-item-table_oh0wi_1",visual:"_visual_oh0wi_12",description:"_description_oh0wi_19"}}]]),R1=Ap("sortStore",()=>{const e=Z({}),t={id:"id",name:"name",isStated:"actual_start_date",isCompleted:"actual_due_date",lastUpdated:"updated_at",completedOn:"due_date",status:"template_flow_status",assignees:"assignee"},n={start_asc:{column:"start_date",direction:"asc"},start_desc:{column:"start_date",direction:"desc"},due_asc:{column:"due_date",direction:"asc"},due_desc:{column:"due_date",direction:"desc"}},i=j(()=>{const a=e.value;return Object.values(a).filter(c=>c.sort!=="none"&&!!c.sort).map(c=>{let u;switch(c.colId){case"dateRange":u=n[c.sort];break;default:if(c.colId.includes("metric")){const[d,h]=c.colId.split("_");u={column:d,direction:c.sort,type:h}}else u={column:t[c.colId]||c.colId,direction:c.sort};break}return u})}),o=(a,l)=>{e.value={[a]:{colId:a,sort:l}}},s=()=>{e.value={}},r=Z(!1);return{sortingAPIConfiguration:i,sorts:e,setSort:o,clearSorting:s,isSortingRunning:r}}),Qa=lt({name:"HeaderSorting",__name:"HeaderWrapper",props:{params:{},headerType:{},disabled:{type:Boolean},readOnly:{type:Boolean}},setup(e){const t=e,n=R1(),{sorts:i}=nr(n),o=j(()=>{var l,c;return((c=(l=t.params)==null?void 0:l.column)==null?void 0:c.getColId())||"template_col_id"}),s=l=>{o.value&&n.setSort(o.value,l)},r=j(()=>t.params.headerType||void 0),a=Z("none");return ct(()=>i.value,Ho(()=>{if(o.value){const l=i.value[o.value];a.value=l?l.sort:"none"}},200),{deep:!0,immediate:!0}),(l,c)=>o.value?(K(),Xe(wK,xn({key:0},t,{"header-type":r.value,modelValue:a.value,"onUpdate:modelValue":c[0]||(c[0]=u=>a.value=u),onSortChanged:s}),null,16,["header-type","modelValue"])):ot("",!0)}});function m7(){const e=Ao({isCreating:!1,name:"",error:void 0});return{newItemData:e,validateNewItem:()=>{const o=e.name.trim();o.length===0?e.error="Name cannot be empty":o.length>25?e.error="Name cannot exceed 25 characters":e.error=void 0},openNewItemForm:()=>{e.isCreating=!0,e.name="",e.error=void 0},closeNewItemForm:()=>{e.isCreating=!1},resetNewItemForm:()=>{e.name="",e.error=void 0}}}const v7=Ct(lt({__name:"CreateNewScene",emits:["create-new-item"],setup(e,{expose:t,emit:n}){const i=cE("target"),o=cE("newSceneInputRef");qP(i,f=>r());const s=()=>{a.isCreating=!0},r=()=>{a.isCreating=!1,c()},{newItemData:a,validateNewItem:l,resetNewItemForm:c,closeNewItemForm:u}=m7(),d=n,h=f=>{d("create-new-item",f)};return ct(()=>a.isCreating,f=>{f&&qt(()=>{o.value&&o.value.focus()})}),t({show:s,hide:r}),(f,g)=>nt((K(),Ce("div",{class:z(f.$style.newRow),ref_key:"target",ref:i},[ye(GP,{ref_key:"newSceneInputRef",ref:o,modelValue:J(a).name,"onUpdate:modelValue":g[0]||(g[0]=m=>J(a).name=m),onChange:J(l),onEnter:g[1]||(g[1]=m=>h(J(a).name)),placeholder:"Enter name",focused:!0,"max-length":25},{clear:Se(()=>[J(a).name.length==0?(K(),Xe(gt,{key:0,src:"Pen",color:"#f7941d"})):ot("",!0)]),_:1},8,["modelValue","onChange"]),ye(ft,{onClick:g[2]||(g[2]=m=>h(J(a).name)),disabled:!!J(a).error||!J(a).name.trim()},{prefix:Se(()=>[ye(gt,{src:"Plus"})]),default:Se(()=>[g[3]||(g[3]=ut(" Create ",-1))]),_:1},8,["disabled"]),ye(ft,{variant:["secondary","icon"],onClick:J(u)},{prefix:Se(()=>[ye(gt,{src:"XMarkSolid"})]),_:1},8,["onClick"])],2)),[[as,J(a).isCreating]])}}),[["__cssModules",{$style:{newRow:"_newRow_1vpac_1","warning-text":"_warning-text_1vpac_20","has-error":"_has-error_1vpac_25"}}]]),y7=["innerHTML"],C7=["accept"],D1=Ct(lt({__name:"FileUploader",props:{modelValue:{},acceptTypes:{default:()=>["xlsx","xls","csv"]}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Z(null),o=I=>`<svg xmlns="http://www.w3.org/2000/svg" width="49" height="49" viewBox="0 0 49 49" fill="none">
|
|
97
97
|
<g clip-path="url(#clip0)">
|
|
98
98
|
<path d="M9.86719 3.56641C9.86719 2.05448 11.1053 0.816406 12.6172 0.816406H33.5136L45.3672 12.67V45.5664C45.3672 47.0783 44.1291 48.3164 42.6172 48.3164H12.6172C11.1053 48.3164 9.86719 47.0783 9.86719 45.5664V3.56641Z" stroke="#232323" stroke-width="0.5"/>
|
|
99
99
|
<path d="M36.6172 12.5664H45.6172L33.6172 0.566406V9.56641C33.6172 11.2164 34.9672 12.5664 36.6172 12.5664Z" fill="#A6A6A6"/>
|
|
@@ -105,10 +105,10 @@ This will fail in production.`);r=ja,r._s.has(e)||(o?WC(e,t,i,r):BP(e,i,r),M.env
|
|
|
105
105
|
<rect width="48" height="48" fill="white" transform="translate(0.617188 0.566406)"/>
|
|
106
106
|
</clipPath>
|
|
107
107
|
</defs>
|
|
108
|
-
</svg>`,s=bd(),{showMessage:r}=s,a=Z(!1),l=Z(!1),c=e,u=Z({file:null,format:null,isValid:void 0}),d=j(()=>{var I;return((I=c.acceptTypes)==null?void 0:I.map(O=>`.${O}`).join(","))||".xlsx,.xls,.csv"}),h=j(()=>u.value.format?o(u.value.format):""),f=j(()=>{var I;if(!u.value.isValid)return`Invalid file type. Please upload a ${(I=c.acceptTypes)==null?void 0:I.join(", ")} file.`}),g=j(()=>!!u.value.file),m=()=>{var I;(I=i.value)==null||I.click()},y=j(()=>u.value.file?u.value.file.name:""),b=I=>{var x;const O=c.acceptTypes||["xlsx","xls","csv"],k=(x=I.name.split(".").pop())==null?void 0:x.toLowerCase();return k?O.includes(k):!1},S=I=>{var k,x;const O=b(I);I&&O?(u.value.isValid=O,a.value=!O,u.value.file=I,u.value.format=((k=I.name.split(".").pop())==null?void 0:k.toLowerCase())||null):r(`Invalid file type. Please upload a ${(x=c.acceptTypes)==null?void 0:x.join(", ")} file.`,"error")},F=I=>{const O=I.target;if(O.files&&O.files[0]){const k=O.files[0];S(k)}},C=()=>{l.value=!0},R=()=>{l.value=!1},E=I=>{if(l.value=!1,I.dataTransfer&&I.dataTransfer.files&&I.dataTransfer.files[0]){const O=I.dataTransfer.files[0];S(O)}},_=n;return ct(u,I=>{_("update:modelValue",I)},{deep:!0}),t({internalValue:u,clear:()=>{u.value={file:null,format:null},a.value=!1}}),(I,O)=>{const k=af("tooltip");return K(),Ce("div",{class:z([I.$style["drop-area"],{[I.$style["is-dragging"]]:l.value,[I.$style.error]:a.value}]),onDragenter:rn(C,["prevent"]),onDragover:rn(C,["prevent"]),onDragleave:rn(R,["prevent"]),onDrop:rn(E,["prevent"]),onClick:m},[g.value?ot("",!0):(K(),Ce("div",{key:0,class:z(I.$style["drop-area-content"])},[ye(gt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ye(
|
|
109
|
-
Refresh to see updates.`:"Work will be created in background. Refresh to see updates."),3)],64)):ot("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),x1=Ct(lt({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,g,m)=>{const y=document.createElement("span");return y.textContent=h,y.style.fontWeight=f,y.style.fontSize=g,y.style.color=m,y},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),c=o("Invalid formats:","normal","14px","#FF5200"),u=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),i=yn;return(o,s)=>(K(),Ce("div",{class:z(o.$style["date-format-guide"])},[we("span",{class:z(o.$style["step-title-2"])},[s[0]||(s[0]=ut(" Date format guide ",-1)),nt(ye(J(gt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[J(i),{content:J(n)}]])],2),we("div",{class:z(o.$style["date-rule-section"])},[s[3]||(s[3]=we("span",null,"Enter dates in one of these formats:",-1)),we("ul",{class:z(o.$style["step-description"])},[we("li",{class:z(o.$style["date-rule"])},[...s[1]||(s[1]=[we("b",null,"DD MM YYYY",-1),ut(" (Day-Month-Year) ",-1)])],2),we("li",{class:z(o.$style["date-rule"])},[...s[2]||(s[2]=[we("b",null,"YYYY MM DD",-1),ut(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),R7={key:1},D7=Ct(lt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Z(null),o=e,s=()=>{i.value&&i.value.show()},r=Z(""),a=Z("idle"),l=j(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=Z(null),u=Z({file:null,format:null}),{apiServices:d}=po(!1,o),h=async k=>{var P,N;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(N=d==null?void 0:d.value)==null?void 0:N.getStatuses);return}return await d.value.getStatuses(o.workspaceId,o.entityId,k)},f=Z(!1),g=async()=>{f.value=!0;const k=o.workspaceId,x=o.entityId;if(!k||!x||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(k,x))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async k=>{var N,G,ie;const x=new FormData,P=((N=k.name.split(".").pop())==null?void 0:N.toString())||"";if(x.append("file",k),x.append("format",P),x.append("template_flow_status_id",R.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{const B=await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,x);y()}catch(B){throw console.error("Error uploading file:",B),b(((ie=(G=B.response)==null?void 0:G.data)==null?void 0:ie.message)||"An unknown error occurred during file upload."),B}},y=()=>{a.value="success"},b=k=>{r.value=k,a.value="error"},S=n,F=()=>{S("import-success"),O()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:s});const R=Z(null),E=j(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),_=Z(null),I=()=>{var k,x;(k=c.value)==null||k.clear(),r.value="",u.value={file:null,format:null},R.value=null,(x=_==null?void 0:_.value)==null||x.clear(),a.value="idle"},O=()=>{var k;I(),(k=i.value)==null||k.hide()};return(k,x)=>(K(),Xe(J(QP),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:I},Su({default:Se(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(_1,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),Ce("div",R7,[we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 1: Download sample file",2),we("span",{class:z(k.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ye(J(pt),{class:z(k.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:g},{prefix:Se(()=>[ye(J(gt),{src:"Download"})]),default:Se(()=>[x[2]||(x[2]=ut(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ye(J(D1),{modelValue:u.value,"onUpdate:modelValue":x[0]||(x[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 3: Select status",2),we("span",{class:z(k.$style["step-description"])},"Choose a status for the new work.",2),ye(J(p7),{ref_key:"statusRef",ref:_,modelValue:R.value,"onUpdate:modelValue":x[1]||(x[1]=P=>R.value=P),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),we("div",{class:z(k.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ye(x1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"secondary",onClick:O},{default:Se(()=>[...x[3]||(x[3]=[ut(" Cancel ",-1)])]),_:1}),ye(J(pt),{disabled:E.value,style:{flex:"1"},variant:"primary",onClick:C},{default:Se(()=>[...x[4]||(x[4]=[ut(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"primary",onClick:F},{default:Se(()=>[...x[5]||(x[5]=[ut(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"primary",onClick:I},{default:Se(()=>[...x[6]||(x[6]=[ut(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),Qp={id:void 0,assignees:lK,status:RK,dateRange:cK,isStarted:Ya,isCompleted:Ya,lastUpdated:Ya,completedOn:Ya,isDeleted:Ya,isArchived:Ya,isProcessing:Ya,name:XP,options:A8,metric:CK,__checkboxSelection:void 0},_7={id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1},x7={id:void 0,assignees:$P,status:jP,dateRange:uK,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:XP,options:JP,metric:void 0,__checkboxSelection:void 0},F1={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50]},F7={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};function Sw(e){var o,s,r,a;const t=((o=e==null?void 0:e.data)==null?void 0:o.permissions)||void 0,n={assignees:(t==null?void 0:t.has_update_assignee_permission)||0,completedOn:0,name:0,permissions:0,status:(t==null?void 0:t.has_edit_template_flow_status_permission)||0,dateRange:(t==null?void 0:t.has_edit_date_permission)||0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1};if(e.data===void 0)return{disabled:!1,readOnly:!1};if(((s=e.colDef)==null?void 0:s.field)=="options")return{disabled:!1,readOnly:!1};if(!t)return;let i={disabled:!1,readOnly:(t==null?void 0:t.has_edit_permission)==0};if(((r=e.colDef)==null?void 0:r.field)!=="name"){const l=n[(a=e.colDef)==null?void 0:a.field];i=l?{disabled:l===-1,readOnly:l!==-1&&l!==1}:{disabled:!1,readOnly:!0}}return i}class Ad{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,o=i&&n?n[i]:void 0,s=Sw(t);return{...t,value:o,disabled:s==null?void 0:s.disabled,readOnly:s==null?void 0:s.readOnly}}static fromType(t){var g,m;const{wrapVueCellRenderer:n,wrapVueCellEditor:i}=this.getWrappers(),o=t.field;let s;o.includes("metric")&&Qp.metric?s=Qp.metric:Qp[o]?s=Qp[o]:s=YP;const r=x7[o],a=_7[o]??!1,l={minWidth:((g=F1[o])==null?void 0:g[0])||200,maxWidth:((m=F1[o])==null?void 0:m[1])||300},c=F7[o]||{},u=y=>!!y&&typeof y!="string",d=u(s)?n(s):s;let h={};return h={cellEditorSelector:y=>{const b=Sw(y);if(!(!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&a))return;let F;return u(r)?F=i(r):F=r,{component:F,params:this.buildCommonCellParams(y)}},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",...c},{headerName:t.headerName,...l,...t,...h,editable:y=>{const b=Sw(y);return!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&a},cellRenderer:d,cellRendererParams:t.cellRendererParams??this.buildCommonCellParams,headerComponentParams:y=>({...typeof t.headerComponentParams=="function"?t.headerComponentParams(y):t.headerComponentParams})}}}_n(Ad,"wrappers",null);function T7(e){return"stopEditing"in e}const P7=lt({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{type:String,default:"default"},maxRating:{type:Number,default:5}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>ye(t,{...e})}}),I7=()=>`${Math.max(50,Math.round(I3(0,100)))}%`,A7=8;function T1(e){return class{constructor(){_n(this,"container");_n(this,"vNode",null);_n(this,"componentInstance",null);_n(this,"params");_n(this,"isEditor",!1)}init(n){var c,u,d,h;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),o=n.context.apiClass;this.params=n,this.isEditor=T7(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper",`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",I7()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),r=n,a={component:e,params:s,disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(c=n==null?void 0:n.data)==null?void 0:c.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:o,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isNoData:r.isNoData??!1};this.vNode=ye(P7,a),OR(this.vNode,this.container);const l=performance.now()-i;l>A7&&console.warn(`[Vue3CellWrapper] Slow render detected (${l.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(d=n.data)==null?void 0:d.id}"`),this.componentInstance=(h=this.vNode.component)==null?void 0:h.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(i=this.componentInstance).getValue)==null?void 0:o.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,o,s;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((s=(o=this.params)==null?void 0:o.colDef)==null?void 0:s.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{OR(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function eg(e){return T1(e)}function P1(e){return T1(e)}var el=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&n&&(o=new Set,i.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,o=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function lr(e){return e==null||e===""?null:e}function Ke(e){return e!=null&&e!==""}function fn(e){return!Ke(e)}function Ew(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function kd(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function k7(e,t,n=!1){const i=e==null,o=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var O7=/[&<>"']/g,M7={"&":"&","<":"<",">":">",'"':""","'":"'"};function _c(e){return(e==null?void 0:e.toString().toString())??null}function Od(e){var t;return((t=_c(e))==null?void 0:t.replace(O7,n=>M7[n]))??null}function Cs(e){return e.eRootDiv.getRootNode()}function wn(e){return Cs(e).activeElement}function Xn(e){const{gos:t,eRootDiv:n}=e;let i=null;const o=t.get("getDocument");return o&&Ke(o)?i=o():n&&(i=n.ownerDocument),i&&Ke(i)?i:document}function I1(e){const t=wn(e);return t===null||t===Xn(e).body}function A1(e){return Xn(e).defaultView||window}function Rw(e){let t=null,n=null;try{t=Xn(e).fullscreenElement}catch{}finally{t||(t=Cs(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function L7(e){const t=Rw(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function N7(e){const t=Rw(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Ko(e,t,n){n==null||typeof n=="string"&&n==""?k1(e,t):wo(e,t,n)}function wo(e,t,n){e.setAttribute(O1(t),n.toString())}function k1(e,t){e.removeAttribute(O1(t))}function O1(e){return`aria-${e}`}function zr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function V7(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function B7(e){return e.getAttribute("aria-label")}function xc(e,t){Ko(e,"label",t)}function Md(e,t){Ko(e,"labelledby",t)}function M1(e,t){Ko(e,"live",t)}function H7(e,t){Ko(e,"atomic",t)}function G7(e,t){Ko(e,"relevant",t)}function $7(e,t){Ko(e,"invalid",t)}function W7(e,t){Ko(e,"disabled",t)}function L1(e,t){Ko(e,"hidden",t)}function Dw(e,t){wo(e,"expanded",t)}function z7(e,t){wo(e,"setsize",t)}function U7(e,t){wo(e,"posinset",t)}function j7(e,t){wo(e,"multiselectable",t)}function K7(e,t){wo(e,"rowcount",t)}function tg(e,t){wo(e,"rowindex",t)}function q7(e,t){wo(e,"rowspan",t)}function Y7(e,t){wo(e,"colcount",t)}function N1(e,t){wo(e,"colindex",t)}function Z7(e,t){wo(e,"colspan",t)}function X7(e,t){wo(e,"sort",t)}function J7(e){k1(e,"sort")}function V1(e,t){Ko(e,"selected",t)}function Q7(e,t){Ko(e,"controls",t)}function e9(e,t){Q7(e,t.id),Md(t,e.id)}function B1(e,t){Ko(e,"owns",t)}function ng(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var t9="[tabindex], input, select, button, textarea, [href]",H1="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ld(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(H1)?!1:ws(e)}function pn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||L1(e,!t)}function n9(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||L1(e,!t)}function Nd(e,t){const n="disabled",i=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);i(e);const o=e.querySelectorAll("input")??[];for(const s of o)i(s)}function tl(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function nl(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:m}=window.getComputedStyle(e),y=Number.parseFloat;return{height:y(t||"0"),width:y(n||"0"),borderTopWidth:y(i||"0"),borderRightWidth:y(o||"0"),borderBottomWidth:y(s||"0"),borderLeftWidth:y(r||"0"),paddingTop:y(a||"0"),paddingRight:y(l||"0"),paddingBottom:y(c||"0"),paddingLeft:y(u||"0"),marginTop:y(d||"0"),marginRight:y(h||"0"),marginBottom:y(f||"0"),marginLeft:y(g||"0"),boxSizing:m}}function _w(e){const t=nl(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Vd(e){const t=nl(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function G1(e){const{height:t,marginBottom:n,marginTop:i}=nl(e);return Math.floor(t+n+i)}function ig(e){const{width:t,marginLeft:n,marginRight:i}=nl(e);return Math.floor(t+n+i)}function $1(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:s}=nl(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function og(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function sg(e,t,n){n&&(t*=-1),e.scrollLeft=t}function ii(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function qo(e){e!=null&&e.parentNode&&e.remove()}function W1(e){return!!e.offsetParent}function ws(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!W1(e)||window.getComputedStyle(e).visibility!=="visible")}function xw(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function z1(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function U1(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.children[n];o!==i&&e.insertBefore(i,o)}}function i9(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Bd(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const o=i9(n),s=i.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(o,r,a)}}function rg(e){return()=>{const t=e();return t?Fw(t)||j1(t):!0}}function Fw(e){return e.clientWidth<e.scrollWidth}function j1(e){return e.clientHeight<e.scrollHeight}function ag(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):bs(e,t)}function bs(e,t){t=Tw(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Hd(e,t){t=Tw(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Tw(e){return typeof e=="number"?`${e}px`:e}function Pw(e){return e instanceof Node||e instanceof HTMLElement}function Qi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ur(e,t,n){const o=A1(e).ResizeObserver,s=o?new o(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function cr(e,t){const n=A1(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var K1="data-ref",Iw;function q1(){return Iw??(Iw=document.createTextNode(" ")),Iw.cloneNode()}function Gd(e){const{attrs:t,children:n,cls:i,ref:o,role:s,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(K1,o),s&&a.setAttribute("role",s),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(q1()),l=!1),a.append(Gd(c)),a.appendChild(q1())))}return a}var o9=["touchstart","touchend","touchmove","touchcancel","scroll"],s9=["wheel"],Aw={},Y1=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof Aw[n]=="boolean")return Aw[n];const i=document.createElement(e[n]||"div");return n="on"+n,Aw[n]=n in i}})();function r9(e,t){return!t||!e?!1:l9(t).indexOf(e)>=0}function a9(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function l9(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():a9(t)}function c9(e,t,n){const i=u9(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,n,o)}var u9=e=>{const t=o9.includes(e),n=s9.includes(e);if(t)return!0;if(n)return!1};function Z1(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=n}var $d=(e,t)=>{const n=e.identifier;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.identifier===n)return s}return null};function Wd(e,t){return e.gos.isElementInThisInstance(t.target)}function d9(e,t,n){const o=e.getBoundingClientRect().height,s=L7(n)-2,r=N7(n)-2;if(!e.offsetParent)return;const l=$1(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-o/2,h=u-l.left-10;const f=Xn(n),g=f.defaultView||window,m=g.pageYOffset||f.documentElement.scrollTop,y=g.pageXOffset||f.documentElement.scrollLeft;s>0&&h+e.clientWidth>s+y&&(h=s+y-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var lg=(e,...t)=>{for(const n of t){const[i,o,s,r]=n;i.addEventListener(o,s,r),e.push(n)}},kw=e=>{if(e){for(const[t,n,i,o]of e)t.removeEventListener(n,i,o);e.length=0}},jr=e=>{e.cancelable&&e.preventDefault()};function h9(e,t){return t}function X1(e){return(e==null?void 0:e.getLocaleTextFunc())??h9}function f9(e,t,n,i){const o=t[n];return e.getLocaleTextFunc()(n,typeof o=="function"?o(i):o,i)}function p9(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function g9(e){return(t,n,i)=>{let o=e==null?void 0:e[t];if(o&&(i!=null&&i.length)){let s=0;for(;!(s>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[s++])}return o??n}}var Ss=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new el),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const o=t[i];o&&n.push(this._setupListener(e,i,o))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(m9(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const o=v9(e);e instanceof HTMLElement?c9(e,t,n):o?e.addListener(t,n):e.addEventListener(t,n),i=o?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=o.changeSet.id}const s={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(s)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return X1(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function m9(e){return e.__addEventListener!==void 0}function v9(e){return e.eventServiceType==="global"}var be=class extends Ss{},J1={};function Ow(e,t){J1[t]||(e(),J1[t]=!0)}var y9={pending:!1,funcs:[]},C9={pending:!1,funcs:[]};function Mw(e,t="setTimeout",n){const i=t==="raf"?C9:y9;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of s)r()};t==="raf"?cr(n,o):window.setTimeout(o,0)}function oi(e,t,n){let i;return function(...o){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,o)},n)}}function Q1(e,t){let n=0;return function(...i){const o=this,s=Date.now();s-n<t||(n=s,e.apply(o,i))}}function w9(e,t,n,i=100){const o=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-o>i;(t()||c)&&(n(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var eI=new Set(["__proto__","constructor","prototype"]);function b9(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!eI.has(i)))t(n,e[n])}}function _i(e,t,n=!0,i=!1){Ke(t)&&b9(t,(o,s)=>{let r=e[o];r!==s&&(i&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[o]=r),tI(s)&&tI(r)&&!Array.isArray(r)?_i(r,s,n,i):(n||s!==void 0)&&(e[o]=s))})}function tI(e){return typeof e=="object"&&e!==null}var Lw=class Er{static applyGlobalGridOptions(t){if(!Er.gridOptions)return{...t};let n={};return _i(n,Er.gridOptions,!0,!0),Er.mergeStrategy==="deep"?_i(n,t,!0,!0):n={...n,...t},Er.gridOptions.context&&(n.context=Er.gridOptions.context),t.context&&(Er.mergeStrategy==="deep"&&n.context&&_i(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Er.mergeStrategy==="deep"){const i=S9(t);if(i&&typeof i=="object"&&typeof n=="object")return Er.applyGlobalGridOptions({[t]:n})[t]}return n}};Lw.gridOptions=void 0,Lw.mergeStrategy="shallow";var Nw=Lw;function S9(e){var t;return(t=Nw.gridOptions)==null?void 0:t[e]}var E9={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},nI="https://www.ag-grid.com";function Kr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function zd(e,...t){Ow(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Fc(e,...t){Ow(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var iI=new Set,cg={},Tc={},ug,oI=!1,sI=!1,R9=!1;function D9(e){const[t,n]=e.version.split(".")||[],[i,o]=ug.split(".")||[];return t===i&&n===o}function _9(e){var i;ug||(ug=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?D9(e)||Fc(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ug}.`)):Fc(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Fc(`${n.message}`)}function Ud(e,t,n=!1){n||(oI=!0),_9(e);const i=e.rowModels??["all"];iI.add(e);let o;t!==void 0?(sI=!0,Tc[t]===void 0&&(Tc[t]={}),o=Tc[t]):o=cg;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)Ud(s,t,n)}function x9(e){delete Tc[e]}function Vw(e,t,n){const i=o=>{var s,r,a;return!!((s=cg[o])!=null&&s[e])||!!((a=(r=Tc[t])==null?void 0:r[o])!=null&&a[e])};return i(n)||i("all")}function Bw(){return sI}function F9(e,t){const n=Tc[e]??{};return[...Object.values(cg.all??{}),...Object.values(n.all??{}),...Object.values(cg[t]??{}),...Object.values(n[t]??{})]}function T9(){return new Set(iI)}function P9(){return oI}function I9(){return R9}var A9=class{static register(e){Ud(e,void 0)}static registerModules(e){for(const t of e)Ud(t,void 0)}},Ue="34.3.1",rI=2e3,aI=100,lI="_version_",dg=null,Pc=`${nI}/javascript-data-grid`;function k9(e){dg=e}function O9(e){Pc=e}function cI(e,t,n){return(dg==null?void 0:dg(e,t))??[V9(e,t,n)]}function Hw(e,t,n,i,o){e(`${i?"warning":"error"} #${t}`,...cI(t,n,o))}function M9(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function L9(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=M9(e)),t}function hg(e){return e===void 0?"undefined":e===null?"null":e}function Gw(e,t){return`${e}?${t.toString()}`}function N9(e,t,n){const i=Array.from(t.entries()).sort((s,r)=>r[1].length-s[1].length);let o=Gw(e,t);for(const[s,r]of i){if(s===lI)continue;const a=o.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>aI?r.slice(0,r.length-c)+l:r.slice(0,aI)+l;t.set(s,u),o=Gw(e,t)}return o}function uI(e,t){const n=new URLSearchParams;if(n.append(lI,Ue),t)for(const s of Object.keys(t))n.append(s,L9(t[s]));const i=`${Pc}/errors/${e}`,o=Gw(i,n);return o.length<=rI?o:N9(i,n,rI)}var V9=(e,t,n)=>{const i=uI(e,t);return`${`${n?n+`
|
|
108
|
+
</svg>`,s=bd(),{showMessage:r}=s,a=Z(!1),l=Z(!1),c=e,u=Z({file:null,format:null,isValid:void 0}),d=j(()=>{var I;return((I=c.acceptTypes)==null?void 0:I.map(O=>`.${O}`).join(","))||".xlsx,.xls,.csv"}),h=j(()=>u.value.format?o(u.value.format):""),f=j(()=>{var I;if(!u.value.isValid)return`Invalid file type. Please upload a ${(I=c.acceptTypes)==null?void 0:I.join(", ")} file.`}),g=j(()=>!!u.value.file),m=()=>{var I;(I=i.value)==null||I.click()},y=j(()=>u.value.file?u.value.file.name:""),b=I=>{var x;const O=c.acceptTypes||["xlsx","xls","csv"],k=(x=I.name.split(".").pop())==null?void 0:x.toLowerCase();return k?O.includes(k):!1},S=I=>{var k,x;const O=b(I);I&&O?(u.value.isValid=O,a.value=!O,u.value.file=I,u.value.format=((k=I.name.split(".").pop())==null?void 0:k.toLowerCase())||null):r(`Invalid file type. Please upload a ${(x=c.acceptTypes)==null?void 0:x.join(", ")} file.`,"error")},F=I=>{const O=I.target;if(O.files&&O.files[0]){const k=O.files[0];S(k)}},C=()=>{l.value=!0},R=()=>{l.value=!1},E=I=>{if(l.value=!1,I.dataTransfer&&I.dataTransfer.files&&I.dataTransfer.files[0]){const O=I.dataTransfer.files[0];S(O)}},_=n;return ct(u,I=>{_("update:modelValue",I)},{deep:!0}),t({internalValue:u,clear:()=>{u.value={file:null,format:null},a.value=!1}}),(I,O)=>{const k=af("tooltip");return K(),Ce("div",{class:z([I.$style["drop-area"],{[I.$style["is-dragging"]]:l.value,[I.$style.error]:a.value}]),onDragenter:rn(C,["prevent"]),onDragover:rn(C,["prevent"]),onDragleave:rn(R,["prevent"]),onDrop:rn(E,["prevent"]),onClick:m},[g.value?ot("",!0):(K(),Ce("div",{key:0,class:z(I.$style["drop-area-content"])},[ye(gt,{src:"Upload",size:"24",color:"#3C9BFA"}),we("span",null,[ye(ft,{variant:["tertiary","text"],class:z(I.$style["upload-btn"])},{default:Se(()=>[...O[0]||(O[0]=[ut(" Click to upload ",-1)])]),_:1},8,["class"]),O[1]||(O[1]=ut(" or drag and drop files here ",-1))])],2)),g.value?nt((K(),Ce("div",{key:1,class:z(I.$style["drop-area-file"])},[we("div",{innerHTML:h.value},null,8,y7),nt((K(),Ce("span",{class:z(I.$style["file-name"])},[ut(bt(y.value),1)],2)),[[k,{content:y.value}]])],2)),[[k,f.value]]):ot("",!0),we("input",{ref_key:"fileInput",ref:i,type:"file",style:{display:"none"},accept:d.value,onChange:F},null,40,C7)],34)}}}),[["__cssModules",{$style:{"upload-btn":"_upload-btn_1ybeg_1","drop-area":"_drop-area_1ybeg_8","is-dragging":"_is-dragging_1ybeg_18",error:"_error_1ybeg_22","drop-area-content":"_drop-area-content_1ybeg_26","drop-area-file":"_drop-area-file_1ybeg_34","file-name":"_file-name_1ybeg_42","clear-button":"_clear-button_1ybeg_51"}}]]),w7={width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b7=["fill"],S7=Ct(lt({__name:"FilterBox",emits:["update:assignees"],setup(e,{emit:t}){const{hide:n,isVisible:i,triggerRef:o,popupRef:s}=Qs({offset:[0,0]}),r=t,a=j(()=>ZP.get("ws.user-access-id")||""),l=Z(!1);ct(l,u=>{u?r("update:assignees",[a.value]):r("update:assignees",[]),n()});const c=j(()=>l.value?"#000":"#3C9BFA");return(u,d)=>(K(),Ce("div",null,[ye(ft,{variant:"secondary",ref_key:"triggerRef",ref:o,actived:J(i),style:mn({border:l.value?"2px solid var(--primary-color)":""})},{prefix:Se(()=>[(K(),Ce("svg",w7,[we("path",{d:"M0.0998533 0.587105C0.269063 0.228176 0.627991 0 1.02538 0H12.1009C12.4983 0 12.8572 0.228176 13.0264 0.587105C13.1956 0.946034 13.1443 1.36906 12.8931 1.67671L8.20395 7.40675V10.6653C8.20395 10.9755 8.02961 11.2601 7.75016 11.3986C7.47071 11.537 7.13998 11.5088 6.8913 11.3216L5.25048 10.091C5.04281 9.9372 4.92232 9.69364 4.92232 9.4347V7.40675L0.230606 1.67415C-0.0180804 1.36906 -0.0719197 0.94347 0.0998533 0.587105Z",fill:c.value},null,8,b7)]))]),default:Se(()=>[d[1]||(d[1]=ut(" Filter ",-1))]),_:1},8,["actived","style"]),we("div",{ref_key:"popupRef",ref:s},[we("div",{class:z(u.$style.row)},[ye(ew,{size:"small",label:"Show Archived Items",modelValue:l.value,"onUpdate:modelValue":d[0]||(d[0]=h=>l.value=h)},null,8,["modelValue"]),d[2]||(d[2]=ut(" Assigned to me ",-1))],2)],512)]))}}),[["__cssModules",{$style:{row:"_row_1akrr_1"}}]]),E7={style:{color:"#ff5200"}},_1=Ct(lt({__name:"ImportVisual",props:{state:{},errorMessage:{},overwrite:{type:Boolean}},setup(e){return(t,n)=>(K(),Ce("div",{class:z(t.$style["inform-layout"])},[e.state==="importing"?(K(),Ce("div",{key:0,class:z(t.$style["import-error"]),style:{width:"500px"}},[ye(J(kp),{src:"UploadInProgress","max-height":180,"max-width":180})],2)):e.state==="error"?(K(),Ce("div",{key:1,class:z(t.$style["import-error"]),style:{width:"500px"}},[ye(J(kp),{src:"Unsuccessful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])}," File doesn’t meet requirements. Check file and try again. ",2),we("div",E7,[we("span",{class:z(t.$style["step-description"])},"Error code",2),we("span",{class:z(t.$style["step-description"])},bt(e.errorMessage),3)])],2)):e.state==="success"?(K(),Ce(kt,{key:2},[ye(J(kp),{src:"Successful1","max-height":180,"max-width":180}),we("span",{class:z(t.$style["step-title"])},bt(e.overwrite?`Existing data will be overwritten in the background.
|
|
109
|
+
Refresh to see updates.`:"Work will be created in background. Refresh to see updates."),3)],64)):ot("",!0)],2))}}),[["__cssModules",{$style:{"inform-layout":"_inform-layout_1og33_1","import-error":"_import-error_1og33_11","step-title":"_step-title_1og33_22","step-description":"_step-description_1og33_27"}}]]),x1=Ct(lt({__name:"DateRule",setup(e){const n=(()=>{const o=(h,f,g,m)=>{const y=document.createElement("span");return y.textContent=h,y.style.fontWeight=f,y.style.fontSize=g,y.style.color=m,y},s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column";const r=document.createElement("div"),a=document.createElement("div"),l=o("Valid formats:","normal","14px","#02C39A"),c=o("Invalid formats:","normal","14px","#FF5200"),u=o(" 2025.12.31, 2025-12-31, 2025/12/31 ","normal","14px",""),d=o(" 12.31.2025, 2025.31.12","normal","14px","");return r.appendChild(l),r.appendChild(u),a.appendChild(c),a.appendChild(d),s.appendChild(r),s.appendChild(a),s.outerHTML})(),i=yn;return(o,s)=>(K(),Ce("div",{class:z(o.$style["date-format-guide"])},[we("span",{class:z(o.$style["step-title-2"])},[s[0]||(s[0]=ut(" Date format guide ",-1)),nt(ye(J(gt),{src:"InfoCircle",color:"#A6A6A6"},null,512),[[J(i),{content:J(n)}]])],2),we("div",{class:z(o.$style["date-rule-section"])},[s[3]||(s[3]=we("span",null,"Enter dates in one of these formats:",-1)),we("ul",{class:z(o.$style["step-description"])},[we("li",{class:z(o.$style["date-rule"])},[...s[1]||(s[1]=[we("b",null,"DD MM YYYY",-1),ut(" (Day-Month-Year) ",-1)])],2),we("li",{class:z(o.$style["date-rule"])},[...s[2]||(s[2]=[we("b",null,"YYYY MM DD",-1),ut(" (Year-Month-Day) ",-1)])],2)],2)],2)],2))}}),[["__cssModules",{$style:{"date-format-guide":"_date-format-guide_ef59d_1","step-title-2":"_step-title-2_ef59d_13","date-rule-section":"_date-rule-section_ef59d_25","step-description":"_step-description_ef59d_29","date-rule":"_date-rule_ef59d_25"}}]]),R7={key:1},D7=Ct(lt({__name:"PopupCreateScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Z(null),o=e,s=()=>{i.value&&i.value.show()},r=Z(""),a=Z("idle"),l=j(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Create new work"})[a.value]),c=Z(null),u=Z({file:null,format:null}),{apiServices:d}=po(!1,o),h=async k=>{var P,N;if(((P=d==null?void 0:d.value)==null?void 0:P.getStatuses)===void 0){console.error("API services not available",(N=d==null?void 0:d.value)==null?void 0:N.getStatuses);return}return await d.value.getStatuses(o.workspaceId,o.entityId,k)},f=Z(!1),g=async()=>{f.value=!0;const k=o.workspaceId,x=o.entityId;if(!k||!x||!d.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await d.value.downloadTemplate(k,x))throw new Error("No response from downloadTemplate API")}catch(P){console.error("Error downloading template:",P)}f.value=!1},m=async k=>{var N,G,ie;const x=new FormData,P=((N=k.name.split(".").pop())==null?void 0:N.toString())||"";if(x.append("file",k),x.append("format",P),x.append("template_flow_status_id",R.value||""),!d.value||!o.workspaceId||!o.entityId){console.error("API services not available");return}try{const B=await d.value.addNewSceneViaImportFile(o.workspaceId,o.entityId,x);y()}catch(B){throw console.error("Error uploading file:",B),b(((ie=(G=B.response)==null?void 0:G.data)==null?void 0:ie.message)||"An unknown error occurred during file upload."),B}},y=()=>{a.value="success"},b=k=>{r.value=k,a.value="error"},S=n,F=()=>{S("import-success"),O()},C=async()=>{if(!u.value||!u.value.file){console.error("No file to upload");return}a.value="importing",await m(u.value.file)};t({open:s});const R=Z(null),E=j(()=>!u.value.file||!u.value.format||!u.value.isValid||!R.value),_=Z(null),I=()=>{var k,x;(k=c.value)==null||k.clear(),r.value="",u.value={file:null,format:null},R.value=null,(x=_==null?void 0:_.value)==null||x.clear(),a.value="idle"},O=()=>{var k;I(),(k=i.value)==null||k.hide()};return(k,x)=>(K(),Xe(J(QP),{"popup-name":l.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:I},Su({default:Se(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(_1,{key:0,state:a.value,"error-message":r.value},null,8,["state","error-message"])):(K(),Ce("div",R7,[we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 1: Download sample file",2),we("span",{class:z(k.$style["step-description"])}," Get a sample file with all columns ready for editing. ",2),ye(J(ft),{class:z(k.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:f.value,onHandleClick:g},{prefix:Se(()=>[ye(J(gt),{src:"Download"})]),default:Se(()=>[x[2]||(x[2]=ut(" Download sample file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 2: Upload your file (.xlsx, .xls, .csv)",2),ye(J(D1),{modelValue:u.value,"onUpdate:modelValue":x[0]||(x[0]=P=>u.value=P),ref_key:"filUploaderRef",ref:c},null,8,["modelValue"])],2),we("div",{class:z(k.$style["step-section"])},[we("span",{class:z(k.$style["step-title"])},"Step 3: Select status",2),we("span",{class:z(k.$style["step-description"])},"Choose a status for the new work.",2),ye(J(p7),{ref_key:"statusRef",ref:_,modelValue:R.value,"onUpdate:modelValue":x[1]||(x[1]=P=>R.value=P),"get-status-func":h,"workspace-id":o.workspaceId,id:o.entityId},null,8,["modelValue","workspace-id","id"])],2),we("div",{class:z(k.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ye(x1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"secondary",onClick:O},{default:Se(()=>[...x[3]||(x[3]=[ut(" Cancel ",-1)])]),_:1}),ye(J(ft),{disabled:E.value,style:{flex:"1"},variant:"primary",onClick:C},{default:Se(()=>[...x[4]||(x[4]=[ut(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"primary",onClick:F},{default:Se(()=>[...x[5]||(x[5]=[ut(" Close ",-1)])]),_:1})]),key:"1"}:a.value=="error"?{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"primary",onClick:I},{default:Se(()=>[...x[6]||(x[6]=[ut(" Try Again ",-1)])]),_:1})]),key:"2"}:void 0]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_jt1wo_1","step-title":"_step-title_jt1wo_11","step-title-2":"_step-title-2_jt1wo_17","step-description":"_step-description_jt1wo_23","date-format-guide":"_date-format-guide_jt1wo_28","import-error":"_import-error_jt1wo_39","drop-area":"_drop-area_jt1wo_49","is-dragging":"_is-dragging_jt1wo_49","drop-area-content":"_drop-area-content_jt1wo_52",browse:"_browse_jt1wo_61","download-sample-btn":"_download-sample-btn_jt1wo_65"}}]]),Qp={id:void 0,assignees:lK,status:RK,dateRange:cK,isStarted:Ya,isCompleted:Ya,lastUpdated:Ya,completedOn:Ya,isDeleted:Ya,isArchived:Ya,isProcessing:Ya,name:XP,options:A8,metric:CK,__checkboxSelection:void 0},_7={id:!1,assignees:!0,status:!0,dateRange:!0,isStarted:!1,isCompleted:!1,lastUpdated:!1,completedOn:!1,isDeleted:!1,isArchived:!1,isProcessing:!1,name:!1,options:!0,metric:!1,__checkboxSelection:!1},x7={id:void 0,assignees:$P,status:jP,dateRange:uK,isStarted:void 0,isCompleted:void 0,lastUpdated:void 0,completedOn:void 0,isDeleted:void 0,isArchived:void 0,isProcessing:void 0,name:XP,options:JP,metric:void 0,__checkboxSelection:void 0},F1={id:[100,100],assignees:[200,200],status:[200,200],dateRange:[255,255],isStarted:[150,150],isCompleted:[150,150],lastUpdated:[180,180],completedOn:[180,180],isDeleted:[void 0,void 0],isArchived:[void 0,void 0],isProcessing:[void 0,void 0],name:[350,500],options:[50,50],metric:[200,300],__checkboxSelection:[50,50]},F7={dateRange:{cellEditorPopupPosition:"under",cellEditorPopup:!1},name:{cellEditorPopupPosition:"over",cellEditor:!1,cellEditorPopup:!1},metric:{suppressKeyboardEvent:void 0,suppressNavigable:!1,suppressMovable:!1,cellClass:"ag-cell-optimized"}};function Sw(e){var o,s,r,a;const t=((o=e==null?void 0:e.data)==null?void 0:o.permissions)||void 0,n={assignees:(t==null?void 0:t.has_update_assignee_permission)||0,completedOn:0,name:0,permissions:0,status:(t==null?void 0:t.has_edit_template_flow_status_permission)||0,dateRange:(t==null?void 0:t.has_edit_date_permission)||0,isStarted:0,isDeleted:0,isArchived:0,isProcessing:0,lastUpdated:0,id:0,isCompleted:0,options:1};if(e.data===void 0)return{disabled:!1,readOnly:!1};if(((s=e.colDef)==null?void 0:s.field)=="options")return{disabled:!1,readOnly:!1};if(!t)return;let i={disabled:!1,readOnly:(t==null?void 0:t.has_edit_permission)==0};if(((r=e.colDef)==null?void 0:r.field)!=="name"){const l=n[(a=e.colDef)==null?void 0:a.field];i=l?{disabled:l===-1,readOnly:l!==-1&&l!==1}:{disabled:!1,readOnly:!0}}return i}class Ad{static initialize(t){this.wrappers=t}static getWrappers(){if(!this.wrappers)throw new Error("CellRendererFactory: Not initialized. Please call CellRendererFactory.initialize() first.");return this.wrappers}static buildCommonCellParams(t){var r,a;const n=t.data||((r=t.node)==null?void 0:r.data),i=(a=t.colDef)==null?void 0:a.field,o=i&&n?n[i]:void 0,s=Sw(t);return{...t,value:o,disabled:s==null?void 0:s.disabled,readOnly:s==null?void 0:s.readOnly}}static fromType(t){var g,m;const{wrapVueCellRenderer:n,wrapVueCellEditor:i}=this.getWrappers(),o=t.field;let s;o.includes("metric")&&Qp.metric?s=Qp.metric:Qp[o]?s=Qp[o]:s=YP;const r=x7[o],a=_7[o]??!1,l={minWidth:((g=F1[o])==null?void 0:g[0])||200,maxWidth:((m=F1[o])==null?void 0:m[1])||300},c=F7[o]||{},u=y=>!!y&&typeof y!="string",d=u(s)?n(s):s;let h={};return h={cellEditorSelector:y=>{const b=Sw(y);if(!(!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&a))return;let F;return u(r)?F=i(r):F=r,{component:F,params:this.buildCommonCellParams(y)}},singleClickEdit:!0,cellEditorPopup:!0,cellEditorPopupPosition:"under",...c},{headerName:t.headerName,...l,...t,...h,editable:y=>{const b=Sw(y);return!(b!=null&&b.disabled)&&!(b!=null&&b.readOnly)&&a},cellRenderer:d,cellRendererParams:t.cellRendererParams??this.buildCommonCellParams,headerComponentParams:y=>({...typeof t.headerComponentParams=="function"?t.headerComponentParams(y):t.headerComponentParams})}}}_n(Ad,"wrappers",null);function T7(e){return"stopEditing"in e}const P7=lt({name:"AgGridVue3CellWrapper",props:{component:{type:Object,required:!0},params:{type:Object,required:!0},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},value:{type:null,default:void 0},data:{type:Object,default:void 0},id:{type:[String,Number],default:void 0},tooltip:{type:[String,Number],default:void 0},isNoData:{type:Boolean,default:!1},workspaceId:{type:String,default:void 0},entityId:{type:String,default:void 0},axiosService:{type:Object,default:void 0},isSearching:{type:Boolean,default:!1},isFiltering:{type:Boolean,default:!1},sortType:{type:String,default:"default"},maxRating:{type:Number,default:5}},setup(e){var n;const t=((n=e.component)==null?void 0:n.default)||e.component;return t||console.error("[Vue3CellWrapper] Invalid component provided:",e.component),()=>ye(t,{...e})}}),I7=()=>`${Math.max(50,Math.round(I3(0,100)))}%`,A7=8;function T1(e){return class{constructor(){_n(this,"container");_n(this,"vNode",null);_n(this,"componentInstance",null);_n(this,"params");_n(this,"isEditor",!1)}init(n){var c,u,d,h;if(!n){console.error("[Vue3CellWrapper] Missing context information: workspaceId or entityId. Cannot initialize wrapper.");return}const i=performance.now(),o=n.context.apiClass;this.params=n,this.isEditor=T7(n),this.container=document.createElement("div"),this.container.classList.add("ag-vue3-cell-wrapper",`${e.name||"unknown-component"}`),this.container.style.setProperty("--loading-overlay-width",I7()),this.container.style.width="100%",this.container.style.height="100%";const s=Object.freeze(n),r=n,a={component:e,params:s,disabled:!1,readOnly:r.readOnly??!1,value:n.value,maxRating:r.maxRating??void 0,data:n.data,id:(c=n==null?void 0:n.data)==null?void 0:c.id,workspaceId:n.context.workspaceId,entityId:n.context.entityId,axiosService:o,tooltip:r.tooltip??void 0,isSearching:r.isSearching??!1,isNoData:r.isNoData??!1};this.vNode=ye(P7,a),OR(this.vNode,this.container);const l=performance.now()-i;l>A7&&console.warn(`[Vue3CellWrapper] Slow render detected (${l.toFixed(1)}ms) for component "${(u=n.colDef)==null?void 0:u.field}" and field "${(d=n.data)==null?void 0:d.id}"`),this.componentInstance=(h=this.vNode.component)==null?void 0:h.proxy,this.componentInstance||console.warn("[Vue3CellWrapper] Component instance not available after render")}getGui(){return this.container}refresh(n){return!1}getValue(){var n,i,o;return this.params._editorValue!==void 0?this.params._editorValue:this.componentInstance?((o=(i=this.componentInstance).getValue)==null?void 0:o.call(i))??this.componentInstance.value:(console.warn("[Vue3CellWrapper] getValue() called but component instance not available"),(n=this.params)==null?void 0:n.value)}isPopup(){var n;return this.isEditor?(n=this.componentInstance)!=null&&n.isPopup?this.componentInstance.isPopup():!0:!1}getPopupPosition(){var i,o,s;return this.isEditor?(i=this.componentInstance)!=null&&i.getPopupPosition?this.componentInstance.getPopupPosition():((s=(o=this.params)==null?void 0:o.colDef)==null?void 0:s.cellEditorPopupPosition)??"under":void 0}afterGuiAttached(){!this.isEditor||this.componentInstance}destroy(){if(!(!this.container||!this.vNode))try{this.componentInstance&&(typeof this.componentInstance.$destroy=="function"&&this.componentInstance.$destroy(),typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy()),Promise.resolve().then(()=>{try{OR(null,this.container)}catch(n){console.warn("[Vue3CellWrapper] Error during unmount:",n)}})}catch(n){console.error("[Vue3CellWrapper] Error during cleanup:",n)}finally{this.vNode=null,this.componentInstance=null}}}}function eg(e){return T1(e)}function P1(e){return T1(e)}var el=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const i=t?this.allAsyncListeners:this.allSyncListeners;let o=i.get(e);return!o&&n&&(o=new Set,i.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const i=this.getListeners(e,n,!1);i&&(i.delete(t),i.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:i}=this,o=a=>{const l=i?()=>i.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},s=this.getListeners(n,t,!1);if(((s==null?void 0:s.size)??0)>0){const a=new Set(s);for(const l of a)s!=null&&s.has(l)&&o(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)o(()=>l(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function lr(e){return e==null||e===""?null:e}function Ke(e){return e!=null&&e!==""}function fn(e){return!Ke(e)}function Ew(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function kd(e,t){const n=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return n===i}function k7(e,t,n=!1){const i=e==null,o=t==null;if(e!=null&&e.toNumber&&(e=e.toNumber()),t!=null&&t.toNumber&&(t=t.toNumber()),i&&o)return 0;if(i)return-1;if(o)return 1;function s(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!n)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var O7=/[&<>"']/g,M7={"&":"&","<":"<",">":">",'"':""","'":"'"};function _c(e){return(e==null?void 0:e.toString().toString())??null}function Od(e){var t;return((t=_c(e))==null?void 0:t.replace(O7,n=>M7[n]))??null}function Cs(e){return e.eRootDiv.getRootNode()}function wn(e){return Cs(e).activeElement}function Xn(e){const{gos:t,eRootDiv:n}=e;let i=null;const o=t.get("getDocument");return o&&Ke(o)?i=o():n&&(i=n.ownerDocument),i&&Ke(i)?i:document}function I1(e){const t=wn(e);return t===null||t===Xn(e).body}function A1(e){return Xn(e).defaultView||window}function Rw(e){let t=null,n=null;try{t=Xn(e).fullscreenElement}catch{}finally{t||(t=Cs(e));const i=t.querySelector("body");i?n=i:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function L7(e){const t=Rw(e);return(t==null?void 0:t.clientWidth)??(window.innerWidth||-1)}function N7(e){const t=Rw(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function Ko(e,t,n){n==null||typeof n=="string"&&n==""?k1(e,t):wo(e,t,n)}function wo(e,t,n){e.setAttribute(O1(t),n.toString())}function k1(e,t){e.removeAttribute(O1(t))}function O1(e){return`aria-${e}`}function zr(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function V7(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function B7(e){return e.getAttribute("aria-label")}function xc(e,t){Ko(e,"label",t)}function Md(e,t){Ko(e,"labelledby",t)}function M1(e,t){Ko(e,"live",t)}function H7(e,t){Ko(e,"atomic",t)}function G7(e,t){Ko(e,"relevant",t)}function $7(e,t){Ko(e,"invalid",t)}function W7(e,t){Ko(e,"disabled",t)}function L1(e,t){Ko(e,"hidden",t)}function Dw(e,t){wo(e,"expanded",t)}function z7(e,t){wo(e,"setsize",t)}function U7(e,t){wo(e,"posinset",t)}function j7(e,t){wo(e,"multiselectable",t)}function K7(e,t){wo(e,"rowcount",t)}function tg(e,t){wo(e,"rowindex",t)}function q7(e,t){wo(e,"rowspan",t)}function Y7(e,t){wo(e,"colcount",t)}function N1(e,t){wo(e,"colindex",t)}function Z7(e,t){wo(e,"colspan",t)}function X7(e,t){wo(e,"sort",t)}function J7(e){k1(e,"sort")}function V1(e,t){Ko(e,"selected",t)}function Q7(e,t){Ko(e,"controls",t)}function e9(e,t){Q7(e,t.id),Md(t,e.id)}function B1(e,t){Ko(e,"owns",t)}function ng(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var t9="[tabindex], input, select, button, textarea, [href]",H1="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Ld(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(H1)?!1:ws(e)}function pn(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-hidden",!t),i||L1(e,!t)}function n9(e,t,n={}){const{skipAriaHidden:i}=n;e.classList.toggle("ag-invisible",!t),i||L1(e,!t)}function Nd(e,t){const n="disabled",i=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);i(e);const o=e.querySelectorAll("input")??[];for(const s of o)i(s)}function tl(e,t,n){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++i>n)break}else if(e===n)break}return!1}function nl(e){const{height:t,width:n,borderTopWidth:i,borderRightWidth:o,borderBottomWidth:s,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:m}=window.getComputedStyle(e),y=Number.parseFloat;return{height:y(t||"0"),width:y(n||"0"),borderTopWidth:y(i||"0"),borderRightWidth:y(o||"0"),borderBottomWidth:y(s||"0"),borderLeftWidth:y(r||"0"),paddingTop:y(a||"0"),paddingRight:y(l||"0"),paddingBottom:y(c||"0"),paddingLeft:y(u||"0"),marginTop:y(d||"0"),marginRight:y(h||"0"),marginBottom:y(f||"0"),marginLeft:y(g||"0"),boxSizing:m}}function _w(e){const t=nl(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function Vd(e){const t=nl(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function G1(e){const{height:t,marginBottom:n,marginTop:i}=nl(e);return Math.floor(t+n+i)}function ig(e){const{width:t,marginLeft:n,marginRight:i}=nl(e);return Math.floor(t+n+i)}function $1(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:i,borderRightWidth:o,borderBottomWidth:s}=nl(e);return{top:t.top+(n||0),left:t.left+(i||0),right:t.right+(o||0),bottom:t.bottom+(s||0)}}function og(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function sg(e,t,n){n&&(t*=-1),e.scrollLeft=t}function ii(e){for(;e!=null&&e.firstChild;)e.firstChild.remove()}function qo(e){e!=null&&e.parentNode&&e.remove()}function W1(e){return!!e.offsetParent}function ws(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!W1(e)||window.getComputedStyle(e).visibility!=="visible")}function xw(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function z1(e,t,n){n&&n.nextSibling===t||(e.firstChild?n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function U1(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.children[n];o!==i&&e.insertBefore(i,o)}}function i9(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Bd(e,t){if(t)for(const n of Object.keys(t)){const i=t[n];if(!(n!=null&&n.length)||i==null)continue;const o=i9(n),s=i.toString(),r=s.replace(/\s*!important/g,""),a=r.length!=s.length?"important":void 0;e.style.setProperty(o,r,a)}}function rg(e){return()=>{const t=e();return t?Fw(t)||j1(t):!0}}function Fw(e){return e.clientWidth<e.scrollWidth}function j1(e){return e.clientHeight<e.scrollHeight}function ag(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):bs(e,t)}function bs(e,t){t=Tw(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Hd(e,t){t=Tw(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Tw(e){return typeof e=="number"?`${e}px`:e}function Pw(e){return e instanceof Node||e instanceof HTMLElement}function Qi(e,t,n){n==null||n===""?e.removeAttribute(t):e.setAttribute(t,n.toString())}function Ur(e,t,n){const o=A1(e).ResizeObserver,s=o?new o(n):null;return s==null||s.observe(t),()=>s==null?void 0:s.disconnect()}function cr(e,t){const n=A1(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var K1="data-ref",Iw;function q1(){return Iw??(Iw=document.createTextNode(" ")),Iw.cloneNode()}function Gd(e){const{attrs:t,children:n,cls:i,ref:o,role:s,tag:r}=e,a=document.createElement(r);if(i&&(a.className=i),o&&a.setAttribute(K1,o),s&&a.setAttribute("role",s),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(n)if(typeof n=="string")a.textContent=n;else{let l=!0;for(const c of n)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(q1()),l=!1),a.append(Gd(c)),a.appendChild(q1())))}return a}var o9=["touchstart","touchend","touchmove","touchcancel","scroll"],s9=["wheel"],Aw={},Y1=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof Aw[n]=="boolean")return Aw[n];const i=document.createElement(e[n]||"div");return n="on"+n,Aw[n]=n in i}})();function r9(e,t){return!t||!e?!1:l9(t).indexOf(e)>=0}function a9(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function l9(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():a9(t)}function c9(e,t,n){const i=u9(t);let o;i!=null&&(o={passive:i}),e.addEventListener(t,n,o)}var u9=e=>{const t=o9.includes(e),n=s9.includes(e);if(t)return!0;if(n)return!1};function Z1(e,t,n){if(n===0)return!1;const i=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(i,o)<=n}var $d=(e,t)=>{const n=e.identifier;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.identifier===n)return s}return null};function Wd(e,t){return e.gos.isElementInThisInstance(t.target)}function d9(e,t,n){const o=e.getBoundingClientRect().height,s=L7(n)-2,r=N7(n)-2;if(!e.offsetParent)return;const l=$1(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-o/2,h=u-l.left-10;const f=Xn(n),g=f.defaultView||window,m=g.pageYOffset||f.documentElement.scrollTop,y=g.pageXOffset||f.documentElement.scrollLeft;s>0&&h+e.clientWidth>s+y&&(h=s+y-e.clientWidth),h<0&&(h=0),r>0&&d+e.clientHeight>r+m&&(d=r+m-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}var lg=(e,...t)=>{for(const n of t){const[i,o,s,r]=n;i.addEventListener(o,s,r),e.push(n)}},kw=e=>{if(e){for(const[t,n,i,o]of e)t.removeEventListener(n,i,o);e.length=0}},jr=e=>{e.cancelable&&e.preventDefault()};function h9(e,t){return t}function X1(e){return(e==null?void 0:e.getLocaleTextFunc())??h9}function f9(e,t,n,i){const o=t[n];return e.getLocaleTextFunc()(n,typeof o=="function"?o(i):o,i)}function p9(e){return(t,n,i)=>e({key:t,defaultValue:n,variableValues:i})}function g9(e){return(t,n,i)=>{let o=e==null?void 0:e[t];if(o&&(i!=null&&i.length)){let s=0;for(;!(s>=i.length||o.indexOf("${variable}")===-1);)o=o.replace("${variable}",i[s++])}return o??n}}var Ss=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,n){this.localEventService||(this.localEventService=new el),this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){var i;(i=this.localEventService)==null||i.removeEventListener(e,t,n)}dispatchLocalEvent(e){var t;(t=this.localEventService)==null||t.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const n=[];for(const i of Object.keys(t)){const o=t[i];o&&n.push(this._setupListener(e,i,o))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let i;if(m9(e))e.__addEventListener(t,n),i=()=>(e.__removeEventListener(t,n),null);else{const o=v9(e);e instanceof HTMLElement?c9(e,t,n):o?e.addListener(t,n):e.addEventListener(t,n),i=o?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}setupPropertyListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const i=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,i=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=o.changeSet.id}const s={type:"propertyChanged",changeSet:o.changeSet,source:o.source};t(s)};for(const o of e)this.setupPropertyListener(o,i)}getLocaleTextFunc(){return X1(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function m9(e){return e.__addEventListener!==void 0}function v9(e){return e.eventServiceType==="global"}var be=class extends Ss{},J1={};function Ow(e,t){J1[t]||(e(),J1[t]=!0)}var y9={pending:!1,funcs:[]},C9={pending:!1,funcs:[]};function Mw(e,t="setTimeout",n){const i=t==="raf"?C9:y9;if(i.funcs.push(e),i.pending)return;i.pending=!0;const o=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1;for(const r of s)r()};t==="raf"?cr(n,o):window.setTimeout(o,0)}function oi(e,t,n){let i;return function(...o){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,o)},n)}}function Q1(e,t){let n=0;return function(...i){const o=this,s=Date.now();s-n<t||(n=s,e.apply(o,i))}}function w9(e,t,n,i=100){const o=Date.now();let s=null,r=!1;const a=()=>{s!=null&&(window.clearInterval(s),s=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-o>i;(t()||c)&&(n(),r=!0,a())};l(),r||(s=window.setInterval(l,10))}var eI=new Set(["__proto__","constructor","prototype"]);function b9(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(const n of Object.keys(e).filter(i=>!eI.has(i)))t(n,e[n])}}function _i(e,t,n=!0,i=!1){Ke(t)&&b9(t,(o,s)=>{let r=e[o];r!==s&&(i&&r==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(r={},e[o]=r),tI(s)&&tI(r)&&!Array.isArray(r)?_i(r,s,n,i):(n||s!==void 0)&&(e[o]=s))})}function tI(e){return typeof e=="object"&&e!==null}var Lw=class Er{static applyGlobalGridOptions(t){if(!Er.gridOptions)return{...t};let n={};return _i(n,Er.gridOptions,!0,!0),Er.mergeStrategy==="deep"?_i(n,t,!0,!0):n={...n,...t},Er.gridOptions.context&&(n.context=Er.gridOptions.context),t.context&&(Er.mergeStrategy==="deep"&&n.context&&_i(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(Er.mergeStrategy==="deep"){const i=S9(t);if(i&&typeof i=="object"&&typeof n=="object")return Er.applyGlobalGridOptions({[t]:n})[t]}return n}};Lw.gridOptions=void 0,Lw.mergeStrategy="shallow";var Nw=Lw;function S9(e){var t;return(t=Nw.gridOptions)==null?void 0:t[e]}var E9={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},nI="https://www.ag-grid.com";function Kr(e,t,...n){e.get("debug")&&console.log("AG Grid: "+t,...n)}function zd(e,...t){Ow(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Fc(e,...t){Ow(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var iI=new Set,cg={},Tc={},ug,oI=!1,sI=!1,R9=!1;function D9(e){const[t,n]=e.version.split(".")||[],[i,o]=ug.split(".")||[];return t===i&&n===o}function _9(e){var i;ug||(ug=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?D9(e)||Fc(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ug}.`)):Fc(t(`'${e.moduleName}' is incompatible.`));const n=(i=e.validate)==null?void 0:i.call(e);n&&!n.isValid&&Fc(`${n.message}`)}function Ud(e,t,n=!1){n||(oI=!0),_9(e);const i=e.rowModels??["all"];iI.add(e);let o;t!==void 0?(sI=!0,Tc[t]===void 0&&(Tc[t]={}),o=Tc[t]):o=cg;for(const s of i)o[s]===void 0&&(o[s]={}),o[s][e.moduleName]=e;if(e.dependsOn)for(const s of e.dependsOn)Ud(s,t,n)}function x9(e){delete Tc[e]}function Vw(e,t,n){const i=o=>{var s,r,a;return!!((s=cg[o])!=null&&s[e])||!!((a=(r=Tc[t])==null?void 0:r[o])!=null&&a[e])};return i(n)||i("all")}function Bw(){return sI}function F9(e,t){const n=Tc[e]??{};return[...Object.values(cg.all??{}),...Object.values(n.all??{}),...Object.values(cg[t]??{}),...Object.values(n[t]??{})]}function T9(){return new Set(iI)}function P9(){return oI}function I9(){return R9}var A9=class{static register(e){Ud(e,void 0)}static registerModules(e){for(const t of e)Ud(t,void 0)}},Ue="34.3.1",rI=2e3,aI=100,lI="_version_",dg=null,Pc=`${nI}/javascript-data-grid`;function k9(e){dg=e}function O9(e){Pc=e}function cI(e,t,n){return(dg==null?void 0:dg(e,t))??[V9(e,t,n)]}function Hw(e,t,n,i,o){e(`${i?"warning":"error"} #${t}`,...cI(t,n,o))}function M9(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function L9(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=M9(e)),t}function hg(e){return e===void 0?"undefined":e===null?"null":e}function Gw(e,t){return`${e}?${t.toString()}`}function N9(e,t,n){const i=Array.from(t.entries()).sort((s,r)=>r[1].length-s[1].length);let o=Gw(e,t);for(const[s,r]of i){if(s===lI)continue;const a=o.length-n;if(a<=0)break;const l="...",c=a+l.length,u=r.length-c>aI?r.slice(0,r.length-c)+l:r.slice(0,aI)+l;t.set(s,u),o=Gw(e,t)}return o}function uI(e,t){const n=new URLSearchParams;if(n.append(lI,Ue),t)for(const s of Object.keys(t))n.append(s,L9(t[s]));const i=`${Pc}/errors/${e}`,o=Gw(i,n);return o.length<=rI?o:N9(i,n,rI)}var V9=(e,t,n)=>{const i=uI(e,t);return`${`${n?n+`
|
|
110
110
|
`:""}Visit ${i}`}${n?"":`
|
|
111
|
-
Alternatively register the ValidationModule to see the full message in the console.`}`};function Ie(...e){Hw(zd,e[0],e[1],!0)}function tn(...e){Hw(Fc,e[0],e[1],!1)}function jd(e,t,n){Hw(Fc,e,t,!1,n)}function B9(e,t){const n=t[0];return`error #${n} `+cI(n,t[1],e).join(" ")}function Es(...e){return B9(void 0,e)}function dI(e,t){return e.get("rowModelType")===t}function kn(e,t){return dI(e,"clientSide")}function Ic(e,t){return dI(e,"serverSide")}function si(e,t){return e.get("domLayout")===t}function il(e){return gg(e)!==void 0}function hI(e){return typeof e.get("getRowHeight")=="function"}function H9(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function qr(e,t,n=!1,i){const{gos:o,environment:s}=e;if(i==null&&(i=s.getDefaultRowHeight()),hI(o)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},c=o.getCallback("getRowHeight")(l);if($w(c))return c===0&&Ie(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&o.get("masterDetail"))return G9(o);const r=o.get("rowHeight");return{height:r&&$w(r)?r:i,estimated:!1}}function G9(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return $w(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ol(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||fn(i))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(Ie(24),t.getDefaultRowHeight())}function $w(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function fI(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function sl(e,t,n,i){const o=e.getDomDataKey();let s=t[o];fn(s)&&(s={},t[o]=s),s[n]=i}function Ac(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function pI(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||si(e,"print"))}function Rs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Ww(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function gI(e){return e.get("grandTotalRow")}function mI(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function vI(e,t,n){return!!t.group&&!t.footer&&mI(e,n)}function kc(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(Ow(()=>Ie(25,{id:i}),"getRowIdString"),i=String(i)),i}}function $9(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function W9(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Oc(e){return(e==null?void 0:e.checkboxes)??!0}function fg(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function pg(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function zw(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function z9(e){return typeof e.get("rowSelection")!="string"}function ur(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function yI(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return n&&i?!1:n?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function U9(e){const t=yI(e);return t===!0||t==="enableSelection"}function j9(e){const t=yI(e);return t===!0||t==="enableDeselection"}function Uw(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function gg(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Kd(e){return gg(e)==="multiRow"}function K9(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function mg(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return n&&i?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function CI(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function q9(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function qd(e){const t=mg(e);return t==="descendants"||t==="filteredDescendants"}function wI(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Y9(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function eo(e){return e.get("columnMenu")==="legacy"}function Z9(e){return!eo(e)}function X9(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function mt(e,t){return e.addCommon(t)}function bI({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var J9={resizable:!0,sortable:!0},Q9=0;function SI(){return Q9++}function Yr(e){return e instanceof rl}var rl=class extends be{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=SI(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new el,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Od(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:i}}=this;t==null||t.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var o;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((o=this.beans.rowSpanSvc)==null||o.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=Ke(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=Ke(n)&&n.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,i=e.initialWidth;return n!=null?t=n:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,o,s;this.frameworkEventListenerService=(o=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:o.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return mt(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??J9[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return mt(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return fn(this.sort)}isSorting(){return Ke(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Ie(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return mt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(fn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(fn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const i=this.createColumnEvent(e,t);n&&_i(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function fi(e){return e instanceof vg}var vg=class extends be{constructor(e,t,n,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=SI(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Yr(t)?e(t):fi(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Yr(t)?e.push(t):fi(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const i=this.findChildrenRemovingPadding();for(let s=0,r=i.length;s<r;s++){const a=i[s];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const o=e&&t&&n;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)fi(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},eq={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function EI(e,t,n){const i={},o=e.gos;return Object.assign(i,o.get("defaultColGroupDef")),Object.assign(i,t),o.validateColDef(i,n),i}var tq=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ew(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const o=String(i);return e&&n>0&&Ie(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}n++}}};function on(e){if(e!=null&&e.length)return e[e.length-1]}function Zr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o++)if(e[o]!==t[o]&&!(n!=null&&n(e[o],t[o])))return!1;return!0}function Yd(e,t){if(e)for(const n of e)t(n)}function Yo(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function RI(e,t,n){for(let i=0;i<t.length;i++)Yo(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var yg="ag-Grid-AutoColumn",DI="ag-Grid-SelectionColumn",_I="ag-Grid-RowNumbersColumn";function xI(e){const t=[],n=i=>{for(let o=0;o<i.length;o++){const s=i[o];Yr(s)?t.push(s):fi(s)&&n(s.getChildren())}};return n(e),t}function dr(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Cg(e,t,n){const i={};if(!t)return;pr(null,t,s=>{i[s.getInstanceId()]=s}),n&&pr(null,n,s=>{i[s.getInstanceId()]=null});const o=Object.values(i).filter(s=>s!=null);e.context.destroyBeans(o)}function jw(e){return e.getId().startsWith(yg)}function hr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(DI))??!1}function fr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(_I))??!1}function nq(e){return hr(e)||fr(e)}function wg(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function iq(e,t){return Zr(e,t,(n,i)=>n.getColId()===i.getColId())}function oq(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Mc(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Zd(e,t){const n=e===t,i=e.getColDef()===t,o=e.getColId()==t;return n||i||o}var sq=(e,t)=>(n,i)=>{const o={value1:void 0,value2:void 0};let s=!1;return e&&(e[n]!==void 0&&(o.value1=e[n],s=!0),Ke(i)&&e[i]!==void 0&&(o.value2=e[i],s=!0)),!s&&t&&(t[n]!==void 0&&(o.value1=t[n]),Ke(i)&&t[i]!==void 0&&(o.value2=t[i])),o},rq=(e,t)=>{fi(e)&&e.setupExpandable(),e.originalParent=t};function aq(e,t=null,n,i,o){const s=new tq,{existingCols:r,existingGroups:a,existingColKeys:l}=lq(i);s.addExistingKeys(l);const c=FI(e,t,0,n,r,s,a,o),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,s):c;return pr(null,h,rq),{columnTree:h,treeDepth:d}}function lq(e){const t=[],n=[],i=[];return e&&pr(null,e,o=>{if(fi(o)){const s=o;n.push(s)}else{const s=o;i.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function FI(e,t,n,i,o,s,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u<c.length;u++){const d=t[u];l&&pq(d)?c[u]=l.createProvidedColumnGroup(i,d,n,o,s,r,a):c[u]=cq(e,i,d,o,s,a)}return c}function cq(e,t,n,i,o,s){var l;const r=dq(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const c=Kw(e,n,a.getColId());a.setColDef(c,n,s),uq(e,a,c,s)}else{const c=o.getUniqueKey(n.colId,n.field),u=Kw(e,n,c);a=new rl(u,n,c,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function TI(e,t,n,i,o,s,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),s!==void 0&&(c==null||c.setColPinned(t,s)),r!==void 0&&(u==null||u.setColFlex(t,r))}function uq(e,t,n,i){TI(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const s=t.getActualWidth();t.setActualWidth(s,i)}}function dq(e,t){if(t)for(let n=0;n<t.length;n++){const i=t[n].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(i.field===e.field)return{idx:n,column:t[n]};continue}if(i===e)return{idx:n,column:t[n]}}}function Kw(e,t,n,i){const{gos:o,dataTypeSvc:s}=e,r={},a=o.get("defaultColDef");_i(r,a,!1,!0);const l=hq(e,r,t,n);l&&fq(e,l,r);const c=r.cellDataType;_i(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const u=o.get("autoGroupColumnDef"),d=Rs(o);return t.rowGroup&&u&&d&&_i(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),s&&(s.postProcess(r),s.validateColDef(r)),o.validateColDef(r,n,i),r}function hq(e,t,n,i){var r;const o=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),s=n.type??o??t.type;return t.type=s,s?wg(s):void 0}function fq(e,t,n){if(!t.length)return;const i=Object.assign({},eq),o=e.gos.get("columnTypes")||{};for(const s of Object.keys(o)){const r=o[s];s in i?Ie(34,{key:s}):(r.type&&Ie(35),i[s]=r)}for(const s of t){const r=i[s.trim()];r?_i(n,r,!1,!0):Ie(36,{t:s})}}function pq(e){return e.children!==void 0}function pr(e,t,n){if(t)for(let i=0;i<t.length;i++){const o=t[i];fi(o)&&pr(o,o.getChildren(),n),n(o,e)}}function PI(e,t){const n=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...n]:[...n,...i,...o]}function II(e,t){let n=!0;return pr(null,t,i=>{if(!fi(i))return;const o=i,s=o.getColGroupDef();if(!(s==null?void 0:s.marryChildren))return;const a=[];for(const h of o.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,d=o.getLeafColumns().length-1;u>d&&(n=!1)}),n}function AI(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}function kI(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:n})}function gq(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:n})}function mq(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function Lc(e,t,n,i,o=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:n,source:i})}function Zo(e,t,n){var R;const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:s,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:f,gos:g}=e,m=i.getColDefCols()??[],y=a==null?void 0:a.getColumns();if(!m.length&&!(y!=null&&y.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Ie(32),!1;const b=(E,_,I,O,k)=>{if(!E)return;const x=sq(_,t.defaultState),P=x("flex").value1;if(TI(e,E,x("hide").value1,x("sort").value1,x("sortIndex").value1,x("pinned").value1,P,n),P==null){const N=x("width").value1;if(N!=null){const G=E.getColDef().minWidth??d.getDefaultColumnMinWidth();G!=null&&N>=G&&E.setActualWidth(N,n)}}k||!E.isPrimary()||(h==null||h.syncColumnWithState(E,n,x),o==null||o.syncColumnWithState(E,n,x,I),s==null||s.syncColumnWithState(E,n,x,O))},S=(E,_,I)=>{var ue,De;const O=OI(e,n),k=_.slice(),x={},P={},N=[],G=[],ie=[];let B=0;const H=(o==null?void 0:o.columns.slice())??[],X=(s==null?void 0:s.columns.slice())??[];for(const ae of E){const Fe=ae.colId;if(Fe.startsWith(yg)){N.push(ae),ie.push(ae);continue}if(hr(Fe)){G.push(ae),ie.push(ae);continue}const Je=I(Fe);Je?(b(Je,ae,x,P,!1),Yo(k,Je)):(ie.push(ae),B+=1)}const $=ae=>b(ae,null,x,P,!1);k.forEach($),o==null||o.sortColumns(LI.bind(o,x,H)),s==null||s.sortColumns(LI.bind(s,P,X)),i.refreshCols(!1,n);const ce=(ae,Fe,Me=[])=>{for(const Je of Fe){const ft=ae(Je.colId);Yo(Me,ft),b(ft,Je,null,null,!0)}Me.forEach($)};return ce(ae=>(r==null?void 0:r.getColumn(ae))??null,N,(ue=r==null?void 0:r.getColumns())==null?void 0:ue.slice()),ce(ae=>(a==null?void 0:a.getColumn(ae))??null,G,(De=a==null?void 0:a.getColumns())==null?void 0:De.slice()),yq(t,i,g),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),O(),{unmatchedAndAutoStates:ie,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:F,unmatchedCount:C}=S(t.state||[],m,E=>i.getColDefCol(E));if(F.length>0||Ke(t.defaultState)){const E=((R=u==null?void 0:u.getPivotResultCols())==null?void 0:R.list)??[];C=S(F,E,_=>(u==null?void 0:u.getPivotResultCol(_))??null).unmatchedCount}return l==null||l.finish(),C===0}function vq(e,t){var S,F;const{colModel:n,autoColSvc:i,selectionColSvc:o,eventSvc:s,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),c=xI(l),u=[];let d=1e3,h=1e3;const f=C=>{const R=MI(C);fn(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),fn(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),u.push(R)};(S=i==null?void 0:i.getColumns())==null||S.forEach(f),(F=o==null?void 0:o.getColumns())==null||F.forEach(f),c==null||c.forEach(f),Zo(e,{state:u},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(o==null?void 0:o.getColumns())??[],...g,...a].map(C=>({colId:C.colId}));Zo(e,{state:b,applyOrder:!0},t),s.dispatchEvent(mt(r,{type:"columnsReset",source:t}))}function OI(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:o,colModel:s,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(o==null?void 0:o.columns.slice())??[]},c=bg(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(E,_,I,O)=>{const k=_.map(O),x=I.map(O);if(Zr(k,x))return;const N=new Set(_);for(const ie of I)N.delete(ie)||N.add(ie);const G=[...N];a.dispatchEvent({type:E,columns:G,column:G.length===1?G[0]:null,source:t})},h=E=>{const _=[];return s.forAllCols(I=>{const O=u[I.getColId()];O&&E(O,I)&&_.push(I)}),_},f=E=>E.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],f);const m=h((E,_)=>{const I=E.aggFunc!=null,O=I!=_.isValueActive(),k=I&&E.aggFunc!=_.getAggFunc();return O||k});m.length>0&&mq(a,"columnValueChanged",m,t),Lc(a,h((E,_)=>E.width!=_.getActualWidth()),!0,t),kI(a,h((E,_)=>E.pinned!=_.getPinned()),t),gq(a,h((E,_)=>E.hide==_.isVisible()),t);const C=h((E,_)=>E.sort!=_.getSort()||E.sortIndex!=_.getSortIndex());C.length>0&&(r==null||r.dispatchSortChangedEvents(t,C));const R=bg(e);wq(c,R,t,s,a)}}function bg(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,o=t.getColDefCols();if(fn(o)||!t.isAlive())return[];const s=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&s?s.indexOf(u):null,h=u.isPivotActive()&&r?r.indexOf(u):null,f=u.isValueActive()?u.getAggFunc():null,g=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:g,sortIndex:m,aggFunc:f,rowGroup:u.isRowGroupActive(),rowGroupIndex:d,pivot:u.isPivotActive(),pivotIndex:h,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const c=new Map(t.getCols().map((u,d)=>[u.getColId(),d]));return a.sort((u,d)=>{const h=c.has(u.colId)?c.get(u.colId):-1,f=c.has(d.colId)?c.get(d.colId):-1;return h-f}),a}function MI(e){const t=(g,m)=>g??m??null,n=e.getColDef(),i=t(n.sort,n.initialSort),o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&!u&&(c=null,u=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:o,hide:s,pinned:r,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:f}}function yq(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const o of e.state)o.colId!=null&&i.push(o.colId);Cq(t.cols,i,t,n)}function Cq(e,t,n,i){if(e==null)return;let o=[];const s={};for(const a of t){if(s[a])continue;const l=e.map[a];l&&(o.push(l),s[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(s[l]!=null)continue;l.startsWith(yg)?o.splice(r++,0,a):o.push(a)}if(o=PI(o,i),!II(o,n.getColTree())){Ie(39);return}e.list=o}function wq(e,t,n,i,o){const s={};for(const u of t)s[u.colId]=u;const r={};for(const u of e)s[u.colId]&&(r[u.colId]=!0);const a=e.filter(u=>r[u.colId]),l=t.filter(u=>r[u.colId]),c=[];l.forEach((u,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==u.colId){const f=i.getCol(h.colId);f&&c.push(f)}}),c.length&&o.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var LI=(e,t,n,i)=>{const o=e[n.getId()],s=e[i.getId()],r=o!=null,a=s!=null;if(r&&a)return o-s;if(r)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(i),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},bq=class extends be{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Mc(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Mc(e.source)))}createColsFromColDefs(e){var S,F,C;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,u=this.colDefs?OI(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(F=this.colDefCols)==null?void 0:F.tree,f=aq(t,this.colDefs,!0,h,e);Cg(t,(C=this.colDefCols)==null?void 0:C.tree,f.columnTree);const g=f.columnTree,m=f.treeDepth,y=xI(g),b={};for(const R of y)b[R.getId()]=R;this.colDefCols={tree:g,treeDepth:m,list:y,map:b},this.createColumnsForService([c],this.colDefCols,e),o==null||o.extractCols(e,d),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var y;if(!this.colDefCols)return;const n=(y=this.cols)==null?void 0:y.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:o,rowNumbersSvc:s,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:u,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,o,s],f,t);const g=H9(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(f),u.clear(),d.clear(),!Zr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)},n),i.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:i,list:o,tree:s,treeDepth:r}=n??t;return this.cols={list:o.slice(),map:{...i},tree:s.slice(),treeDepth:r},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,o=t==null?void 0:t.isSelectionColumnEnabled(),s=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const c=jw(l);if(i){const u=r==null?void 0:r.includes(l);return c||u||o&&hr(l)||s&&fr(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Zo(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const i=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!n.some(d=>i(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const o=new Map;for(let d=0;d<n.length;d++){const h=n[d];o.set(h,d)}const s=e.list.filter(d=>!o.has(d));if(s.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let g=null,m=null;for(const y of f.getChildren())if(!(y===h||y===d)){if(y instanceof rl){const b=o.get(y);if(b==null)continue;(g==null||g<b)&&(g=b,m=y);continue}y.forEachLeafColumn(b=>{const S=o.get(b);S!=null&&(g==null||g<S)&&(g=S,m=b)})}return m??r(d,f)},a=[],l=new Map;for(const d of s){const h=r(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const c=new Array(e.list.length);let u=c.length-1;for(let d=a.length-1;d>=0;d--)c[u--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let g=f.length-1;g>=0;g--){const m=f[g];c[u--]=m}else c[u--]=f;c[u--]=h}e.list=c}positionLockedCols(e){e.list=PI(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:i}=this.beans;n.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Mc(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Cg(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:o}=this.beans;Yd((s=this.colDefCols)==null?void 0:s.list,e),Yd((r=n==null?void 0:n.columns)==null?void 0:r.list,e),Yd((a=i==null?void 0:i.columns)==null?void 0:a.list,e),Yd((l=o==null?void 0:o.columns)==null?void 0:l.list,e),Yd((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:i}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<i.length;a++)if(Zd(i[a],e))return i[a];const{autoColSvc:o,selectionColSvc:s,groupHierarchyColSvc:r}=this.beans;return(o==null?void 0:o.getColumn(e))??(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},NI=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function Xd(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var je=null;function VI(e){return typeof(e==null?void 0:e.getGui)=="function"}var BI=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},Sq=0,Jd=class extends Ss{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Sq++,this.cssManager=new BI(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const i of this.css??[])this.beans.environment.addGlobalCSS(i,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(K1):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===je)this[t]=i??e;else{const s=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const i of e.childNodes??[])n.push(i);for(const i of n){if(!(i instanceof HTMLElement))continue;const o=this.createComponentFromElement(i,s=>{const r=s.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const s=Array.prototype.slice.call(i.children);o.addItems(s)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,o=this.getDataRefAttribute(e),s=i.indexOf("AG-")===0,r=s?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&o?n[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,n,a),a}swapComponentForNode(e,t,n){const i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let i;typeof e=="string"||e==null?i=xw(e):i=Gd(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const s=t[o];this.componentSelectors.set(s.selector,s)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),Pw(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;n9(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;pn(this.eGui,e,{skipAriaHidden:n});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Xt=class extends Jd{};function HI(e){return typeof e=="object"&&!!e.component}function Eq(e,t){return new Rn(n=>{n(window.setInterval(e,t))})}var Rn=class Ah{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Ah(n=>{let i=t.length;const o=new Array(i);t.forEach((s,r)=>{s.then(a=>{o[r]=a,i--,i===0&&n(o)})})}):Ah.resolve()}static resolve(t=null){return new Ah(n=>n(t))}then(t){return new Ah(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(i=>n(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function Rq(e){return e?e.prototype&&"getGui"in e.prototype:!1}function GI(e,t,n,i){const{name:o}=n;let s,r,a,l,c,u;if(t){const d=t,h=d[o+"Selector"],f=h?h(i):null,g=m=>{typeof m=="string"?s=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};f?(g(f.component),l=f.params,c=f.popup,u=f.popupPosition):g(d[o])}return{compName:s,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var Dq=class extends be{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,i=!1){return this.getCompDetails(this.gridOptions,e,t,n,i)}getCompDetails(e,t,n,i,o=!1){var F;const{name:s,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=GI(this.beans.frameworkOverrides,e,t,i),f,g;const m=C=>{const R=this.registry.getUserComponent(s,C);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,f=R.params,g=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&n!=null&&m(n),l&&r&&!Rq(l)&&(l=(F=this.agCompUtils)==null?void 0:F.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;o&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||tn(50,{compName:a}):n?C||tn(260,{...this.gos.getModuleErrorParams(),propName:s,compName:n}):tn(216,{name:s}):n&&!C&&tn(146,{comp:n});return}const y=this.mergeParams(e,t,i,u,f,g),b=l==null,S=l??c;return{componentFromFramework:b,componentClass:S,params:y,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,b,y,t)}}newAgStackInstance(e,t,n,i){var a;const o=!t;let s;o?s=new e:s=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const r=(a=s.init)==null?void 0:a.call(s,n);return r==null?Rn.resolve(s):r.then(()=>s)}mergeParams(e,t,n,i=null,o,s){const r={...n,...o},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const c=l(n);_i(r,c)}else typeof l=="object"&&_i(r,l);return _i(r,i),s?s(r):r}},_q={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},xq={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Fq={name:"headerComponent",optionalMethods:["refresh"]},Tq={name:"innerHeaderComponent"},Pq={name:"innerHeaderGroupComponent"},Iq={name:"headerGroupComponent"},Aq={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},kq={name:"loadingCellRenderer",cellRenderer:!0},Oq={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Mq={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Lq={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Nq={name:"tooltipComponent"},qw={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Vq={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Bq={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Hq={name:"loadingCellRenderer",cellRenderer:!0},Gq={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},$q={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Wq(e,t){return e.getCompDetailsFromGridOptions(xq,"agDragAndDropImage",t,!0)}function zq(e,t,n){return e.getCompDetails(t,Fq,"agColumnHeader",n)}function Uq(e,t,n){return e.getCompDetails(t,Tq,void 0,n)}function jq(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Iq,"agColumnGroupHeader",t)}function Kq(e,t,n){return e.getCompDetails(t,Pq,void 0,n)}function qq(e,t){return e.getCompDetailsFromGridOptions(Bq,void 0,t,!0)}function Yq(e,t){return e.getCompDetailsFromGridOptions(Hq,"agLoadingCellRenderer",t,!0)}function Zq(e,t){return e.getCompDetailsFromGridOptions(Gq,"agGroupRowRenderer",t,!0)}function Xq(e,t){return e.getCompDetailsFromGridOptions($q,"agDetailCellRenderer",t,!0)}function $I(e,t,n){return e.getCompDetails(t,Aq,void 0,n)}function WI(e,t,n){return e.getCompDetails(t,kq,"agSkeletonCellRenderer",n,!0)}function zI(e,t,n){return e.getCompDetails(t,Oq,"agCellEditor",n,!0)}function Jq(e,t,n,i){const o=t.filter;return HI(o)&&(t={filter:o.component,filterParams:t.filterParams}),e.getCompDetails(t,qw,i,n,!0)}function Qq(e,t,n){return e.getCompDetails(t,_q,"agDateInput",n,!0)}function eY(e,t){return e.getCompDetailsFromGridOptions(Mq,"agLoadingOverlay",t,!0)}function tY(e,t){return e.getCompDetailsFromGridOptions(Lq,"agNoRowsOverlay",t,!0)}function nY(e,t){return e.getCompDetails(t.colDef,Nq,"agTooltipComponent",t,!0)}function iY(e,t,n,i){return e.getCompDetails(t,Vq,i,n)}function UI(e,t){return GI(e,t,qw)}function Yw(e,t,n){return e.mergeParams(t,qw,n)}function Qd(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function oY(e){return typeof e=="object"&&!!e.getComp}var de={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Zw=class extends Jd{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Xw,Jw,Qw,eb,tb,nb,ib;function Xr(){return Xw===void 0&&(Xw=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Xw}function jI(){return Jw===void 0&&(Jw=/(firefox)/i.test(navigator.userAgent)),Jw}function KI(){return Qw===void 0&&(Qw=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Qw}function al(){return eb===void 0&&(eb=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),eb}function ob(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!jI())?null:t.toString()}function sY(){if(ib!==void 0)return ib;if(!document.body)return-1;let e=1e6;const t=jI()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const i=e*2;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return n.remove(),ib=e,e}function rY(){return nb==null&&qI(),nb}function qI(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(nb=n,tb=n===0)}function YI(){return tb==null&&qI(),tb}var sb="T",aY=new RegExp(`[${sb} ]`),lY=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${sb}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ds(e,t){return e.toString().padStart(t,"0")}function to(e,t=!0,n=sb){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>Ds(o,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>Ds(o,2)).join(":")),i}function Sg(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ds(e.getDate(),2),Ds(e.getHours(),2),`:${Ds(e.getMinutes(),2)}`,`:${Ds(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ds(e.getDate(),2)].map(String):null}var rb=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},ZI=["January","February","March","April","May","June","July","August","September","October","November","December"],ab=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function lb(e,t){if(t==null)return to(e,!1);const n=Ds(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>ZI[e.getMonth()],MMM:()=>ZI[e.getMonth()].slice(0,3),MM:()=>Ds(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${rb(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${rb(e.getDate())}`,DD:()=>Ds(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ab[e.getDay()],ddd:()=>ab[e.getDay()].slice(0,3),dd:()=>ab[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${rb(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,s=>s in i?i[s]():s)}function Eg(e,t=!1){return!!Oi(e,t)}function cY(e){return Eg(e,!0)}function Oi(e,t=!1,n){if(!e||!n&&!lY.test(e))return null;const[i,o]=e.split(aY);if(!i)return null;const s=i.split("-").map(f=>Number.parseInt(f,10));if(s.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!o&&t)return null;if(!o||o==="00:00:00")return c;const[u,d,h]=o.split(":").map(f=>Number.parseInt(f,10));if(u>=0&&u<24)c.setHours(u);else if(t)return null;if(d>=0&&d<60)c.setMinutes(d);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function cb(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let s=(n??[]).map((l,c)=>({value:l,relevance:uY(t,l),idx:c}));if(s.sort((l,c)=>l.relevance-c.relevance),i&&(s=s.filter(l=>l.relevance<Math.max(l.value.length,t.length))),s.length>0&&o&&o>0){const c=s[0].relevance*o;s=s.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of s)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function uY(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const o=e.length,s=t.length;for(let a=0;a<=s;a++)n[a]=a;let r=0;for(let a=1;a<=o;a++){i[0]=a;for(let l=1;l<=s;l++){const c=e[a-1],u=t[l-1];if(c.toLocaleLowerCase()===u.toLocaleLowerCase())++r,c===u&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<o/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],f=n[l-1];i[l]=1+Math.min(d,h,f)}}[n,i]=[i,n]}return n[s]/(r+1)}function XI(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var ub=!1,Rg=0;function dY(e){Rg>0||(e.addEventListener("keydown",Dg),e.addEventListener("mousedown",Dg))}function hY(e){Rg>0||(e.removeEventListener("keydown",Dg),e.removeEventListener("mousedown",Dg))}function Dg(e){const t=ub,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(ub=n)}function fY(e){const t=Xn(e);return dY(t),Rg++,()=>{Rg--,hY(t)}}function pY(){return ub}function Nc(e,t,n=!1){const i=t9;let o=H1;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>ws(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(s,r):s}function ll(e,t=!1,n=!1,i=!1){const o=Nc(e,i?".ag-tab-guard":null,n),s=t?on(o):o[0];return s?(s.focus({preventScroll:!0}),!0):!1}function cl(e,t,n,i){const o=Nc(t,n?':not([tabindex="-1"])':null),s=wn(e);let r;n?r=o.findIndex(l=>l.contains(s)):r=o.indexOf(s);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function JI(e,t=5){let n=0;for(;e&&ob(e)===null&&++n<=t;)e=e.parentElement;return ob(e)===null?null:e}var gY=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",mY=class extends Jd{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(gY)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ii(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(pn(t,!1),zr(t,"presentation")):(pn(t,!0),zr(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(ag(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Nd(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},QI=class extends mY{constructor(e,t,n,i){super(e,t,n),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||B7(e)!==null?Md(e,""):Md(e,t??"")}setAriaLabel(e){return xc(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return bs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function vY(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var ul=class extends QI{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??vY(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=je,this.eWrapper=je,this.eInput=je}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),n.classList.add(`${i}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:s}=this.config;o!=null&&this.setInputName(o),s!=null&&this.setInputWidth(s),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Qi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return ag(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Qi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return xc(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Nd(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Qi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Qi(this.eInput,"autocomplete",t)}return this}},db=class extends ul{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},hb={selector:"AG-CHECKBOX",component:db},yY=class extends db{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},dl=class extends ul{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=Ke(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{XI(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var o;const i=(o=n.clipboardData)==null?void 0:o.getData("text");i!=null&&i.split("").some(s=>!e.test(s))&&n.preventDefault()}})}},_g={selector:"AG-INPUT-TEXT-FIELD",component:dl},CY=class extends ul{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},wY={selector:"AG-INPUT-TEXT-AREA",component:CY},fb=class extends dl{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const s=Number.parseFloat(e.value),r=isNaN(s)?"":this.normalizeValue(s.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){wn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Qi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Qi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Qi(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(Ke(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},bY={selector:"AG-INPUT-NUMBER-FIELD",component:fb},SY=class extends dl{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Xr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){wn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?to(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Qi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?to(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Qi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Qi(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Oi(this.getValue())??void 0}setDate(e,t){this.setValue(to(e??null,this.includeTime),t)}},eA={selector:"AG-INPUT-DATE-FIELD",component:SY},EY=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",RY="ag-active-item",DY=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),_Y=class extends Jd{constructor(e,t,n){super(DY(e,t)),this.label=t,this.value=n,this.eText=je}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(RY,e),V1(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();U7(n,e),z7(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Fw(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},xY=class extends Jd{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(EY)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case de.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case de.DOWN:case de.UP:e.preventDefault(),this.navigate(t);break;case de.PAGE_DOWN:case de.PAGE_UP:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();ii(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!ws(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:s,offsetHeight:r}=t;(s+r>i+o||s<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new _Y(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===de.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:on(i);else{let r=i.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),n=i[r]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,s=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/s);let a=-1;e===de.PAGE_HOME?a=0:e===de.PAGE_END?a=o:e===de.PAGE_DOWN?a=Math.min(i+r,o):e===de.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){zr(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},FY=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",TY={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},PY=class extends QI{constructor(e){if(super(e,(e==null?void 0:e.template)||TY,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=je,this.eWrapper=je,this.eDisplayField=je,this.eIcon=je,this.registerCSS(FY),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),s!=null&&this.setPickerMaxWidth(s)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Dw(e,!1),this.ariaRole&&zr(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case de.UP:case de.DOWN:case de.ENTER:case de.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case de.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:s,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=I1(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=Tw(ig(u)),a&&(e.style.maxWidth=a)):ag(e,a??ig(u));const g=s??`${_w(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:s}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:s.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Dw(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return ag(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},IY=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",pb=class extends PY{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(IY)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:rg(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new xY("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),e9(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===de.TAB&&this.hidePicker(),t){case de.ENTER:case de.UP:case de.DOWN:case de.PAGE_UP:case de.PAGE_DOWN:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case de.ESCAPE:super.onKeyDown(e);break;case de.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:s,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),s.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AY={selector:"AG-SELECT",component:pb},kY=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',gb=typeof window!="object"||!((HM=(BM=window==null?void 0:window.document)==null?void 0:BM.fonts)!=null&&HM.forEach),Vc=(e,t,n,i,o,s)=>{if(gb)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Bc.map.get(t);if(r||(r=[],Bc.map.set(t,r)),r.some(u=>u.css===e))return;const a=document.createElement("style");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:o};let c;for(const u of r){if(u.priority>o)break;c=u}if(c){c.el.insertAdjacentElement("afterend",a);const u=r.indexOf(c);r.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},tA=(e,t,n,i)=>{Vc(kY,e,"shared",t,0,n),i==null||i.forEach((o,s)=>o.forEach(r=>Vc(r,e,s,t,0,n)))},OY=e=>{Bc.grids.add(e)},MY=e=>{if(Bc.grids.delete(e),Bc.grids.size===0){Bc.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},nA,Bc=(nA=typeof window=="object"?window:{}).agStyleInjectionState??(nA.agStyleInjectionState={map:new WeakMap,grids:new Set}),_s=e=>new iA(e),Jr="$default",LY=0,iA=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[Jr]:{...n[Jr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:o}=this;if(o){const s=`ag-theme-${this.feature??"part"}-${++LY}`;typeof o=="function"&&(o=o()),o=`:where(.${s}) {
|
|
111
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function Ie(...e){Hw(zd,e[0],e[1],!0)}function tn(...e){Hw(Fc,e[0],e[1],!1)}function jd(e,t,n){Hw(Fc,e,t,!1,n)}function B9(e,t){const n=t[0];return`error #${n} `+cI(n,t[1],e).join(" ")}function Es(...e){return B9(void 0,e)}function dI(e,t){return e.get("rowModelType")===t}function kn(e,t){return dI(e,"clientSide")}function Ic(e,t){return dI(e,"serverSide")}function si(e,t){return e.get("domLayout")===t}function il(e){return gg(e)!==void 0}function hI(e){return typeof e.get("getRowHeight")=="function"}function H9(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function qr(e,t,n=!1,i){const{gos:o,environment:s}=e;if(i==null&&(i=s.getDefaultRowHeight()),hI(o)){if(n)return{height:i,estimated:!0};const l={node:t,data:t.data},c=o.getCallback("getRowHeight")(l);if($w(c))return c===0&&Ie(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&o.get("masterDetail"))return G9(o);const r=o.get("rowHeight");return{height:r&&$w(r)?r:i,estimated:!1}}function G9(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return $w(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ol(e){const{environment:t,gos:n}=e,i=n.get("rowHeight");if(!i||fn(i))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(Ie(24),t.getDefaultRowHeight())}function $w(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function fI(e,t,n){const i=t[e.getDomDataKey()];return i?i[n]:void 0}function sl(e,t,n,i){const o=e.getDomDataKey();let s=t[o];fn(s)&&(s={},t[o]=s),s[n]=i}function Ac(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function pI(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||si(e,"print"))}function Rs(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Ww(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function gI(e){return e.get("grandTotalRow")}function mI(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function vI(e,t,n){return!!t.group&&!t.footer&&mI(e,n)}function kc(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let i=t(n);return typeof i!="string"&&(Ow(()=>Ie(25,{id:i}),"getRowIdString"),i=String(i)),i}}function $9(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function W9(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Oc(e){return(e==null?void 0:e.checkboxes)??!0}function fg(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function pg(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function zw(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function z9(e){return typeof e.get("rowSelection")!="string"}function ur(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function yI(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return n&&i?!1:n?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function U9(e){const t=yI(e);return t===!0||t==="enableSelection"}function j9(e){const t=yI(e);return t===!0||t==="enableDeselection"}function Uw(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function gg(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Kd(e){return gg(e)==="multiRow"}function K9(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function mg(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return n&&i?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function CI(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function q9(e){const t=e.get("rowSelection");return typeof t=="string"?!1:(t==null?void 0:t.mode)==="multiRow"?t.ctrlASelectsRows??!1:!1}function qd(e){const t=mg(e);return t==="descendants"||t==="filteredDescendants"}function wI(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Y9(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function eo(e){return e.get("columnMenu")==="legacy"}function Z9(e){return!eo(e)}function X9(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function mt(e,t){return e.addCommon(t)}function bI({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var J9={resizable:!0,sortable:!0},Q9=0;function SI(){return Q9++}function Yr(e){return e instanceof rl}var rl=class extends be{constructor(e,t,n,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=i,this.isColumn=!0,this.instanceId=SI(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new el,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Od(n)}destroy(){var e;super.destroy(),(e=this.beans.rowSpanSvc)==null||e.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:i}}=this;t==null||t.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,n==null||n.initCol(this),i==null||i.initCol(this)}setColDef(e,t,n){var o;const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&((o=this.beans.rowSpanSvc)==null||o.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:n}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=Ke(t)&&t.includes(".")&&!i,this.tooltipFieldContainsDots=Ke(n)&&n.includes(".")&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}initRowSpan(){var e;this.colDef.spanRows&&((e=this.beans.rowSpanSvc)==null||e.register(this))}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:n=>{const i=e.recreateColDef(this.colDef);this.setColDef(i,i,n.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,i=e.initialWidth;return n!=null?t=n:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){var i,o,s;this.frameworkEventListenerService=(o=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:o.call(i,this.frameworkEventListenerService,this.colEventSvc);const n=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(e,t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var i;const n=((i=this.frameworkEventListenerService)==null?void 0:i.unwrap(e,t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return mt(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable({rowNode:e,column:this}))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??J9[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return mt(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return fn(this.sort)}isSorting(){return Ke(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return Ie(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e!=null&&e.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!(e!=null&&e.isPadding()))return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return mt(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(fn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(fn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const i=this.createColumnEvent(e,t);n&&_i(i,n),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function fi(e){return e instanceof vg}var vg=class extends be{constructor(e,t,n,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=SI(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Yr(t)?e(t):fi(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Yr(t)?e.push(t):fi(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const i=this.findChildrenRemovingPadding();for(let s=0,r=i.length;s<r;s++){const a=i[s];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,n=!0):l==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const o=e&&t&&n;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=n=>{for(const i of n)fi(i)&&i.isPadding()?t(i.children):e.push(i)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},eq={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function EI(e,t,n){const i={},o=e.gos;return Object.assign(i,o.get("defaultColGroupDef")),Object.assign(i,t),o.validateColDef(i,n),i}var tq=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Ew(e);let n=0;for(;;){let i=e??t;if(i?n!==0&&(i+="_"+n):i=n,!this.existingKeys[i]){const o=String(i);return e&&n>0&&Ie(273,{providedId:e,usedId:o}),this.existingKeys[o]=!0,o}n++}}};function on(e){if(e!=null&&e.length)return e[e.length-1]}function Zr(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const i=e.length;if(i!==t.length)return!1;for(let o=0;o<i;o++)if(e[o]!==t[o]&&!(n!=null&&n(e[o],t[o])))return!1;return!0}function Yd(e,t){if(e)for(const n of e)t(n)}function Yo(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function RI(e,t,n){for(let i=0;i<t.length;i++)Yo(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(n,0,t[i])}var yg="ag-Grid-AutoColumn",DI="ag-Grid-SelectionColumn",_I="ag-Grid-RowNumbersColumn";function xI(e){const t=[],n=i=>{for(let o=0;o<i.length;o++){const s=i[o];Yr(s)?t.push(s):fi(s)&&n(s.getChildren())}};return n(e),t}function dr(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}function Cg(e,t,n){const i={};if(!t)return;pr(null,t,s=>{i[s.getInstanceId()]=s}),n&&pr(null,n,s=>{i[s.getInstanceId()]=null});const o=Object.values(i).filter(s=>s!=null);e.context.destroyBeans(o)}function jw(e){return e.getId().startsWith(yg)}function hr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(DI))??!1}function fr(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(_I))??!1}function nq(e){return hr(e)||fr(e)}function wg(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function iq(e,t){return Zr(e,t,(n,i)=>n.getColId()===i.getColId())}function oq(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Mc(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Zd(e,t){const n=e===t,i=e.getColDef()===t,o=e.getColId()==t;return n||i||o}var sq=(e,t)=>(n,i)=>{const o={value1:void 0,value2:void 0};let s=!1;return e&&(e[n]!==void 0&&(o.value1=e[n],s=!0),Ke(i)&&e[i]!==void 0&&(o.value2=e[i],s=!0)),!s&&t&&(t[n]!==void 0&&(o.value1=t[n]),Ke(i)&&t[i]!==void 0&&(o.value2=t[i])),o},rq=(e,t)=>{fi(e)&&e.setupExpandable(),e.originalParent=t};function aq(e,t=null,n,i,o){const s=new tq,{existingCols:r,existingGroups:a,existingColKeys:l}=lq(i);s.addExistingKeys(l);const c=FI(e,t,0,n,r,s,a,o),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,s):c;return pr(null,h,rq),{columnTree:h,treeDepth:d}}function lq(e){const t=[],n=[],i=[];return e&&pr(null,e,o=>{if(fi(o)){const s=o;n.push(s)}else{const s=o;i.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:n,existingColKeys:i}}function FI(e,t,n,i,o,s,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u<c.length;u++){const d=t[u];l&&pq(d)?c[u]=l.createProvidedColumnGroup(i,d,n,o,s,r,a):c[u]=cq(e,i,d,o,s,a)}return c}function cq(e,t,n,i,o,s){var l;const r=dq(n,i);r&&(i==null||i.splice(r.idx,1));let a=r==null?void 0:r.column;if(a){const c=Kw(e,n,a.getColId());a.setColDef(c,n,s),uq(e,a,c,s)}else{const c=o.getUniqueKey(n.colId,n.field),u=Kw(e,n,c);a=new rl(u,n,c,t),e.context.createBean(a)}return(l=e.dataTypeSvc)==null||l.addColumnListeners(a),a}function TI(e,t,n,i,o,s,r,a){const{sortSvc:l,pinnedCols:c,colFlex:u}=e;n!==void 0&&t.setVisible(!n,a),l&&(l.updateColSort(t,i,a),o!==void 0&&l.setColSortIndex(t,o)),s!==void 0&&(c==null||c.setColPinned(t,s)),r!==void 0&&(u==null||u.setColFlex(t,r))}function uq(e,t,n,i){TI(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,i);const o=t.getFlex();if(!(o!=null&&o>0))if(n.width!=null)t.setActualWidth(n.width,i);else{const s=t.getActualWidth();t.setActualWidth(s,i)}}function dq(e,t){if(t)for(let n=0;n<t.length;n++){const i=t[n].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(i.field===e.field)return{idx:n,column:t[n]};continue}if(i===e)return{idx:n,column:t[n]}}}function Kw(e,t,n,i){const{gos:o,dataTypeSvc:s}=e,r={},a=o.get("defaultColDef");_i(r,a,!1,!0);const l=hq(e,r,t,n);l&&fq(e,l,r);const c=r.cellDataType;_i(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const u=o.get("autoGroupColumnDef"),d=Rs(o);return t.rowGroup&&u&&d&&_i(r,{sort:u.sort,initialSort:u.initialSort},!1,!0),s&&(s.postProcess(r),s.validateColDef(r)),o.validateColDef(r,n,i),r}function hq(e,t,n,i){var r;const o=(r=e.dataTypeSvc)==null?void 0:r.updateColDefAndGetColumnType(t,n,i),s=n.type??o??t.type;return t.type=s,s?wg(s):void 0}function fq(e,t,n){if(!t.length)return;const i=Object.assign({},eq),o=e.gos.get("columnTypes")||{};for(const s of Object.keys(o)){const r=o[s];s in i?Ie(34,{key:s}):(r.type&&Ie(35),i[s]=r)}for(const s of t){const r=i[s.trim()];r?_i(n,r,!1,!0):Ie(36,{t:s})}}function pq(e){return e.children!==void 0}function pr(e,t,n){if(t)for(let i=0;i<t.length;i++){const o=t[i];fi(o)&&pr(o,o.getChildren(),n),n(o,e)}}function PI(e,t){const n=[],i=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?n.push(r):i.push(r)}),t.get("enableRtl")?[...o,...i,...n]:[...n,...i,...o]}function II(e,t){let n=!0;return pr(null,t,i=>{if(!fi(i))return;const o=i,s=o.getColGroupDef();if(!(s==null?void 0:s.marryChildren))return;const a=[];for(const h of o.getLeafColumns()){const f=e.indexOf(h);a.push(f)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,d=o.getLeafColumns().length-1;u>d&&(n=!1)}),n}function AI(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let i=1;i<e.length;i++)if(n!==t(e[i]))return;return n}function kI(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:i,source:n})}function gq(e,t,n){if(!t.length)return;const i=t.length===1?t[0]:null,o=AI(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:i,source:n})}function mq(e,t,n,i){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:i})}function Lc(e,t,n,i,o=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:n,source:i})}function Zo(e,t,n){var R;const{colModel:i,rowGroupColsSvc:o,pivotColsSvc:s,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:f,gos:g}=e,m=i.getColDefCols()??[],y=a==null?void 0:a.getColumns();if(!m.length&&!(y!=null&&y.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return Ie(32),!1;const b=(E,_,I,O,k)=>{if(!E)return;const x=sq(_,t.defaultState),P=x("flex").value1;if(TI(e,E,x("hide").value1,x("sort").value1,x("sortIndex").value1,x("pinned").value1,P,n),P==null){const N=x("width").value1;if(N!=null){const G=E.getColDef().minWidth??d.getDefaultColumnMinWidth();G!=null&&N>=G&&E.setActualWidth(N,n)}}k||!E.isPrimary()||(h==null||h.syncColumnWithState(E,n,x),o==null||o.syncColumnWithState(E,n,x,I),s==null||s.syncColumnWithState(E,n,x,O))},S=(E,_,I)=>{var ue,De;const O=OI(e,n),k=_.slice(),x={},P={},N=[],G=[],ie=[];let B=0;const H=(o==null?void 0:o.columns.slice())??[],X=(s==null?void 0:s.columns.slice())??[];for(const ae of E){const Fe=ae.colId;if(Fe.startsWith(yg)){N.push(ae),ie.push(ae);continue}if(hr(Fe)){G.push(ae),ie.push(ae);continue}const Je=I(Fe);Je?(b(Je,ae,x,P,!1),Yo(k,Je)):(ie.push(ae),B+=1)}const $=ae=>b(ae,null,x,P,!1);k.forEach($),o==null||o.sortColumns(LI.bind(o,x,H)),s==null||s.sortColumns(LI.bind(s,P,X)),i.refreshCols(!1,n);const ce=(ae,Fe,Me=[])=>{for(const Je of Fe){const pt=ae(Je.colId);Yo(Me,pt),b(pt,Je,null,null,!0)}Me.forEach($)};return ce(ae=>(r==null?void 0:r.getColumn(ae))??null,N,(ue=r==null?void 0:r.getColumns())==null?void 0:ue.slice()),ce(ae=>(a==null?void 0:a.getColumn(ae))??null,G,(De=a==null?void 0:a.getColumns())==null?void 0:De.slice()),yq(t,i,g),c.refresh(n),f.dispatchEvent({type:"columnEverythingChanged",source:n}),O(),{unmatchedAndAutoStates:ie,unmatchedCount:B}};l==null||l.start();let{unmatchedAndAutoStates:F,unmatchedCount:C}=S(t.state||[],m,E=>i.getColDefCol(E));if(F.length>0||Ke(t.defaultState)){const E=((R=u==null?void 0:u.getPivotResultCols())==null?void 0:R.list)??[];C=S(F,E,_=>(u==null?void 0:u.getPivotResultCol(_))??null).unmatchedCount}return l==null||l.finish(),C===0}function vq(e,t){var S,F;const{colModel:n,autoColSvc:i,selectionColSvc:o,eventSvc:s,gos:r}=e,a=n.getColDefCols();if(!(a!=null&&a.length))return;const l=n.getColDefColTree(),c=xI(l),u=[];let d=1e3,h=1e3;const f=C=>{const R=MI(C);fn(R.rowGroupIndex)&&R.rowGroup&&(R.rowGroupIndex=d++),fn(R.pivotIndex)&&R.pivot&&(R.pivotIndex=h++),u.push(R)};(S=i==null?void 0:i.getColumns())==null||S.forEach(f),(F=o==null?void 0:o.getColumns())==null||F.forEach(f),c==null||c.forEach(f),Zo(e,{state:u},t);const g=(i==null?void 0:i.getColumns())??[],b=[...(o==null?void 0:o.getColumns())??[],...g,...a].map(C=>({colId:C.colId}));Zo(e,{state:b,applyOrder:!0},t),s.dispatchEvent(mt(r,{type:"columnsReset",source:t}))}function OI(e,t){const{rowGroupColsSvc:n,pivotColsSvc:i,valueColsSvc:o,colModel:s,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(i==null?void 0:i.columns.slice())??[],valueColumns:(o==null?void 0:o.columns.slice())??[]},c=bg(e),u={};for(const d of c)u[d.colId]=d;return()=>{const d=(E,_,I,O)=>{const k=_.map(O),x=I.map(O);if(Zr(k,x))return;const N=new Set(_);for(const ie of I)N.delete(ie)||N.add(ie);const G=[...N];a.dispatchEvent({type:E,columns:G,column:G.length===1?G[0]:null,source:t})},h=E=>{const _=[];return s.forAllCols(I=>{const O=u[I.getColId()];O&&E(O,I)&&_.push(I)}),_},f=E=>E.getColId();d("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],f),d("columnPivotChanged",l.pivotColumns,(i==null?void 0:i.columns)??[],f);const m=h((E,_)=>{const I=E.aggFunc!=null,O=I!=_.isValueActive(),k=I&&E.aggFunc!=_.getAggFunc();return O||k});m.length>0&&mq(a,"columnValueChanged",m,t),Lc(a,h((E,_)=>E.width!=_.getActualWidth()),!0,t),kI(a,h((E,_)=>E.pinned!=_.getPinned()),t),gq(a,h((E,_)=>E.hide==_.isVisible()),t);const C=h((E,_)=>E.sort!=_.getSort()||E.sortIndex!=_.getSortIndex());C.length>0&&(r==null||r.dispatchSortChangedEvents(t,C));const R=bg(e);wq(c,R,t,s,a)}}function bg(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:i}=e,o=t.getColDefCols();if(fn(o)||!t.isAlive())return[];const s=n==null?void 0:n.columns,r=i==null?void 0:i.columns,a=[],l=u=>{const d=u.isRowGroupActive()&&s?s.indexOf(u):null,h=u.isPivotActive()&&r?r.indexOf(u):null,f=u.isValueActive()?u.getAggFunc():null,g=u.getSort()!=null?u.getSort():null,m=u.getSortIndex()!=null?u.getSortIndex():null;a.push({colId:u.getColId(),width:u.getActualWidth(),hide:!u.isVisible(),pinned:u.getPinned(),sort:g,sortIndex:m,aggFunc:f,rowGroup:u.isRowGroupActive(),rowGroupIndex:d,pivot:u.isPivotActive(),pivotIndex:h,flex:u.getFlex()??null})};t.forAllCols(u=>l(u));const c=new Map(t.getCols().map((u,d)=>[u.getColId(),d]));return a.sort((u,d)=>{const h=c.has(u.colId)?c.get(u.colId):-1,f=c.has(d.colId)?c.get(d.colId):-1;return h-f}),a}function MI(e){const t=(g,m)=>g??m??null,n=e.getColDef(),i=t(n.sort,n.initialSort),o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),r=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&!u&&(c=null,u=null);let d=t(n.pivotIndex,n.initialPivotIndex),h=t(n.pivot,n.initialPivot);d==null&&!h&&(d=null,h=null);const f=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:o,hide:s,pinned:r,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:f}}function yq(e,t,n){if(!e.applyOrder||!e.state)return;const i=[];for(const o of e.state)o.colId!=null&&i.push(o.colId);Cq(t.cols,i,t,n)}function Cq(e,t,n,i){if(e==null)return;let o=[];const s={};for(const a of t){if(s[a])continue;const l=e.map[a];l&&(o.push(l),s[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(s[l]!=null)continue;l.startsWith(yg)?o.splice(r++,0,a):o.push(a)}if(o=PI(o,i),!II(o,n.getColTree())){Ie(39);return}e.list=o}function wq(e,t,n,i,o){const s={};for(const u of t)s[u.colId]=u;const r={};for(const u of e)s[u.colId]&&(r[u.colId]=!0);const a=e.filter(u=>r[u.colId]),l=t.filter(u=>r[u.colId]),c=[];l.forEach((u,d)=>{const h=a==null?void 0:a[d];if(h&&h.colId!==u.colId){const f=i.getCol(h.colId);f&&c.push(f)}}),c.length&&o.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var LI=(e,t,n,i)=>{const o=e[n.getId()],s=e[i.getId()],r=o!=null,a=s!=null;if(r&&a)return o-s;if(r)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(i),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},bq=class extends be{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Mc(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Mc(e.source)))}createColsFromColDefs(e){var S,F,C;const{beans:t}=this,{valueCache:n,colAutosize:i,rowGroupColsSvc:o,pivotColsSvc:s,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,u=this.colDefs?OI(t,e):void 0;n==null||n.expire();const d=(S=this.colDefCols)==null?void 0:S.list,h=(F=this.colDefCols)==null?void 0:F.tree,f=aq(t,this.colDefs,!0,h,e);Cg(t,(C=this.colDefCols)==null?void 0:C.tree,f.columnTree);const g=f.columnTree,m=f.treeDepth,y=xI(g),b={};for(const R of y)b[R.getId()]=R;this.colDefCols={tree:g,treeDepth:m,list:y,map:b},this.createColumnsForService([c],this.colDefCols,e),o==null||o.extractCols(e,d),s==null||s.extractCols(e,d),r==null||r.extractCols(e,d),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(i==null||i.applyAutosizeStrategy())}refreshCols(e,t){var y;if(!this.colDefCols)return;const n=(y=this.cols)==null?void 0:y.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:o,rowNumbersSvc:s,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:u,colViewport:d,eventSvc:h}=this.beans,f=this.selectCols(a,this.colDefCols);this.createColumnsForService([i,o,s],f,t);const g=H9(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(f),this.positionLockedCols(f),l==null||l.refresh(),r==null||r.refreshCols(),this.setColSpanActive(),c==null||c.setAutoHeightActive(f),u.clear(),d.clear(),!Zr(n,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,n){for(const i of e)i&&(i.createColumns(t,o=>{this.lastOrder=o(this.lastOrder),this.lastPivotOrder=o(this.lastPivotOrder)},n),i.addColumns(t))}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:i,list:o,tree:s,treeDepth:r}=n??t;return this.cols={list:o.slice(),map:{...i},tree:s.slice(),treeDepth:r},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:n}=this.beans,i=this.isPivotMode()&&!this.showingPivotResult,o=t==null?void 0:t.isSelectionColumnEnabled(),s=n.get("rowNumbers"),r=e==null?void 0:e.columns;return this.cols.list.filter(l=>{const c=jw(l);if(i){const u=r==null?void 0:r.includes(l);return c||u||o&&hr(l)||s&&fr(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Zo(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=t.filter(d=>e.map[d.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}const i=d=>{const h=d.getOriginalParent();return h?h.getChildren().length>1?!0:i(h):!1};if(!n.some(d=>i(d))){const d=new Set(n);for(const h of e.list)d.has(h)||n.push(h);e.list=n;return}const o=new Map;for(let d=0;d<n.length;d++){const h=n[d];o.set(h,d)}const s=e.list.filter(d=>!o.has(d));if(s.length===0){e.list=n;return}const r=(d,h)=>{const f=h?h.getOriginalParent():d.getOriginalParent();if(!f)return null;let g=null,m=null;for(const y of f.getChildren())if(!(y===h||y===d)){if(y instanceof rl){const b=o.get(y);if(b==null)continue;(g==null||g<b)&&(g=b,m=y);continue}y.forEachLeafColumn(b=>{const S=o.get(b);S!=null&&(g==null||g<S)&&(g=S,m=b)})}return m??r(d,f)},a=[],l=new Map;for(const d of s){const h=r(d,null);if(h==null){a.push(d);continue}const f=l.get(h);f===void 0?l.set(h,d):Array.isArray(f)?f.push(d):l.set(h,[f,d])}const c=new Array(e.list.length);let u=c.length-1;for(let d=a.length-1;d>=0;d--)c[u--]=a[d];for(let d=n.length-1;d>=0;d--){const h=n[d],f=l.get(h);if(f)if(Array.isArray(f))for(let g=f.length-1;g>=0;g--){const m=f[g];c[u--]=m}else c[u--]=f;c[u--]=h}e.list=c}positionLockedCols(e){e.list=PI(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(e){var t,n;return this.colDefCols&&((n=this.beans.colDefFactory)==null?void 0:n.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((t=this.cols)==null?void 0:t.list)??[],e))}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:n,eventSvc:i}=this.beans;n.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var n;if(!this.cols)return;(n=this.beans.autoColSvc)==null||n.updateColumns(e);const t=Mc(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Cg(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}forAllCols(e){var s,r,a,l,c;const{pivotResultCols:t,autoColSvc:n,selectionColSvc:i,groupHierarchyColSvc:o}=this.beans;Yd((s=this.colDefCols)==null?void 0:s.list,e),Yd((r=n==null?void 0:n.columns)==null?void 0:r.list,e),Yd((a=i==null?void 0:i.columns)==null?void 0:a.list,e),Yd((l=o==null?void 0:o.columns)==null?void 0:l.list,e),Yd((c=t==null?void 0:t.getPivotResultCols())==null?void 0:c.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){var t;return((t=this.cols)==null?void 0:t.map[e])??null}getColFromCollection(e,t){if(t==null)return null;const{map:n,list:i}=t;if(typeof e=="string"&&n[e])return n[e];for(let a=0;a<i.length;a++)if(Zd(i[a],e))return i[a];const{autoColSvc:o,selectionColSvc:s,groupHierarchyColSvc:r}=this.beans;return(o==null?void 0:o.getColumn(e))??(s==null?void 0:s.getColumn(e))??(r==null?void 0:r.getColumn(e))??null}},NI=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}};function Xd(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var je=null;function VI(e){return typeof(e==null?void 0:e.getGui)=="function"}var BI=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){var i;if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&((i=this.getGui())==null||i.classList.toggle(e,t),this.cssClassStates[e]=t)}},Sq=0,Jd=class extends Ss{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Sq++,this.cssManager=new BI(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);for(const i of this.css??[])this.beans.environment.addGlobalCSS(i,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(K1):null}applyElementsToComponent(e,t,n,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===je)this[t]=i??e;else{const s=n==null?void 0:n[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const n=[];for(const i of e.childNodes??[])n.push(i);for(const i of n){if(!(i instanceof HTMLElement))continue;const o=this.createComponentFromElement(i,s=>{const r=s.getGui();if(r)for(const a of i.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const s=Array.prototype.slice.call(i.children);o.addItems(s)}this.swapComponentForNode(o,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)}}createComponentFromElement(e,t,n){const i=e.nodeName,o=this.getDataRefAttribute(e),s=i.indexOf("AG-")===0,r=s?this.componentSelectors.get(i):null;let a=null;if(r){const l=n&&o?n[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,o,n,a),a}swapComponentForNode(e,t,n){const i=e.getGui();t.replaceChild(i,n),t.insertBefore(document.createComment(n.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",t.toString())}setTemplate(e,t,n){let i;typeof e=="string"||e==null?i=xw(e):i=Gd(e),this.setTemplateFromElement(i,t,n)}setTemplateFromElement(e,t,n,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let o=0;o<t.length;o++){const s=t[o];this.componentSelectors.set(s.selector,s)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||(n=this.eGui),Pw(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.insertAdjacentElement("afterbegin",n)}appendChild(e,t){const{element:n,parent:i}=this.getContainerAndElement(e,t)||{};!n||!i||i.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;n9(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;pn(this.eGui,e,{skipAriaHidden:n});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},Xt=class extends Jd{};function HI(e){return typeof e=="object"&&!!e.component}function Eq(e,t){return new Rn(n=>{n(window.setInterval(e,t))})}var Rn=class Ah{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new Ah(n=>{let i=t.length;const o=new Array(i);t.forEach((s,r)=>{s.then(a=>{o[r]=a,i--,i===0&&n(o)})})}):Ah.resolve()}static resolve(t=null){return new Ah(n=>n(t))}then(t){return new Ah(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(i=>n(t(i)))})}onDone(t){this.status=1,this.resolution=t;for(const n of this.waiters)n(t)}onReject(t){}};function Rq(e){return e?e.prototype&&"getGui"in e.prototype:!1}function GI(e,t,n,i){const{name:o}=n;let s,r,a,l,c,u;if(t){const d=t,h=d[o+"Selector"],f=h?h(i):null,g=m=>{typeof m=="string"?s=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:r=m)};f?(g(f.component),l=f.params,c=f.popup,u=f.popupPosition):g(d[o])}return{compName:s,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var Dq=class extends be{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,i=!1){return this.getCompDetails(this.gridOptions,e,t,n,i)}getCompDetails(e,t,n,i,o=!1){var F;const{name:s,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=GI(this.beans.frameworkOverrides,e,t,i),f,g;const m=C=>{const R=this.registry.getUserComponent(s,C);R&&(l=R.componentFromFramework?void 0:R.component,c=R.componentFromFramework?R.component:void 0,f=R.params,g=R.processParams)};if(a!=null&&m(a),l==null&&c==null&&n!=null&&m(n),l&&r&&!Rq(l)&&(l=(F=this.agCompUtils)==null?void 0:F.adaptFunction(t,l)),!l&&!c){const{validation:C}=this.beans;o&&(a!==n||!n)?a?C!=null&&C.isProvidedUserComp(a)||tn(50,{compName:a}):n?C||tn(260,{...this.gos.getModuleErrorParams(),propName:s,compName:n}):tn(216,{name:s}):n&&!C&&tn(146,{comp:n});return}const y=this.mergeParams(e,t,i,u,f,g),b=l==null,S=l??c;return{componentFromFramework:b,componentClass:S,params:y,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(S,b,y,t)}}newAgStackInstance(e,t,n,i){var a;const o=!t;let s;o?s=new e:s=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const r=(a=s.init)==null?void 0:a.call(s,n);return r==null?Rn.resolve(s):r.then(()=>s)}mergeParams(e,t,n,i=null,o,s){const r={...n,...o},a=e,l=a==null?void 0:a[t.name+"Params"];if(typeof l=="function"){const c=l(n);_i(r,c)}else typeof l=="object"&&_i(r,l);return _i(r,i),s?s(r):r}},_q={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},xq={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Fq={name:"headerComponent",optionalMethods:["refresh"]},Tq={name:"innerHeaderComponent"},Pq={name:"innerHeaderGroupComponent"},Iq={name:"headerGroupComponent"},Aq={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},kq={name:"loadingCellRenderer",cellRenderer:!0},Oq={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Mq={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Lq={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Nq={name:"tooltipComponent"},qw={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Vq={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Bq={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Hq={name:"loadingCellRenderer",cellRenderer:!0},Gq={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},$q={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Wq(e,t){return e.getCompDetailsFromGridOptions(xq,"agDragAndDropImage",t,!0)}function zq(e,t,n){return e.getCompDetails(t,Fq,"agColumnHeader",n)}function Uq(e,t,n){return e.getCompDetails(t,Tq,void 0,n)}function jq(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Iq,"agColumnGroupHeader",t)}function Kq(e,t,n){return e.getCompDetails(t,Pq,void 0,n)}function qq(e,t){return e.getCompDetailsFromGridOptions(Bq,void 0,t,!0)}function Yq(e,t){return e.getCompDetailsFromGridOptions(Hq,"agLoadingCellRenderer",t,!0)}function Zq(e,t){return e.getCompDetailsFromGridOptions(Gq,"agGroupRowRenderer",t,!0)}function Xq(e,t){return e.getCompDetailsFromGridOptions($q,"agDetailCellRenderer",t,!0)}function $I(e,t,n){return e.getCompDetails(t,Aq,void 0,n)}function WI(e,t,n){return e.getCompDetails(t,kq,"agSkeletonCellRenderer",n,!0)}function zI(e,t,n){return e.getCompDetails(t,Oq,"agCellEditor",n,!0)}function Jq(e,t,n,i){const o=t.filter;return HI(o)&&(t={filter:o.component,filterParams:t.filterParams}),e.getCompDetails(t,qw,i,n,!0)}function Qq(e,t,n){return e.getCompDetails(t,_q,"agDateInput",n,!0)}function eY(e,t){return e.getCompDetailsFromGridOptions(Mq,"agLoadingOverlay",t,!0)}function tY(e,t){return e.getCompDetailsFromGridOptions(Lq,"agNoRowsOverlay",t,!0)}function nY(e,t){return e.getCompDetails(t.colDef,Nq,"agTooltipComponent",t,!0)}function iY(e,t,n,i){return e.getCompDetails(t,Vq,i,n)}function UI(e,t){return GI(e,t,qw)}function Yw(e,t,n){return e.mergeParams(t,qw,n)}function Qd(e){const t=e;return(t==null?void 0:t.getFrameworkComponentInstance)!=null?t.getFrameworkComponentInstance():e}function oY(e){return typeof e=="object"&&!!e.getComp}var de={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},Zw=class extends Jd{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;(e==null?void 0:e.isAlive())&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Xw,Jw,Qw,eb,tb,nb,ib;function Xr(){return Xw===void 0&&(Xw=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Xw}function jI(){return Jw===void 0&&(Jw=/(firefox)/i.test(navigator.userAgent)),Jw}function KI(){return Qw===void 0&&(Qw=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Qw}function al(){return eb===void 0&&(eb=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),eb}function ob(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!jI())?null:t.toString()}function sY(){if(ib!==void 0)return ib;if(!document.body)return-1;let e=1e6;const t=jI()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const i=e*2;if(n.style.height=i+"px",i>t||n.clientHeight!==i)break;e=i}return n.remove(),ib=e,e}function rY(){return nb==null&&qI(),nb}function qI(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(nb=n,tb=n===0)}function YI(){return tb==null&&qI(),tb}var sb="T",aY=new RegExp(`[${sb} ]`),lY=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${sb}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Ds(e,t){return e.toString().padStart(t,"0")}function to(e,t=!0,n=sb){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>Ds(o,2)).join("-");return t&&(i+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>Ds(o,2)).join(":")),i}function Sg(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Ds(e.getDate(),2),Ds(e.getHours(),2),`:${Ds(e.getMinutes(),2)}`,`:${Ds(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Ds(e.getDate(),2)].map(String):null}var rb=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},ZI=["January","February","March","April","May","June","July","August","September","October","November","December"],ab=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function lb(e,t){if(t==null)return to(e,!1);const n=Ds(e.getFullYear(),4),i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>ZI[e.getMonth()],MMM:()=>ZI[e.getMonth()].slice(0,3),MM:()=>Ds(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${rb(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${rb(e.getDate())}`,DD:()=>Ds(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>ab[e.getDay()],ddd:()=>ab[e.getDay()].slice(0,3),dd:()=>ab[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${rb(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,s=>s in i?i[s]():s)}function Eg(e,t=!1){return!!Oi(e,t)}function cY(e){return Eg(e,!0)}function Oi(e,t=!1,n){if(!e||!n&&!lY.test(e))return null;const[i,o]=e.split(aY);if(!i)return null;const s=i.split("-").map(f=>Number.parseInt(f,10));if(s.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=s,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!o&&t)return null;if(!o||o==="00:00:00")return c;const[u,d,h]=o.split(":").map(f=>Number.parseInt(f,10));if(u>=0&&u<24)c.setHours(u);else if(t)return null;if(d>=0&&d<60)c.setMinutes(d);else if(t)return null;if(h>=0&&h<60)c.setSeconds(h);else if(t)return null;return c}function cb(e){const{inputValue:t,allSuggestions:n,hideIrrelevant:i,filterByPercentageOfBestMatch:o}=e;let s=(n??[]).map((l,c)=>({value:l,relevance:uY(t,l),idx:c}));if(s.sort((l,c)=>l.relevance-c.relevance),i&&(s=s.filter(l=>l.relevance<Math.max(l.value.length,t.length))),s.length>0&&o&&o>0){const c=s[0].relevance*o;s=s.filter(u=>c-u.relevance<0)}const r=[],a=[];for(const l of s)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function uY(e,t){e.length<t.length&&([e,t]=[t,e]);let n=[],i=[];const o=e.length,s=t.length;for(let a=0;a<=s;a++)n[a]=a;let r=0;for(let a=1;a<=o;a++){i[0]=a;for(let l=1;l<=s;l++){const c=e[a-1],u=t[l-1];if(c.toLocaleLowerCase()===u.toLocaleLowerCase())++r,c===u&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<o/2-10&&++r,i[l]=n[l-1];else{const d=i[l-1],h=n[l],f=n[l-1];i[l]=1+Math.min(d,h,f)}}[n,i]=[i,n]}return n[s]/(r+1)}function XI(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}var ub=!1,Rg=0;function dY(e){Rg>0||(e.addEventListener("keydown",Dg),e.addEventListener("mousedown",Dg))}function hY(e){Rg>0||(e.removeEventListener("keydown",Dg),e.removeEventListener("mousedown",Dg))}function Dg(e){const t=ub,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(ub=n)}function fY(e){const t=Xn(e);return dY(t),Rg++,()=>{Rg--,hY(t)}}function pY(){return ub}function Nc(e,t,n=!1){const i=t9;let o=H1;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>ws(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(s,r):s}function ll(e,t=!1,n=!1,i=!1){const o=Nc(e,i?".ag-tab-guard":null,n),s=t?on(o):o[0];return s?(s.focus({preventScroll:!0}),!0):!1}function cl(e,t,n,i){const o=Nc(t,n?':not([tabindex="-1"])':null),s=wn(e);let r;n?r=o.findIndex(l=>l.contains(s)):r=o.indexOf(s);const a=r+(i?-1:1);return a<0||a>=o.length?null:o[a]}function JI(e,t=5){let n=0;for(;e&&ob(e)===null&&++n<=t;)e=e.parentElement;return ob(e)===null?null:e}var gY=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",mY=class extends Jd{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(gY)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:i,disabled:o}=this.config;o!=null&&this.setDisabled(o),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ii(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(pn(t,!1),zr(t,"presentation")):(pn(t,!0),zr(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(ag(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Nd(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},QI=class extends mY{constructor(e,t,n,i){super(e,t,n),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||B7(e)!==null?Md(e,""):Md(e,t??"")}setAriaLabel(e){return xc(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return bs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function vY(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var ul=class extends QI{constructor(e,t,n="text",i="input"){super(e,(e==null?void 0:e.template)??vY(i),[],t),this.inputType=n,this.displayFieldTag=i,this.eLabel=je,this.eWrapper=je,this.eInput=je}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:n,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),n.classList.add(`${i}-input`),this.addCss("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:s}=this.config;o!=null&&this.setInputName(o),s!=null&&this.setInputWidth(s),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Qi(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return ag(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Qi(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return xc(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Nd(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Qi(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Qi(this.eInput,"autocomplete",t)}return this}},db=class extends ul{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},hb={selector:"AG-CHECKBOX",component:db},yY=class extends db{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},dl=class extends ul{constructor(e,t="ag-text-field",n="text"){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const n=this.eInput;return n.value!==e&&(n.value=Ke(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{XI(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var o;const i=(o=n.clipboardData)==null?void 0:o.getData("text");i!=null&&i.split("").some(s=>!e.test(s))&&n.preventDefault()}})}},_g={selector:"AG-INPUT-TEXT-FIELD",component:dl},CY=class extends ul{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},wY={selector:"AG-INPUT-TEXT-AREA",component:CY},fb=class extends dl{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const s=Number.parseFloat(e.value),r=isNaN(s)?"":this.normalizeValue(s.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:i,step:o}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof i=="number"&&this.setMax(i),typeof o=="number"&&this.setStep(o)}onWheel(e){wn(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const o=Number.parseFloat(e).toFixed(n);return Number.parseFloat(o).toString()}const i=String(e).split(".");if(i.length>1){if(i[1].length<=n)return e;if(n>0)return`${i[0]}.${i[1].slice(0,n)}`}return i[0]}setMin(e){return this.min===e?this:(this.min=e,Qi(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Qi(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Qi(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if(Ke(n)){let i=this.isScientificNotation(n);if(i&&this.eInput.validity.valid)return e(n);if(!i){n=this.adjustPrecision(n);const o=this.normalizeValue(n);i=n!=o}if(i)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},bY={selector:"AG-INPUT-NUMBER-FIELD",component:fb},SY=class extends dl{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Xr();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){wn(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?to(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Qi(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?to(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Qi(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Qi(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return Oi(this.getValue())??void 0}setDate(e,t){this.setValue(to(e??null,this.includeTime),t)}},eA={selector:"AG-INPUT-DATE-FIELD",component:SY},EY=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",RY="ag-active-item",DY=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),_Y=class extends Jd{constructor(e,t,n){super(DY(e,t)),this.label=t,this.value=n,this.eText=je}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(RY,e),V1(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const n=this.getGui();U7(n,e),z7(n,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Fw(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},xY=class extends Jd{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(EY)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case de.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const n=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(n)}break;case de.DOWN:case de.UP:e.preventDefault(),this.navigate(t);break;case de.PAGE_DOWN:case de.PAGE_UP:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:n}=e,i=n??t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();ii(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(i=>i.value===e);if(n!==-1){const i=this.options[n];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!ws(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const n=this.getGui(),{scrollTop:i,clientHeight:o}=n,{offsetTop:s,offsetHeight:r}=t;(s+r>i+o||s<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){var e,t;(t=(e=this.highlightedItem)==null?void 0:e.tooltipFeature)==null||t.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){var e;(e=this.highlightedItem)==null||e.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const n=new _Y(this.cssIdentifier,t,e);n.setParentComponent(this);const i=this.createManagedBean(n);this.listItems.push(i),this.getGui().appendChild(i.getGui())}navigate(e){const t=e===de.DOWN;let n;const{listItems:i,highlightedItem:o}=this;if(!o)n=t?i[0]:on(i);else{let r=i.indexOf(o)+(t?1:-1);r=Math.min(Math.max(r,0),i.length-1),n=i[r]}this.highlightItem(n)}navigateToPage(e){const{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;const i=t.indexOf(n),o=this.options.length-1,s=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/s);let a=-1;e===de.PAGE_HOME?a=0:e===de.PAGE_END?a=o:e===de.PAGE_DOWN?a=Math.min(i+r,o):e===de.PAGE_UP&&(a=Math.max(i-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){zr(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((n,i)=>{n.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},FY=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",TY={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},PY=class extends QI{constructor(e){if(super(e,(e==null?void 0:e.template)||TY,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=je,this.eWrapper=je,this.eDisplayField=je,this.eIcon=je,this.registerCSS(FY),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:i,minPickerWidth:o,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,n!=null&&this.setPickerMaxHeight(n),o!=null&&this.setPickerMinWidth(o),s!=null&&this.setPickerMaxWidth(s)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:i}=this.config;if(n){const o=this.beans.iconSvc.createIconNoSpan(n);o&&this.eIcon.appendChild(o)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Dw(e,!1),this.ariaRole&&zr(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case de.UP:case de.DOWN:case de.ENTER:case de.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case de.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:i,modalPicker:o=!0},maxPickerHeight:s,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:o,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=I1(c);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,i),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,f=h.addPopup(d);l?(r&&(e.style.minWidth=r),e.style.width=Tw(ig(u)),a&&(e.style.maxWidth=a)):ag(e,a??ig(u));const g=s??`${_w(h.getPopupParent())}px`;return e.style.setProperty("max-height",g),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:i},eWrapper:o,pickerComponent:s}=this,r=i.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:o,ePopup:s.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Dw(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return ag(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},IY=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",pb=class extends PY{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(IY)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:rg(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new xY("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),e9(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i==null||i.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){var e;(e=this.listComponent)==null||e.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){var n;const{key:t}=e;switch(t===de.TAB&&this.hidePicker(),t){case de.ENTER:case de.UP:case de.DOWN:case de.PAGE_UP:case de.PAGE_DOWN:case de.PAGE_HOME:case de.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case de.ESCAPE:super.onKeyDown(e);break;case de.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,n){const{listComponent:i,config:{placeholder:o},eDisplayField:s,tooltipFeature:r}=this;if(this.value===e||!i)return this;if(n||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&o&&(l=o),s.textContent=l,r==null||r.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AY={selector:"AG-SELECT",component:pb},kY=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',gb=typeof window!="object"||!((HM=(BM=window==null?void 0:window.document)==null?void 0:BM.fonts)!=null&&HM.forEach),Vc=(e,t,n,i,o,s)=>{if(gb)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let r=Bc.map.get(t);if(r||(r=[],Bc.map.set(t,r)),r.some(u=>u.css===e))return;const a=document.createElement("style");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=n,a.textContent=e;const l={css:e,el:a,priority:o};let c;for(const u of r){if(u.priority>o)break;c=u}if(c){c.el.insertAdjacentElement("afterend",a);const u=r.indexOf(c);r.splice(u+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},tA=(e,t,n,i)=>{Vc(kY,e,"shared",t,0,n),i==null||i.forEach((o,s)=>o.forEach(r=>Vc(r,e,s,t,0,n)))},OY=e=>{Bc.grids.add(e)},MY=e=>{if(Bc.grids.delete(e),Bc.grids.size===0){Bc.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},nA,Bc=(nA=typeof window=="object"?window:{}).agStyleInjectionState??(nA.agStyleInjectionState={map:new WeakMap,grids:new Set}),_s=e=>new iA(e),Jr="$default",LY=0,iA=class{constructor({feature:e,params:t,modeParams:n={},css:i,cssImports:o}){this.feature=e,this.css=i,this.cssImports=o,this.modeParams={[Jr]:{...n[Jr]??{},...t??{}},...n}}use(e,t,n){let i=this._inject;if(i==null){let{css:o}=this;if(o){const s=`ag-theme-${this.feature??"part"}-${++LY}`;typeof o=="function"&&(o=o()),o=`:where(.${s}) {
|
|
112
112
|
${o}
|
|
113
113
|
}
|
|
114
114
|
`;for(const r of this.cssImports??[])o=`@import url(${JSON.stringify(r)});
|
|
@@ -185,8 +185,8 @@ If you are trying to annotate ${i} with application data, use the '${i}.context'
|
|
|
185
185
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(o=>i.set(o)),i}static accessor(t){const i=(this[vM]=this[vM]={accessors:{}}).accessors,o=this.prototype;function s(r){const a=wh(r);i[a]||(Que(o,r),i[a]=!0)}return ge.isArray(t)?t.forEach(s):s(t),this}};Vi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ge.reduceDescriptors(Vi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}}),ge.freezeMethods(Vi);function LS(e,t){const n=this||Ch,i=t||n,o=Vi.from(i.headers);let s=i.data;return ge.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function yM(e){return!!(e&&e.__CANCEL__)}function nu(e,t,n){It.call(this,e??"canceled",It.ERR_CANCELED,t,n),this.name="CanceledError"}ge.inherits(nu,It,{__CANCEL__:!0});function CM(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new It("Request failed with status code "+n.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ede(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tde(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o=0,s=0,r;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=i[s];r||(r=c),n[o]=l,i[o]=c;let d=s,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-r<t)return;const f=u&&c-u;return f?Math.round(h*1e3/f):void 0}}function nde(e,t){let n=0,i=1e3/t,o,s;const r=(c,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=i?r(c,u):(o=c,s||(s=setTimeout(()=>{s=null,r(o)},i-d)))},()=>o&&r(o)]}const hm=(e,t,n=3)=>{let i=0;const o=tde(50,250);return nde(s=>{const r=s.loaded,a=s.lengthComputable?s.total:void 0,l=r-i,c=o(l),u=r<=a;i=r;const d={loaded:r,total:a,progress:a?r/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-r)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},wM=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},bM=e=>(...t)=>ge.asap(()=>e(...t)),ide=gi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gi.origin),gi.navigator&&/(msie|trident)/i.test(gi.navigator.userAgent)):()=>!0,ode=gi.hasStandardBrowserEnv?{write(e,t,n,i,o,s,r){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];ge.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ge.isString(i)&&a.push(`path=${i}`),ge.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),ge.isString(r)&&a.push(`SameSite=${r}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function sde(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rde(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function SM(e,t,n){let i=!sde(t);return e&&(i||n==!1)?rde(e,t):t}const EM=e=>e instanceof Vi?{...e}:e;function Cl(e,t){t=t||{};const n={};function i(c,u,d,h){return ge.isPlainObject(c)&&ge.isPlainObject(u)?ge.merge.call({caseless:h},c,u):ge.isPlainObject(u)?ge.merge({},u):ge.isArray(u)?u.slice():u}function o(c,u,d,h){if(ge.isUndefined(u)){if(!ge.isUndefined(c))return i(void 0,c,d,h)}else return i(c,u,d,h)}function s(c,u){if(!ge.isUndefined(u))return i(void 0,u)}function r(c,u){if(ge.isUndefined(u)){if(!ge.isUndefined(c))return i(void 0,c)}else return i(void 0,u)}function a(c,u,d){if(d in t)return i(c,u);if(d in e)return i(void 0,c)}const l={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:a,headers:(c,u,d)=>o(EM(c),EM(u),d,!0)};return ge.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);ge.isUndefined(h)&&d!==a||(n[u]=h)}),n}const RM=e=>{const t=Cl({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:r,auth:a}=t;if(t.headers=r=Vi.from(r),t.url=fM(SM(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&r.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ge.isFormData(n)){if(gi.hasStandardBrowserEnv||gi.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(ge.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&r.set(u,d)})}}if(gi.hasStandardBrowserEnv&&(i&&ge.isFunction(i)&&(i=i(t)),i||i!==!1&&ide(t.url))){const l=o&&s&&ode.read(s);l&&r.set(o,l)}return t},ade=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,i){const o=RM(e);let s=o.data;const r=Vi.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,f,g;function m(){f&&f(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const F=Vi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:F,config:e,request:y};CM(function(_){n(_),m()},function(_){i(_),m()},R),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(i(new It("Request aborted",It.ECONNABORTED,e,y)),y=null)},y.onerror=function(C){const R=C&&C.message?C.message:"Network Error",E=new It(R,It.ERR_NETWORK,e,y);E.event=C||null,i(E),y=null},y.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||gM;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),i(new It(C,R.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,y)),y=null},s===void 0&&r.setContentType(null),"setRequestHeader"in y&&ge.forEach(r.toJSON(),function(C,R){y.setRequestHeader(R,C)}),ge.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),a&&a!=="json"&&(y.responseType=o.responseType),c&&([h,g]=hm(c,!0),y.addEventListener("progress",h)),l&&y.upload&&([d,f]=hm(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(u=F=>{y&&(i(!F||F.type?new nu(null,e,y):F),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const S=ede(o.url);if(S&&gi.protocols.indexOf(S)===-1){i(new It("Unsupported protocol "+S+":",It.ERR_BAD_REQUEST,e));return}y.send(s||null)})},lde=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,o;const s=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof It?u:new nu(u instanceof Error?u.message:u))}};let r=t&&setTimeout(()=>{r=null,s(new It(`timeout ${t} of ms exceeded`,It.ETIMEDOUT))},t);const a=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=i;return l.unsubscribe=()=>ge.asap(a),l}},cde=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,o;for(;i<n;)o=i+t,yield e.slice(i,o),i=o},ude=async function*(e,t){for await(const n of dde(e))yield*cde(n,t)},dde=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},DM=(e,t,n,i)=>{const o=ude(e,t);let s=0,r,a=l=>{r||(r=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},_M=64*1024,{isFunction:fm}=ge,hde=(({Request:e,Response:t})=>({Request:e,Response:t}))(ge.global),{ReadableStream:xM,TextEncoder:FM}=ge.global,TM=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fde=e=>{e=ge.merge.call({skipUndefined:!0},hde,e);const{fetch:t,Request:n,Response:i}=e,o=t?fm(t):typeof fetch=="function",s=fm(n),r=fm(i);if(!o)return!1;const a=o&&fm(xM),l=o&&(typeof FM=="function"?(g=>m=>g.encode(m))(new FM):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=s&&a&&TM(()=>{let g=!1;const m=new n(gi.origin,{body:new xM,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),u=r&&a&&TM(()=>ge.isReadableStream(new i("").body)),d={stream:u&&(g=>g.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(m,y)=>{let b=m&&m[g];if(b)return b.call(m);throw new It(`Response type '${g}' is not supported`,It.ERR_NOT_SUPPORT,y)})});const h=async g=>{if(g==null)return 0;if(ge.isBlob(g))return g.size;if(ge.isSpecCompliantForm(g))return(await new n(gi.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ge.isArrayBufferView(g)||ge.isArrayBuffer(g))return g.byteLength;if(ge.isURLSearchParams(g)&&(g=g+""),ge.isString(g))return(await l(g)).byteLength},f=async(g,m)=>{const y=ge.toFiniteNumber(g.getContentLength());return y??h(m)};return async g=>{let{url:m,method:y,data:b,signal:S,cancelToken:F,timeout:C,onDownloadProgress:R,onUploadProgress:E,responseType:_,headers:I,withCredentials:O="same-origin",fetchOptions:k}=RM(g),x=t||fetch;_=_?(_+"").toLowerCase():"text";let P=lde([S,F&&F.toAbortSignal()],C),N=null;const G=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let ie;try{if(E&&c&&y!=="get"&&y!=="head"&&(ie=await f(I,b))!==0){let ue=new n(m,{method:"POST",body:b,duplex:"half"}),De;if(ge.isFormData(b)&&(De=ue.headers.get("content-type"))&&I.setContentType(De),ue.body){const[ae,Fe]=wM(ie,hm(bM(E)));b=DM(ue.body,_M,ae,Fe)}}ge.isString(O)||(O=O?"include":"omit");const B=s&&"credentials"in n.prototype,H={...k,signal:P,method:y.toUpperCase(),headers:I.normalize().toJSON(),body:b,duplex:"half",credentials:B?O:void 0};N=s&&new n(m,H);let X=await(s?x(N,k):x(m,H));const $=u&&(_==="stream"||_==="response");if(u&&(R||$&&G)){const ue={};["status","statusText","headers"].forEach(Me=>{ue[Me]=X[Me]});const De=ge.toFiniteNumber(X.headers.get("content-length")),[ae,Fe]=R&&wM(De,hm(bM(R),!0))||[];X=new i(DM(X.body,_M,ae,()=>{Fe&&Fe(),G&&G()}),ue)}_=_||"text";let ce=await d[ge.findKey(d,_)||"text"](X,g);return!$&&G&&G(),await new Promise((ue,De)=>{CM(ue,De,{data:ce,headers:Vi.from(X.headers),status:X.status,statusText:X.statusText,config:g,request:N})})}catch(B){throw G&&G(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new It("Network Error",It.ERR_NETWORK,g,N),{cause:B.cause||B}):It.from(B,B&&B.code,g,N)}}},pde=new Map,PM=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:o}=t,s=[i,o,n];let r=s.length,a=r,l,c,u=pde;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:fde(t)),u=c;return c};PM();const NS={http:Lue,xhr:ade,fetch:{get:PM}};ge.forEach(NS,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const IM=e=>`- ${e}`,gde=e=>ge.isFunction(e)||e===null||e===!1;function mde(e,t){e=ge.isArray(e)?e:[e];const{length:n}=e;let i,o;const s={};for(let r=0;r<n;r++){i=e[r];let a;if(o=i,!gde(i)&&(o=NS[(a=String(i)).toLowerCase()],o===void 0))throw new It(`Unknown adapter '${a}'`);if(o&&(ge.isFunction(o)||(o=o.get(t))))break;s[a||"#"+r]=o}if(!o){const r=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?r.length>1?`since :
|
|
186
186
|
`+r.map(IM).join(`
|
|
187
187
|
`):" "+IM(r[0]):"as no adapter specified";throw new It("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const AM={getAdapter:mde,adapters:NS};function VS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nu(null,e)}function kM(e){return VS(e),e.headers=Vi.from(e.headers),e.data=LS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),AM.getAdapter(e.adapter||Ch.adapter,e)(e).then(function(i){return VS(e),i.data=LS.call(e,e.transformResponse,i),i.headers=Vi.from(i.headers),i},function(i){return yM(i)||(VS(e),i&&i.response&&(i.response.data=LS.call(e,e.transformResponse,i.response),i.response.headers=Vi.from(i.response.headers))),Promise.reject(i)})}const OM="1.13.2",pm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{pm[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const MM={};pm.transitional=function(t,n,i){function o(s,r){return"[Axios v"+OM+"] Transitional option '"+s+"'"+r+(i?". "+i:"")}return(s,r,a)=>{if(t===!1)throw new It(o(r," has been removed"+(n?" in "+n:"")),It.ERR_DEPRECATED);return n&&!MM[r]&&(MM[r]=!0,console.warn(o(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,a):!0}},pm.spelling=function(t){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function vde(e,t,n){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;for(;o-- >0;){const s=i[o],r=t[s];if(r){const a=e[s],l=a===void 0||r(a,s,e);if(l!==!0)throw new It("option "+s+" must be "+l,It.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new It("Unknown option "+s,It.ERR_BAD_OPTION)}}const gm={assertOptions:vde,validators:pm},As=gm.validators;let wl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new pM,response:new pM}}async request(t,n){try{return await this._request(t,n)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
188
|
-
`+s):i.stack=s}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Cl(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:s}=n;i!==void 0&&gm.assertOptions(i,{silentJSONParsing:As.transitional(As.boolean),forcedJSONParsing:As.transitional(As.boolean),clarifyTimeoutError:As.transitional(As.boolean)},!1),o!=null&&(ge.isFunction(o)?n.paramsSerializer={serialize:o}:gm.assertOptions(o,{encode:As.function,serialize:As.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gm.assertOptions(n,{baseUrl:As.spelling("baseURL"),withXsrfToken:As.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&ge.merge(s.common,s[n.method]);s&&ge.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Vi.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const g=[kM.bind(this),void 0];for(g.unshift(...a),g.push(...c),h=g.length,u=Promise.resolve(n);d<h;)u=u.then(g[d++],g[d++]);return u}h=a.length;let f=n;for(;d<h;){const g=a[d++],m=a[d++];try{f=g(f)}catch(y){m.call(this,y);break}}try{u=kM.call(this,f)}catch(g){return Promise.reject(g)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Cl(this.defaults,t);const n=SM(t.baseURL,t.url,t.allowAbsoluteUrls);return fM(n,t.params,t.paramsSerializer)}};ge.forEach(["delete","get","head","options"],function(t){wl.prototype[t]=function(n,i){return this.request(Cl(i||{},{method:t,url:n,data:(i||{}).data}))}}),ge.forEach(["post","put","patch"],function(t){function n(i){return function(s,r,a){return this.request(Cl(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}wl.prototype[t]=n(),wl.prototype[t+"Form"]=n(!0)});let yde=class vL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(o=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](o);i._listeners=null}),this.promise.then=o=>{let s;const r=new Promise(a=>{i.subscribe(a),s=a}).then(o);return r.cancel=function(){i.unsubscribe(s)},r},t(function(s,r,a){i.reason||(i.reason=new nu(s,r,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new vL(function(o){t=o}),cancel:t}}};function Cde(e){return function(n){return e.apply(null,n)}}function wde(e){return ge.isObject(e)&&e.isAxiosError===!0}const BS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(BS).forEach(([e,t])=>{BS[t]=e});function LM(e){const t=new wl(e),n=JO(wl.prototype.request,t);return ge.extend(n,wl.prototype,t,{allOwnKeys:!0}),ge.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return LM(Cl(e,o))},n}const Ln=LM(Ch);Ln.Axios=wl,Ln.CanceledError=nu,Ln.CancelToken=yde,Ln.isCancel=yM,Ln.VERSION=OM,Ln.toFormData=um,Ln.AxiosError=It,Ln.Cancel=Ln.CanceledError,Ln.all=function(t){return Promise.all(t)},Ln.spread=Cde,Ln.isAxiosError=wde,Ln.mergeConfig=Cl,Ln.AxiosHeaders=Vi,Ln.formToJSON=e=>mM(ge.isHTMLForm(e)?new FormData(e):e),Ln.getAdapter=AM.getAdapter,Ln.HttpStatusCode=BS,Ln.default=Ln;const{Axios:Xme,AxiosError:Jme,CanceledError:Qme,isCancel:eve,CancelToken:tve,VERSION:nve,all:ive,Cancel:ove,isAxiosError:bde,spread:sve,toFormData:rve,AxiosHeaders:ave,HttpStatusCode:lve,formToJSON:cve,getAdapter:uve,mergeConfig:dve}=Ln,Sde=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const i=n.pop();return(i==null?void 0:i.split(";").shift())??null}return null},Ede=6e4,Rde=(()=>{const e=Ln.create({timeout:Ede,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=Sde("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var i;const n=t.config;return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class bh extends Error{constructor(t,n,i,o,s){super(t),this.name="ApiError",this.statusCode=n,this.code=i,this.details=o,this.type=s,Object.setPrototypeOf(this,bh.prototype)}}const Sh=e=>{var t,n;if(bde(e)){const i=(t=e.response)==null?void 0:t.status,o=(n=e.response)==null?void 0:n.data,s=(o==null?void 0:o.message)||e.message||"An unexpected error occurred",r=(o==null?void 0:o.code)||e.code,a=(o==null?void 0:o.details)||o;let l="UNKNOWN";return!i||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":i>=500?l="SERVER":i===Cc.UNAUTHORIZED||i===Cc.FORBIDDEN?l="AUTH":i===Cc.UNPROCESSABLE_ENTITY||i===Cc.BAD_REQUEST?l="VALIDATION":i>=Cc.BAD_REQUEST&&(l="CLIENT"),new bh(s,i,r,a,l)}return e instanceof Error?new bh(e.message,void 0,void 0,void 0,"UNKNOWN"):new bh("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class Dde{constructor(){this.axios=Rde}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([o,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(o,String(r))):typeof s=="object"?n.append(o,JSON.stringify(s)):n.append(o,String(s)))});const i=n.toString();return i?`?${i}`:""}async get(t="",n,i){try{const o=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${o}${s}`,i)).data}catch(o){throw Sh(o)}}async post(t="",n,i,o){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,i,o)).data}catch(s){throw Sh(s)}}async put(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.put(o,n,i)).data}catch(o){throw Sh(o)}}async patch(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.patch(o,n,i)).data}catch(o){throw Sh(o)}}async delete(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.delete(o,{data:n,...i})).data}catch(o){throw Sh(o)}}}const _de=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/workspace/${t}/entities/${n}/items/export-format?format=xlsx`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/workspace/${t}/entities/${n}/items/import`,method:"post",code:"importItems"},exportItems:{url:`${e}/workspace/${t}/entities/${n}/items/export?format=xlsx`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/workspace/${t}/entities/${n}/items/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/workspace/${t}/items/{itemId}`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"}}),xde=(e,t)=>{const n=new Blob([e]),i=globalThis.URL.createObjectURL(n),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),globalThis.URL.revokeObjectURL(i)};class NM extends Dde{constructor(t,{domainApi:n,wsCode:i,entityId:o}){super(),this.events=Object.create(null);const s=_de({domainApi:n,wsCode:i,entityId:o}),r={};Object.entries(s).forEach(([a,l])=>{const c=a;t[c]?r[c]=t[c]:(console.warn(`API config for ${c} is missing, using base config.`),r[c]=l)}),this.apiConfig=r}on(t,n){var i;((i=this.events)[t]??(i[t]=[])).push(n)}off(t,n){const i=this.events[t];i&&(this.events[t]=i.filter(o=>o!==n))}emit(t,...n){const i=this.events[t];i!=null&&i.length&&i.forEach(o=>{try{o(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:i,payload:o,code:s,responseType:r}){var c,u;const a=this.buildHeaders(o);let l;try{if(l=await this.axios.request({method:t,url:n,params:i,data:o,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";xde(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:i,payload:o,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:i,payload:o,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let i=t;return Object.entries(n).forEach(([o,s])=>{i=i.replace(`{${o}}`,String(s))}),i}async request(t,n,i={}){const{url:o,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(o,n);return this._requestHandler({method:r,path:a,params:i.params,payload:i.payload,code:s,responseType:i.responseType})}async getAllItem_cursor(t){var s,r;const n=t.workspaceId,i={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,name_or_code_like:t.search||t.q,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_all_ina:((r=t.assignees)==null?void 0:r.join(","))||void 0},o=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:i,payload:{sort_by:o}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},i={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:i,payload:n})}async getMetricList({workspaceId:t,entityId:n}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:20}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:i,metric_ids:o}){const s={item_ids:n,metric_ids:o};return this.request("metricValues",{workspaceId:t},{params:{per_page:i,include_permission:0},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,i=t.itemIds,o={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:i||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:o})}async getAssignableStatus(t){const n=t.workspaceId,i={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:i})}async updateSceneName({workspaceId:t,entityId:n,itemId:i,name:o}){const s={id:i,entity_id:n,name:o,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:i},{payload:s})}async deleteScene(t,n,i){const o={item_ids:[i]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:o})}async deleteThumbnail(t,n){const i={item_ids:n};return this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition(t,n,i=!1){const o={item_ids:n,delete_all:i?1:void 0};return this.request("delete_rendition",{workspaceId:t},{payload:o})}async archiveScene(t,n,i){const o={item_ids:i,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:o})}async changeDate({workspaceId:t,itemIds:n,startDate:i,dueDate:o}){const s={item_ids:n,start_date:i,due_date:o};return this.request("bulkDateUpdate",{workspaceId:t},{payload:s})}async updateAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async removeAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("removeAssignee",{workspaceId:t},{payload:o})}async replaceAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{params:{replace:1},payload:o})}async addAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async unAssignAll(t,n,i){const o={item_ids:i,ws_user_role_ids:[]};return this.request("removeAssignee",{workspaceId:t,entityId:n},{payload:o})}async createNewScene({workspaceId:t,entityId:n,name:i}){const o={entity_id:n,name:i};return this.request("createNewScene",{workspaceId:t},{payload:o})}async updateItemStatus({workspaceId:t,itemIds:n,statusId:i}){const o={item_ids:n,template_flow_status_id:i};return this.request("bulkStatusUpdate",{workspaceId:t},{payload:o})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems(t,n){const i={item_ids:n};return this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems(t,n){const i={item_ids:n,status:1};return this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems(t,n){const i={item_ids:n,status:0};return this.request("bulkArchive",{workspaceId:t},{payload:i})}async getPermissionForItems({workspaceId:t,itemIds:n}){const i={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:i,params:{per_page:500}})}async unarchiveScene(t,n,i){const o={item_ids:i,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:o})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob"})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob"})}async getStatuses(t,n,i){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:i})}async addNewSceneViaImportFile(t,n,i){return this.request("importItems",{workspaceId:t,entityId:n},{payload:i})}async overwriteScenesViaImportFile(t,n,i){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:i})}}const Fde=e=>{const{showMessage:t}=bd(),n=Si(),i={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:e.value.entityId},o=n==null?void 0:n.appContext.config.globalProperties.apiConfig,s=new NM(o,i);s.on("call-api",k=>{var x,P;k.success?t(k.apiCode,"success"):t(((P=(x=k.res)==null?void 0:x.data)==null?void 0:P.message)||k.apiCode,"error")});const r=Ao({}),a=Z([]),l=Z(!1),c=Z(null),u=Z(null),d=Z(1),h=Z(20),{setCachedUsers:f}=Z6(),g=k=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:k}),m=500,y=async(k,x,P)=>{if(!k.length)return[];const N=QW(k,x);return(await Promise.all(N.map(P))).flat()},b=async k=>{try{return(await s.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:k})).data.map(P=>[P.id,P.permission])}catch(x){return console.error("Failed to fetch item permissions chunk:",x),[]}},S=async(k,x)=>{try{const P=await s.getMetricValues({workspaceId:e.value.workspaceId,item_ids:k,per_page:k.length*x.length,metric_ids:x}),N=P.data.map(ie=>{const B=new Map(ie.item_metrics.map(X=>[X.metric_id,X.value])),H=Object.fromEntries(x.map(X=>[X,B.get(X)??null]));return[ie.id,H]}),G=new Set(P.data.map(ie=>ie.id));for(const ie of k)if(!G.has(ie)){const B=Object.fromEntries(x.map(H=>[H,null]));N.push([ie,B])}return N}catch(P){return console.error("Failed to fetch a chunk of metric values:",P),[]}},F=async k=>{try{const x=await s.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:k,per_page:k.length}),P=x.data.flatMap(N=>N.assignees);return f(P),x.data.map(N=>[N.id,N.assignees])}catch(x){return console.error("Failed to fetch a chunk of assigned users:",x),[]}},C=async k=>{if(!k.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const x=await y(k,m,b);return Object.fromEntries(x)}catch(x){return console.error("Failed to fetch item permissions:",x),{}}},R=async(k,x)=>{if(!k.length||!x.length)return{};try{const P=await Promise.all(x.map(async G=>await y(k,m,ie=>S(ie,[G]))));console.log("All Metric Values Results:",P);const N={};for(const G of P.flat()){const[ie,B]=G;N[ie]||(N[ie]={}),Object.assign(N[ie],B)}return console.log("Merged Metric Values:",N),N}catch(P){return console.error("Failed to fetch metric values:",P),{}}},E=async k=>{if(!k.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const x=await y(k,m,F);return Object.fromEntries(x)}catch(x){return console.error("Failed to fetch assigned users:",x),{}}};return{items:a,loading:l,error:c,pagination:u,currentPage:d,pageSize:h,cusorMap:r,fetchItems:async k=>{const{cursor:x,offset:P,size:N,searchQuery:G}=k;let ie=[];l.value=!0,c.value=null;try{const B=await s.getAllItem_cursor({cursor:x||void 0,offset:P||void 0,pageSize:N||h.value,...g(G),sortBy:k.sort_by,assignees:k.assignees});return a.value=B.data,u.value=B.meta,d.value=B.meta.current_page||0,ie=B.data.map(H=>H.id),B}catch(B){throw c.value=B,console.error("Failed to fetch items (cursor):",B),B}finally{const B=async()=>{try{const[H,X,$]=await Promise.all([E(ie),R(ie,e.value.metricIds),C(ie)]);e.value.updateItemData({assignees:H,metricValues:X,permission:$},ie)}catch(H){console.error("Post-fetch processing failed:",H)}};l.value=!1,setTimeout(B)}},getAssignableStatus:async k=>{try{return await s.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:k})}catch(x){throw console.error("Failed to fetch assignable status:",x),x}},getMetricList:async k=>{try{return await s.getMetricList({workspaceId:e.value.workspaceId,entityId:k})}catch(x){throw console.error("Failed to fetch metric list:",x),x}},getMetricValues:R,getAssignedUsers:E}};function Tde(e){return{updateRowData:(i,o)=>{const s=Array.from(o).map(u=>{var d,h,f;return{id:u,assignees:((d=i.assignees)==null?void 0:d[u])||[],permissions:((h=i.permission)==null?void 0:h[u])||null,metricValues:((f=i.metricValues)==null?void 0:f[u])||null}});if(!e.value)return;const r=[],a=new Map,c=e.value.getColumnDefs().map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u.id);if(d){r.push(d);const f=u.assignees?N6(u.assignees.map(IF)):null;if(d.data.assignees=f,d.data.permissions=u.permissions||null,c.forEach(g=>{d.data[g]=d.data[g]??null}),u.metricValues){const g=u.metricValues;Object.keys(g).forEach(m=>{d.data[`metric_${m}`]=g[m]||null,a.set(`metric_${m}`,!0)})}}}),e.value.refreshCells({rowNodes:r,columns:["assignees",...Array.from(a.keys()),"name","dateRange","status"],force:!0})},setMetricValues:(i,o,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(c=>[c,new Map(s.map(u=>[u,null]))]));Object.entries(i).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,h)})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d&&d.data?(u.forEach((h,f)=>{const g=`metric_${f}`;d.data[g]=h}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function Pde(e,t,n){return{async getRows(i){try{const o=Math.floor(i.startRow/t)+1,{rows:s,total:r}=await e({page:o,pageSize:t,filterText:n(),sort_by:i.sortModel});let a=-1;Number.isFinite(r)?a=r:s.length<t&&(a=i.startRow+s.length),i.context={pageSize:t,text:n()},i.successCallback(s,a)}catch(o){console.error("Datasource fetch error:",o),i.failCallback()}}}}function Ide(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:o,columnDefs:s,fetcher:r}=e,a=Z(!0),l=()=>{n.value=!n.value,o.value&&setTimeout(()=>{var g;(g=o.value)==null||g.sizeColumnsToFit()},300)},c=g=>{if(a.value=!1,o.value=g,!g)return null;const{sizeColumnsToFit:m,addEventListener:y,setGridOption:b}=g;if(m==null||m(),!r)return console.error("Fetcher function is undefined"),null;const S=Pde(r,e.perPage,()=>i.value);return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=g.getSelectedRows()}),y==null||y("columnMoved",()=>{var E;const F=(E=g.getColumnState())==null?void 0:E.map(_=>_.colId),C=s.value.reduce((_,I)=>(I.field&&_&&(_[I.field]=I),_),{}),R=F.map(_=>C[_]).filter(Boolean);s.value=R}),g||null},u=g=>{var m,y;if((m=o.value)==null||m.hideOverlay(),g!==void 0&&(i.value=g),(y=o.value)==null||y.deselectAll(),t.value=[],a.value=!0,!o.value||!r){console.error("Grid API or fetcher is not available"),a.value=!1;return}o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{a.value=!1},300)},d=()=>{var g;(g=o.value)==null||g.deselectAll(),t.value=[]},h=g=>{s.value=g},f=Ho(g=>{u(g)},gp);return{isLoading:a,toggleSidebar:l,onGridReady:c,onSearch:f,handleUnSelect:d,updateTableConfig:h}}const Ade={key:1},kde=Ct(lt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Z(null),o=e,s=()=>{i.value&&i.value.show()},r=Z(""),a=Z("idle"),l=Z({file:null,format:null}),{apiServices:c}=po(!1,{}),u=Z(!1),d=async()=>{u.value=!0;const _=o.workspaceId,I=o.entityId;if(!_||!I||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(_,I))throw new Error("No response from downloadTemplate API")}catch(O){console.error("Error downloading template:",O)}u.value=!1},h=n,f=()=>{h("import-success"),S()},g=async _=>{var k,x,P;const I=new FormData,O=((k=_.name.split(".").pop())==null?void 0:k.toString())||"";if(I.append("file",_),I.append("format",O),!c.value){console.error("API services not available");return}try{const N=await c.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,I);m()}catch(N){throw console.error("Error uploading file:",N),y(((P=(x=N.response)==null?void 0:x.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),N}},m=()=>{a.value="success"},y=_=>{r.value=_,a.value="error"},b=async()=>{!l.value||!l.value.file||await g(l.value.file)},S=()=>{var _;E(),(_=i.value)==null||_.hide()};t({close:S,open:s});const F=j(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=j(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=Z(null),E=()=>{var _;(_=R.value)==null||_.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(_,I)=>(K(),Xe(J(QP),{"popup-name":F.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:E},Su({default:Se(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(_1,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(K(),Ce("div",Ade,[we("div",{class:z(_.$style["step-section"])},[we("span",{class:z(_.$style["step-title"])},"Step 1: Download current data",2),we("span",{class:z(_.$style["step-description"])},[...I[1]||(I[1]=[ut(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),we("br",null,null,-1),we("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ye(J(pt),{class:z(_.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:Se(()=>[ye(J(gt),{src:"Download"})]),default:Se(()=>[I[2]||(I[2]=ut(" Download file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(_.$style["step-section"])},[we("span",{class:z(_.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ye(J(D1),{modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=O=>l.value=O),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),we("div",{class:z(_.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ye(x1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"secondary",onClick:S},{default:Se(()=>[...I[3]||(I[3]=[ut(" Cancel ",-1)])]),_:1}),ye(J(pt),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:b},{default:Se(()=>[...I[4]||(I[4]=[ut(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"primary",onClick:f},{default:Se(()=>[...I[5]||(I[5]=[ut(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:Se(()=>[ye(J(pt),{style:{flex:"1"},variant:"primary",onClick:E},{default:Se(()=>[...I[6]||(I[6]=[ut(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),Ode=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
188
|
+
`+s):i.stack=s}catch{}}throw i}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Cl(this.defaults,n);const{transitional:i,paramsSerializer:o,headers:s}=n;i!==void 0&&gm.assertOptions(i,{silentJSONParsing:As.transitional(As.boolean),forcedJSONParsing:As.transitional(As.boolean),clarifyTimeoutError:As.transitional(As.boolean)},!1),o!=null&&(ge.isFunction(o)?n.paramsSerializer={serialize:o}:gm.assertOptions(o,{encode:As.function,serialize:As.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gm.assertOptions(n,{baseUrl:As.spelling("baseURL"),withXsrfToken:As.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&ge.merge(s.common,s[n.method]);s&&ge.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Vi.concat(r,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const g=[kM.bind(this),void 0];for(g.unshift(...a),g.push(...c),h=g.length,u=Promise.resolve(n);d<h;)u=u.then(g[d++],g[d++]);return u}h=a.length;let f=n;for(;d<h;){const g=a[d++],m=a[d++];try{f=g(f)}catch(y){m.call(this,y);break}}try{u=kM.call(this,f)}catch(g){return Promise.reject(g)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Cl(this.defaults,t);const n=SM(t.baseURL,t.url,t.allowAbsoluteUrls);return fM(n,t.params,t.paramsSerializer)}};ge.forEach(["delete","get","head","options"],function(t){wl.prototype[t]=function(n,i){return this.request(Cl(i||{},{method:t,url:n,data:(i||{}).data}))}}),ge.forEach(["post","put","patch"],function(t){function n(i){return function(s,r,a){return this.request(Cl(a||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}wl.prototype[t]=n(),wl.prototype[t+"Form"]=n(!0)});let yde=class vL{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(o=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](o);i._listeners=null}),this.promise.then=o=>{let s;const r=new Promise(a=>{i.subscribe(a),s=a}).then(o);return r.cancel=function(){i.unsubscribe(s)},r},t(function(s,r,a){i.reason||(i.reason=new nu(s,r,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=i=>{t.abort(i)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new vL(function(o){t=o}),cancel:t}}};function Cde(e){return function(n){return e.apply(null,n)}}function wde(e){return ge.isObject(e)&&e.isAxiosError===!0}const BS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(BS).forEach(([e,t])=>{BS[t]=e});function LM(e){const t=new wl(e),n=JO(wl.prototype.request,t);return ge.extend(n,wl.prototype,t,{allOwnKeys:!0}),ge.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return LM(Cl(e,o))},n}const Ln=LM(Ch);Ln.Axios=wl,Ln.CanceledError=nu,Ln.CancelToken=yde,Ln.isCancel=yM,Ln.VERSION=OM,Ln.toFormData=um,Ln.AxiosError=It,Ln.Cancel=Ln.CanceledError,Ln.all=function(t){return Promise.all(t)},Ln.spread=Cde,Ln.isAxiosError=wde,Ln.mergeConfig=Cl,Ln.AxiosHeaders=Vi,Ln.formToJSON=e=>mM(ge.isHTMLForm(e)?new FormData(e):e),Ln.getAdapter=AM.getAdapter,Ln.HttpStatusCode=BS,Ln.default=Ln;const{Axios:Xme,AxiosError:Jme,CanceledError:Qme,isCancel:eve,CancelToken:tve,VERSION:nve,all:ive,Cancel:ove,isAxiosError:bde,spread:sve,toFormData:rve,AxiosHeaders:ave,HttpStatusCode:lve,formToJSON:cve,getAdapter:uve,mergeConfig:dve}=Ln,Sde=e=>{const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2){const i=n.pop();return(i==null?void 0:i.split(";").shift())??null}return null},Ede=6e4,Rde=(()=>{const e=Ln.create({timeout:Ede,headers:{"Content-Type":"application/json"}});return e.interceptors.request.use(t=>{const n=Sde("account.token");return n&&t.headers&&(t.headers.Authorization=`Bearer ${n}`),t.headers&&(t.headers["Access-Control-Allow-Origin"]="*",t.headers["Access-Control-Allow-Headers"]="*",t.headers["Accept-Language"]="*"),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>t,async t=>{var i;const n=t.config;return((i=t.response)==null?void 0:i.status)===401&&!n._retry&&(n._retry=!0),Promise.reject(t)}),e})();class bh extends Error{constructor(t,n,i,o,s){super(t),this.name="ApiError",this.statusCode=n,this.code=i,this.details=o,this.type=s,Object.setPrototypeOf(this,bh.prototype)}}const Sh=e=>{var t,n;if(bde(e)){const i=(t=e.response)==null?void 0:t.status,o=(n=e.response)==null?void 0:n.data,s=(o==null?void 0:o.message)||e.message||"An unexpected error occurred",r=(o==null?void 0:o.code)||e.code,a=(o==null?void 0:o.details)||o;let l="UNKNOWN";return!i||e.code==="ERR_NETWORK"||e.code==="ECONNABORTED"?l=e.code==="ECONNABORTED"?"TIMEOUT":"NETWORK":i>=500?l="SERVER":i===Cc.UNAUTHORIZED||i===Cc.FORBIDDEN?l="AUTH":i===Cc.UNPROCESSABLE_ENTITY||i===Cc.BAD_REQUEST?l="VALIDATION":i>=Cc.BAD_REQUEST&&(l="CLIENT"),new bh(s,i,r,a,l)}return e instanceof Error?new bh(e.message,void 0,void 0,void 0,"UNKNOWN"):new bh("An unknown error occurred",void 0,void 0,void 0,"UNKNOWN")};class Dde{constructor(){this.axios=Rde}buildUrl(t=""){const n=t.replace(/^\//,"");return!n.startsWith("http://")&&!n.startsWith("https://")?`/${n}`:n??""}buildQueryParams(t){const n=new URLSearchParams;Object.entries(t).forEach(([o,s])=>{s!=null&&s!==""&&(Array.isArray(s)?s.forEach(r=>n.append(o,String(r))):typeof s=="object"?n.append(o,JSON.stringify(s)):n.append(o,String(s)))});const i=n.toString();return i?`?${i}`:""}async get(t="",n,i){try{const o=this.buildUrl(t),s=n?this.buildQueryParams(n):"";return(await this.axios.get(`${o}${s}`,i)).data}catch(o){throw Sh(o)}}async post(t="",n,i,o){try{const s=this.buildUrl(t),r=n?this.buildQueryParams(n):"";return(await this.axios.post(`${s}${r}`,i,o)).data}catch(s){throw Sh(s)}}async put(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.put(o,n,i)).data}catch(o){throw Sh(o)}}async patch(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.patch(o,n,i)).data}catch(o){throw Sh(o)}}async delete(t="",n,i){try{const o=this.buildUrl(t);return(await this.axios.delete(o,{data:n,...i})).data}catch(o){throw Sh(o)}}}const _de=({domainApi:e,wsCode:t,entityId:n})=>({list_cursor:{url:`${e}/v1/workspace/${t}/item/2`,method:"post",code:"list_cursor"},assignedUser:{url:`${e}/v1/workspace/${t}/item/2/assigned-users`,method:"post",code:"assignedUser"},metricValues:{url:`${e}/v1/workspace/${t}/item/2/metrics`,method:"post",code:"metricValues"},multipleAssignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"multipleAssignableUser"},assignableUser:{url:`${e}/v1/workspace/${t}/item/2/assignable-users`,method:"post",code:"assignableUser"},assignableStatus:{url:`${e}/v1/workspace/${t}/item/2/assignable-statuses`,method:"post",code:"assignableStatus"},delete_rendition:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-rendition`,method:"delete",code:"delete_rendition"},delete_thumbnail:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-thumbnail`,method:"delete",code:"delete_thumbnail"},archive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"archive_item"},unarchive_item:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"unarchive_item"},removeAssignee:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete-assignee`,method:"delete",code:"removeAssignee"},basicInfor:{url:`${e}/v1/workspace/${t}/tile/people/ws-user-roles/{userId}/basic-info`,method:"get",code:"basicInfor"},bulkDelete:{url:`${e}/v1/workspace/${t}/item/2/bulk-delete`,method:"delete",code:"bulkDelete"},bulkArchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkArchive"},bulkDateUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-date-update`,method:"put",code:"bulkDateUpdate"},bulkAssignUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-assignee-update`,method:"put",code:"bulkAssignUpdate"},bulkStatusUpdate:{url:`${e}/v1/workspace/${t}/item/2/bulk-status-update`,method:"put",code:"bulkStatusUpdate"},getPermission:{url:`${e}/v1/workspace/${t}/item/2/permissions`,method:"post",code:"getPermission"},getUserPermission:{url:`${e}/v1/workspace/${t}/permissions`,method:"get",code:"getUserPermission"},bulkUnarchive:{url:`${e}/v1/workspace/${t}/item/2/bulk-archive`,method:"put",code:"bulkUnarchive"},downloadTemplate:{url:`${e}/workspace/${t}/entities/${n}/items/export-format?format=xlsx`,method:"get",code:"downloadTemplate"},importItems:{url:`${e}/workspace/${t}/entities/${n}/items/import`,method:"post",code:"importItems"},exportItems:{url:`${e}/workspace/${t}/entities/${n}/items/export?format=xlsx`,method:"get",code:"exportItems"},updateFromFile:{url:`${e}/workspace/${t}/entities/${n}/items/update-from-file`,method:"post",code:"updateFromFile"},getStatuses:{url:`${e}/workspace/${t}/entities/${n}/template_flow_statuses`,method:"get",code:"getStatuses"},metricList:{url:`${e}/workspace/${t}/entities/${n}/metric`,method:"get",code:"metricList"},getEntityDetail:{url:`${e}/workspace/${t}/entities/${n}?include_permission=1`,method:"get",code:"getEntityDetail"},item:{url:`${e}/workspace/${t}/items/{itemId}`,method:"put",code:"item"},createNewScene:{url:`${e}/workspace/${t}/items`,method:"post",code:"createNewScene"}}),xde=(e,t)=>{const n=new Blob([e]),i=globalThis.URL.createObjectURL(n),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),globalThis.URL.revokeObjectURL(i)};class NM extends Dde{constructor(t,{domainApi:n,wsCode:i,entityId:o}){super(),this.events=Object.create(null);const s=_de({domainApi:n,wsCode:i,entityId:o}),r={};Object.entries(s).forEach(([a,l])=>{const c=a;t[c]?r[c]=t[c]:(console.warn(`API config for ${c} is missing, using base config.`),r[c]=l)}),this.apiConfig=r}on(t,n){var i;((i=this.events)[t]??(i[t]=[])).push(n)}off(t,n){const i=this.events[t];i&&(this.events[t]=i.filter(o=>o!==n))}emit(t,...n){const i=this.events[t];i!=null&&i.length&&i.forEach(o=>{try{o(...n)}catch(s){console.error(`Error in event listener for ${t}:`,s)}})}buildHeaders(t){return typeof FormData<"u"&&t instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}async _requestHandler({method:t,path:n,params:i,payload:o,code:s,responseType:r}){var c,u;const a=this.buildHeaders(o);let l;try{if(l=await this.axios.request({method:t,url:n,params:i,data:o,headers:a,responseType:r}),(((c=l.headers)==null?void 0:c["content-type"])||"").includes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")){const h=((u=l.headers)==null?void 0:u["content-disposition"])||"",f=h.includes("filename=")?h.split("filename=")[1]:"exported_items.xlsx";xde(l.data,f)}if(l.status>=400&&l.status<=500)throw new Error(`Client error (${l.status}): ${l.statusText}`);return this.emit("call-api",{apiCode:s,path:n,params:i,payload:o,res:l,success:!0}),l.data}catch(d){throw console.error("API Request Error:",d),this.emit("call-api",{path:n,params:i,payload:o,error:d,success:!1,apiCode:s,res:d==null?void 0:d.response}),d}}generateUrl(t,n){let i=t;return Object.entries(n).forEach(([o,s])=>{i=i.replace(`{${o}}`,String(s))}),i}async request(t,n,i={}){const{url:o,code:s,method:r}=this.apiConfig[t],a=this.generateUrl(o,n);return this._requestHandler({method:r,path:a,params:i.params,payload:i.payload,code:s,responseType:i.responseType})}async getAllItem_cursor(t){var s,r;const n=t.workspaceId,i={entity_ids:((s=t.entityIds)==null?void 0:s.join(","))||"",cursor:t.cursor||void 0,per_page:t.pageSize||t.perPage||20,offset:t.offset||void 0,name_or_code_like:t.search||t.q,include_signature:1,include:"last_updated_by,property",include_permission:"{include_permission}",assignee_all_ina:((r=t.assignees)==null?void 0:r.join(","))||void 0},o=t.sortBy;return this.request("list_cursor",{workspaceId:n},{params:i,payload:{sort_by:o}})}async getAssignedUser(t){const n={item_ids:t.item_ids||[],metric_ids:t.metric_ids||[]},i={per_page:t.per_page};return this.request("assignedUser",{workspaceId:t.workspaceId},{params:i,payload:n})}async getMetricList({workspaceId:t,entityId:n}){return this.request("metricList",{workspaceId:t,entityId:n},{params:{status_ed:1,include:"metric_type",include_permission:1,per_page:20}})}async getMetricValues({workspaceId:t,item_ids:n,per_page:i,metric_ids:o}){const s={item_ids:n,metric_ids:o};return this.request("metricValues",{workspaceId:t},{params:{per_page:i,include_permission:0},payload:s})}async multipleAssignableUser(t){const n=t.workspaceId,i=t.itemIds,o={page:t.page||1,per_page:t.perPage,display_name_like:t.q||"",item_ids:i||[]};return this.request("multipleAssignableUser",{workspaceId:n},{payload:o})}async getAssignableStatus(t){const n=t.workspaceId,i={item_ids:t.itemIds||[],page:t.page||1,per_page:t.perPage||10,name_like:t.name_like||""};return this.request("assignableStatus",{workspaceId:n||""},{payload:i})}async updateSceneName({workspaceId:t,entityId:n,itemId:i,name:o}){const s={id:i,entity_id:n,name:o,include:"item_user_roles"};return this.request("item",{workspaceId:t,itemId:i},{payload:s})}async deleteScene(t,n,i){const o={item_ids:[i]};return this.request("bulkDelete",{workspaceId:t,entityId:n},{payload:o})}async deleteThumbnail(t,n){const i={item_ids:n};return this.request("delete_thumbnail",{workspaceId:t},{payload:i})}async deleteRendition(t,n,i=!1){const o={item_ids:n,delete_all:i?1:void 0};return this.request("delete_rendition",{workspaceId:t},{payload:o})}async archiveScene(t,n,i){const o={item_ids:i,status:0};return this.request("archive_item",{workspaceId:t,entityId:n},{payload:o})}async changeDate({workspaceId:t,itemIds:n,startDate:i,dueDate:o}){const s={item_ids:n,start_date:i,due_date:o};return this.request("bulkDateUpdate",{workspaceId:t},{payload:s})}async updateAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async removeAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("removeAssignee",{workspaceId:t},{payload:o})}async replaceAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{params:{replace:1},payload:o})}async addAssignee(t,n,i){const o={item_ids:n,ws_user_role_ids:i};return this.request("bulkAssignUpdate",{workspaceId:t},{payload:o})}async unAssignAll(t,n,i){const o={item_ids:i,ws_user_role_ids:[]};return this.request("removeAssignee",{workspaceId:t,entityId:n},{payload:o})}async createNewScene({workspaceId:t,entityId:n,name:i}){const o={entity_id:n,name:i};return this.request("createNewScene",{workspaceId:t},{payload:o})}async updateItemStatus({workspaceId:t,itemIds:n,statusId:i}){const o={item_ids:n,template_flow_status_id:i};return this.request("bulkStatusUpdate",{workspaceId:t},{payload:o})}async getUserInformation(t,n){return this.request("basicInfor",{workspaceId:t,userId:n})}async bulkDeleteItems(t,n){const i={item_ids:n};return this.request("bulkDelete",{workspaceId:t},{payload:i})}async bulkUnarchiveItems(t,n){const i={item_ids:n,status:1};return this.request("bulkUnarchive",{workspaceId:t},{payload:i})}async bulkArchiveItems(t,n){const i={item_ids:n,status:0};return this.request("bulkArchive",{workspaceId:t},{payload:i})}async getPermissionForItems({workspaceId:t,itemIds:n}){const i={item_ids:n};return this.request("getPermission",{workspaceId:t},{payload:i,params:{per_page:500}})}async unarchiveScene(t,n,i){const o={item_ids:i,status:1};return this.request("unarchive_item",{workspaceId:t,entityId:n},{payload:o})}async getUserPermission(t){return this.request("getUserPermission",{workspaceId:t})}async getEntityDetail(t,n){return this.request("getEntityDetail",{workspaceId:t,entityId:n})}async downloadTemplate(t,n){return this.request("downloadTemplate",{workspaceId:t,entityId:n},{responseType:"blob"})}async downloadExportedItemsFile(t,n){return this.request("exportItems",{workspaceId:t,exportId:n},{responseType:"blob"})}async getStatuses(t,n,i){return this.request("getStatuses",{workspaceId:t,entityId:n},{params:i})}async addNewSceneViaImportFile(t,n,i){return this.request("importItems",{workspaceId:t,entityId:n},{payload:i})}async overwriteScenesViaImportFile(t,n,i){return this.request("updateFromFile",{workspaceId:t,entityId:n},{payload:i})}}const Fde=e=>{const{showMessage:t}=bd(),n=Si(),i={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:e.value.entityId},o=n==null?void 0:n.appContext.config.globalProperties.apiConfig,s=new NM(o,i);s.on("call-api",k=>{var x,P;k.success?t(k.apiCode,"success"):t(((P=(x=k.res)==null?void 0:x.data)==null?void 0:P.message)||k.apiCode,"error")});const r=Ao({}),a=Z([]),l=Z(!1),c=Z(null),u=Z(null),d=Z(1),h=Z(20),{setCachedUsers:f}=Z6(),g=k=>({workspaceId:e.value.workspaceId,entityIds:[e.value.entityId],orderBy:"id-asc",status_eq:1,include_permission:"{include_permission}",include_permission_names:!0,q:k}),m=500,y=async(k,x,P)=>{if(!k.length)return[];const N=QW(k,x);return(await Promise.all(N.map(P))).flat()},b=async k=>{try{return(await s.getPermissionForItems({workspaceId:e.value.workspaceId,itemIds:k})).data.map(P=>[P.id,P.permission])}catch(x){return console.error("Failed to fetch item permissions chunk:",x),[]}},S=async(k,x)=>{try{const P=await s.getMetricValues({workspaceId:e.value.workspaceId,item_ids:k,per_page:k.length*x.length,metric_ids:x}),N=P.data.map(ie=>{const B=new Map(ie.item_metrics.map(X=>[X.metric_id,X.value])),H=Object.fromEntries(x.map(X=>[X,B.get(X)??null]));return[ie.id,H]}),G=new Set(P.data.map(ie=>ie.id));for(const ie of k)if(!G.has(ie)){const B=Object.fromEntries(x.map(H=>[H,null]));N.push([ie,B])}return N}catch(P){return console.error("Failed to fetch a chunk of metric values:",P),[]}},F=async k=>{try{const x=await s.getAssignedUser({workspaceId:e.value.workspaceId,item_ids:k,per_page:k.length}),P=x.data.flatMap(N=>N.assignees);return f(P),x.data.map(N=>[N.id,N.assignees])}catch(x){return console.error("Failed to fetch a chunk of assigned users:",x),[]}},C=async k=>{if(!k.length)return console.warn("getPermissionForItems: Empty itemIds"),{};try{const x=await y(k,m,b);return Object.fromEntries(x)}catch(x){return console.error("Failed to fetch item permissions:",x),{}}},R=async(k,x)=>{if(!k.length||!x.length)return{};try{const P=await Promise.all(x.map(async G=>await y(k,m,ie=>S(ie,[G]))));console.log("All Metric Values Results:",P);const N={};for(const G of P.flat()){const[ie,B]=G;N[ie]||(N[ie]={}),Object.assign(N[ie],B)}return console.log("Merged Metric Values:",N),N}catch(P){return console.error("Failed to fetch metric values:",P),{}}},E=async k=>{if(!k.length)return console.warn("getAssignedUsers: Empty itemIds"),{};try{const x=await y(k,m,F);return Object.fromEntries(x)}catch(x){return console.error("Failed to fetch assigned users:",x),{}}};return{items:a,loading:l,error:c,pagination:u,currentPage:d,pageSize:h,cusorMap:r,fetchItems:async k=>{const{cursor:x,offset:P,size:N,searchQuery:G}=k;let ie=[];l.value=!0,c.value=null;try{const B=await s.getAllItem_cursor({cursor:x||void 0,offset:P||void 0,pageSize:N||h.value,...g(G),sortBy:k.sort_by,assignees:k.assignees});return a.value=B.data,u.value=B.meta,d.value=B.meta.current_page||0,ie=B.data.map(H=>H.id),B}catch(B){throw c.value=B,console.error("Failed to fetch items (cursor):",B),B}finally{const B=async()=>{try{const[H,X,$]=await Promise.all([E(ie),R(ie,e.value.metricIds),C(ie)]);e.value.updateItemData({assignees:H,metricValues:X,permission:$},ie)}catch(H){console.error("Post-fetch processing failed:",H)}};l.value=!1,setTimeout(B)}},getAssignableStatus:async k=>{try{return await s.getAssignableStatus({workspaceId:e.value.workspaceId,itemIds:k})}catch(x){throw console.error("Failed to fetch assignable status:",x),x}},getMetricList:async k=>{try{return await s.getMetricList({workspaceId:e.value.workspaceId,entityId:k})}catch(x){throw console.error("Failed to fetch metric list:",x),x}},getMetricValues:R,getAssignedUsers:E}};function Tde(e){return{updateRowData:(i,o)=>{const s=Array.from(o).map(u=>{var d,h,f;return{id:u,assignees:((d=i.assignees)==null?void 0:d[u])||[],permissions:((h=i.permission)==null?void 0:h[u])||null,metricValues:((f=i.metricValues)==null?void 0:f[u])||null}});if(!e.value)return;const r=[],a=new Map,c=e.value.getColumnDefs().map(u=>{if(u.field&&u.field.startsWith("metric_")&&(u.hide===!1||u.hide===void 0))return u.field}).filter(Boolean);s.forEach(u=>{var h;const d=(h=e.value)==null?void 0:h.getRowNode(u.id);if(d){r.push(d);const f=u.assignees?N6(u.assignees.map(IF)):null;if(d.data.assignees=f,d.data.permissions=u.permissions||null,c.forEach(g=>{d.data[g]=d.data[g]??null}),u.metricValues){const g=u.metricValues;Object.keys(g).forEach(m=>{d.data[`metric_${m}`]=g[m]||null,a.set(`metric_${m}`,!0)})}}}),e.value.refreshCells({rowNodes:r,columns:["assignees",...Array.from(a.keys()),"name","dateRange","status"],force:!0})},setMetricValues:(i,o,s)=>{const r=e.value;if(!r)return;const a=new Map(Array.from(o).map(c=>[c,new Map(s.map(u=>[u,null]))]));Object.entries(i).forEach(([c,u])=>{Object.entries(u).forEach(([d,h])=>{var f;(f=a.get(c))==null||f.set(d,h)})});const l=Array.from(a.entries()).map(([c,u])=>{const d=r.getRowNode(c);return d&&d.data?(u.forEach((h,f)=>{const g=`metric_${f}`;d.data[g]=h}),d):null});l.length>0&&r.refreshCells({rowNodes:l,columns:Array.from(s).map(c=>`metric_${c}`),force:!0})}}}function Pde(e,t,n){return{async getRows(i){try{const o=Math.floor(i.startRow/t)+1,{rows:s,total:r}=await e({page:o,pageSize:t,filterText:n(),sort_by:i.sortModel});let a=-1;Number.isFinite(r)?a=r:s.length<t&&(a=i.startRow+s.length),i.context={pageSize:t,text:n()},i.successCallback(s,a)}catch(o){console.error("Datasource fetch error:",o),i.failCallback()}}}}function Ide(e){const{selectRowData:t,isSidebarOpen:n,quickFilterText:i,gridApi:o,columnDefs:s,fetcher:r}=e,a=Z(!0),l=()=>{n.value=!n.value,o.value&&setTimeout(()=>{var g;(g=o.value)==null||g.sizeColumnsToFit()},300)},c=g=>{if(a.value=!1,o.value=g,!g)return null;const{sizeColumnsToFit:m,addEventListener:y,setGridOption:b}=g;if(m==null||m(),!r)return console.error("Fetcher function is undefined"),null;const S=Pde(r,e.perPage,()=>i.value);return b==null||b("datasource",S),y==null||y("selectionChanged",()=>{t.value=g.getSelectedRows()}),y==null||y("columnMoved",()=>{var E;const F=(E=g.getColumnState())==null?void 0:E.map(_=>_.colId),C=s.value.reduce((_,I)=>(I.field&&_&&(_[I.field]=I),_),{}),R=F.map(_=>C[_]).filter(Boolean);s.value=R}),g||null},u=g=>{var m,y;if((m=o.value)==null||m.hideOverlay(),g!==void 0&&(i.value=g),(y=o.value)==null||y.deselectAll(),t.value=[],a.value=!0,!o.value||!r){console.error("Grid API or fetcher is not available"),a.value=!1;return}o.value.purgeInfiniteCache(),o.value.ensureIndexVisible(0,"top"),setTimeout(()=>{a.value=!1},300)},d=()=>{var g;(g=o.value)==null||g.deselectAll(),t.value=[]},h=g=>{s.value=g},f=Ho(g=>{u(g)},gp);return{isLoading:a,toggleSidebar:l,onGridReady:c,onSearch:f,handleUnSelect:d,updateTableConfig:h}}const Ade={key:1},kde=Ct(lt({__name:"PopupOverwriteScenes",props:{workspaceId:{},entityId:{}},emits:["import-success"],setup(e,{expose:t,emit:n}){const i=Z(null),o=e,s=()=>{i.value&&i.value.show()},r=Z(""),a=Z("idle"),l=Z({file:null,format:null}),{apiServices:c}=po(!1,{}),u=Z(!1),d=async()=>{u.value=!0;const _=o.workspaceId,I=o.entityId;if(!_||!I||!c.value){console.error("Workspace ID or Entity ID is missing");return}try{if(!await c.value.downloadExportedItemsFile(_,I))throw new Error("No response from downloadTemplate API")}catch(O){console.error("Error downloading template:",O)}u.value=!1},h=n,f=()=>{h("import-success"),S()},g=async _=>{var k,x,P;const I=new FormData,O=((k=_.name.split(".").pop())==null?void 0:k.toString())||"";if(I.append("file",_),I.append("format",O),!c.value){console.error("API services not available");return}try{const N=await c.value.overwriteScenesViaImportFile(o.workspaceId,o.entityId,I);m()}catch(N){throw console.error("Error uploading file:",N),y(((P=(x=N.response)==null?void 0:x.data)==null?void 0:P.message)||"An unknown error occurred during file upload."),N}},m=()=>{a.value="success"},y=_=>{r.value=_,a.value="error"},b=async()=>{!l.value||!l.value.file||await g(l.value.file)},S=()=>{var _;E(),(_=i.value)==null||_.hide()};t({close:S,open:s});const F=j(()=>({error:"Import failed",importing:"Import in progress",success:"Import successful",idle:"Update existing work"})[a.value]),C=j(()=>l.value.file?!1:(console.error("No file selected"),!0)),R=Z(null),E=()=>{var _;(_=R.value)==null||_.clear(),r.value="",l.value={file:null,format:null},a.value="idle"};return(_,I)=>(K(),Xe(J(QP),{"popup-name":F.value,"show-overlay":!0,"overlay-opacity":.5,"close-on-overlay-click":!0,"close-on-escape":!0,ref_key:"popupRef",ref:i,onHidden:E},Su({default:Se(()=>[a.value==="importing"||a.value==="error"||a.value==="success"?(K(),Xe(_1,{key:0,state:a.value,"error-message":r.value,overwrite:!0},null,8,["state","error-message"])):(K(),Ce("div",Ade,[we("div",{class:z(_.$style["step-section"])},[we("span",{class:z(_.$style["step-title"])},"Step 1: Download current data",2),we("span",{class:z(_.$style["step-description"])},[...I[1]||(I[1]=[ut(" Download a file with all existing work and details. Edit it, then upload in Step 2. ",-1),we("br",null,null,-1),we("i",null,"Note: Empty cells and unchanged values will be skipped.",-1)])],2),ye(J(ft),{class:z(_.$style["download-sample-btn"]),size:12,variant:"secondary",disabled:u.value,onHandleClick:d},{prefix:Se(()=>[ye(J(gt),{src:"Download"})]),default:Se(()=>[I[2]||(I[2]=ut(" Download file ",-1))]),_:1},8,["class","disabled"])],2),we("div",{class:z(_.$style["step-section"])},[we("span",{class:z(_.$style["step-title"])},"Step 2: Upload updated file (.xlsx, .xls, .csv)",2),ye(J(D1),{modelValue:l.value,"onUpdate:modelValue":I[0]||(I[0]=O=>l.value=O),ref_key:"filUploaderRef",ref:R},null,8,["modelValue"])],2),we("div",{class:z(_.$style["step-section"]),style:{"padding-top":"0","padding-bottom":"0"}},[ye(x1)],2)]))]),_:2},[a.value==="idle"?{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"secondary",onClick:S},{default:Se(()=>[...I[3]||(I[3]=[ut(" Cancel ",-1)])]),_:1}),ye(J(ft),{disabled:C.value,style:{flex:"1"},variant:"primary",onClick:b},{default:Se(()=>[...I[4]||(I[4]=[ut(" Import ",-1)])]),_:1},8,["disabled"])]),key:"0"}:a.value==="success"?{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"primary",onClick:f},{default:Se(()=>[...I[5]||(I[5]=[ut(" Close ",-1)])]),_:1})]),key:"1"}:{name:"footer",fn:Se(()=>[ye(J(ft),{style:{flex:"1"},variant:"primary",onClick:E},{default:Se(()=>[...I[6]||(I[6]=[ut(" Try Again ",-1)])]),_:1})]),key:"2"}]),1032,["popup-name"]))}}),[["__cssModules",{$style:{"step-section":"_step-section_13ctn_1","step-title":"_step-title_13ctn_11","step-title-2":"_step-title-2_13ctn_17","step-description":"_step-description_13ctn_23","date-format-guide":"_date-format-guide_13ctn_28","import-error":"_import-error_13ctn_39","drop-area":"_drop-area_13ctn_49","is-dragging":"_is-dragging_13ctn_49","drop-area-content":"_drop-area-content_13ctn_52",browse:"_browse_13ctn_61","download-sample-btn":"_download-sample-btn_13ctn_65"}}]]),Ode=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
189
189
|
<rect width="32" height="32" rx="4" fill="#CCF3EB"/>
|
|
190
190
|
<path d="M11 9C9.89688 9 9 9.89688 9 11V21C9 22.1031 9.89688 23 11 23H21C22.1031 23 23 22.1031 23 21V11C23 9.89688 22.1031 9 21 9H11ZM19.5312 14.5312L15.5312 18.5312C15.2375 18.825 14.7625 18.825 14.4719 18.5312L12.4719 16.5312C12.1781 16.2375 12.1781 15.7625 12.4719 15.4719C12.7656 15.1813 13.2406 15.1781 13.5312 15.4719L15 16.9406L18.4688 13.4688C18.7625 13.175 19.2375 13.175 19.5281 13.4688C19.8187 13.7625 19.8219 14.2375 19.5281 14.5281L19.5312 14.5312Z" fill="#00A18D"/>
|
|
191
191
|
</svg>
|
|
192
|
-
`,Mde=Ct(lt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=zC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=nr(n),{addNotification:r}=bd(),a=Z(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=j(()=>{var q;const ke=((q=s.value)==null?void 0:q.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!ke},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!ke,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!ke,id:"overwrite_scenes_option"}]}),u=e;Ad.initialize({wrapVueCellRenderer:eg,wrapVueCellEditor:P1});const d=Z(null),h=Z([]),f=YC(),{rowCount:g}=nr(f),m=Z(!1),y=Z(""),b=Z(),S=Z(""),F=Z(!1),C=Z(new Set),R=Z(new Map),{apiServices:E}=po(!1,u),{columnDefs:_,checkboxColumn:I,saveColumnConfig:O}=Xce(b,u.entityId),{updateRowData:k,setMetricValues:x}=Tde(d),P=j(()=>y.value.length>0||ft.value.length>0),N=j(()=>!1),G=j(dC),ie=j(()=>_.value.filter(ke=>{var q;return((q=ke.field)==null?void 0:q.startsWith("metric_"))&&!ke.hide}).map(ke=>{var q;return((q=ke.field)==null?void 0:q.replace("metric_",""))||""}));Fa("timezone",G);const B=j(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:ie.value,updateItemData:k})),{fetchItems:H,getMetricList:X,cusorMap:$,getMetricValues:ce}=Fde(B),ue=j(()=>{if(!d.value)return!1;const ke=d.value.getSelectedRows().length;return ke>0&&ke>=g.value.total}),De=j(()=>{var ke;return((ke=a.value)==null?void 0:ke.name)||"Items"}),ae=(ke,q)=>{var fe,$e,vt;g.value.total=ke.meta.total??0,(fe=ke.meta.next)!=null&&fe.cursor&&($[q+1]=ke.meta.next.cursor),S.value=ke.meta["X-Tsr-content-sha256"]||"",ke.meta.total===0?($e=d.value)==null||$e.showNoRowsOverlay():(vt=d.value)==null||vt.hideOverlay()},Fe=R1(),{sortingAPIConfiguration:Me,isSortingRunning:Je}=nr(Fe),ft=Z([]),Mt=async({page:ke,pageSize:q,filterText:fe})=>{var Le;(Le=d.value)==null||Le.hideOverlay();const $e=$[ke],vt=!$e&&ke>1?(ke-1)*q:void 0,Ft=Me.value;Ft.length>0&&(Je.value=!0);try{const An=await H({cursor:$e,size:q,searchQuery:fe,offset:vt,sort_by:Ft,assignees:ft.value});if(!An)return{rows:[],total:0};const ra=(xo=>{const Os=xo.data.map(Qo=>kF(Qo,G.value));return Os.forEach(Qo=>{C.value.add(String(Qo.id)),R.value.set(String(Qo.id),{})}),Os})(An);return ae(An,ke),{rows:ra,total:g.value.total}}catch(An){return console.error("Failed to fetch items:",An),{rows:[],total:0}}finally{Je.value=!1}},{isLoading:Be,toggleSidebar:jt,onGridReady:nn,handleUnSelect:Ot,onSearch:V}=Ide({selectRowData:Z([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:_,perPage:l.ROWS_PER_PAGE,fetcher:Mt}),Y=j(()=>({blockLoadDebounceMillis:1e3,columnDefs:_.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:pe,noRowsOverlayComponent:eg(g7),noRowsOverlayComponentParams:()=>({isSearching:P.value,isFiltering:N.value}),defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ke=>ke.data.id,getRowClass:ke=>{if(!ke.data)return["row-empty"];const q=["row-highlight"];return ke.data.id||q.push("row-inactive"),ke.data.isDeleted&&q.push("row-deleted"),ke.data.isArchived&&q.push("row-archived"),q},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Je.value}}));function pe(){if(!d.value)return;const ke=d.value.getCacheBlockState();if(!ke)return;const q=Object.values(ke).reduce((fe,$e)=>($e==null?void 0:$e.pageStatus)==="loaded"?fe+($e.endRow-$e.startRow):fe,0);g.value.loaded=Math.min(q,g.value.total)}ct(()=>Me,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys($).forEach(ke=>delete $[Number(ke)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const Te=Z(),Ee=Z(),_e=()=>{var ke;(ke=Ee.value)==null||ke.open()},Ve=()=>{var ke;(ke=Te.value)==null||ke.open()},Ae=()=>{console.log("Refreshing table"),d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys($).forEach(ke=>delete $[Number(ke)]),d.value.refreshInfiniteCache())},Pe=j(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),xe=Z();function it(ke){var q;ke==="new_scene"?(q=xe.value)==null||q.show():ke==="import_scenes"?Ve():ke==="overwrite_scenes"&&_e()}const We=ke=>{h.value=ke.api.getSelectedRows().map(q=>q.id)},at=ke=>{const q=nn(ke);return q&&(q.addEventListener("modelUpdated",pe),q.addEventListener("bodyScroll",()=>q.stopEditing())),q==null||q.sizeColumnsToFit(),q},dt=(ke,q)=>{if(!d.value)return;const fe=d.value.getRowNode(ke);fe?(d.value.ensureIndexVisible(Number(fe.rowIndex),"middle"),d.value.flashCells({rowNodes:[fe],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},xt=async ke=>{var fe;let q;if(!(!E.value||!ke.trim())){Be.value=!0;try{q=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:ke}),g.value.total<50&&await Ae()}catch($e){console.error("Error creating new scene:",$e)}finally{Be.value=!1,q!=null&&q.id&&r({id:String(q==null?void 0:q.id),message:`${ke} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{dt(String(q==null?void 0:q.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const $e=Vo({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(q==null?void 0:q.id)}}).url;window.open($e,"_blank")},btnIcon:"CustomSceneHub"}],icon:Ode,type:"interactive"}),(fe=xe.value)==null||fe.hide()}}},Lt=ke=>ke.metric_type.code==="number"?"number":"default",Ht=async()=>{if(u.entityId)try{const ke=await X(u.entityId);b.value=ke.data.map(q=>({...q,sortType:Lt(q)}))}catch(ke){console.error("Failed to initialize metric list:",ke),b.value=[]}},Dn=async()=>{if(E.value)try{const ke=await E.value.getUserPermission(u.workspaceId);i(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},cn=async()=>{if(E.value)try{const ke=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(ke.permission),a.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}};ct(()=>[u.entityId,u.workspaceId],async([ke,q])=>{!ke||!q||(Ht(),Dn(),cn())},{immediate:!0,deep:!0}),ct(ie,(ke,q)=>{const fe=ke.filter($e=>!(q!=null&&q.includes($e)));fe.length>0&&ce(Array.from(C.value),fe).then($e=>{x($e,C.value,fe)})},{immediate:!0,deep:!0}),ct(S,(ke,q)=>{F.value=!!(q&&ke&&q!==ke)}),t({refreshTable:Ae});const qn=ke=>{ft.value=ke,Ae()};return(ke,q)=>(K(),Xe(J(dK),{"is-sidebar-open":m.value,onCloseSidebar:J(jt),onSidebarClear:J(jt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:J(jt)},{"header-left":Se(()=>[we("h1",{class:z(ke.$style.tableTitle)},"Scenes",2),we("div",{class:z(ke.$style["beta-tag"])},"Beta",2),ye(J(QC),{variant:["primary"],options:c.value,onSelect:it,onHandleClick:q[1]||(q[1]=fe=>it("new_scene")),id:"create_scene_dropdown"},{prefix:Se(()=>[ye(J(pt),{id:"create_new_scene",variant:["primary"],onClick:q[0]||(q[0]=fe=>it("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Pe.value),1)]),"header-actions":Se(()=>[ye(J(S7),{"onUpdate:assignees":qn}),ye(J(KC),{modelValue:y.value,"onUpdate:modelValue":q[2]||(q[2]=fe=>y.value=fe),onSearch:J(V),class:z(ke.$style.itemSearchBox),onClear:q[3]||(q[3]=fe=>J(V)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ye(J(HP),{status:J(Be)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Se(()=>[ye(J(pt),{variant:"secondary",onClick:Ae},{prefix:Se(()=>[ye(J(gt),{src:"ArrowsRotate"})]),default:Se(()=>[q[4]||(q[4]=ut(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),ye(J(h7),{"model-value":J(_),"onUpdate:modelValue":J(O),checkboxColumn:J(I),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Se(({availableHeight:fe})=>[ye(J(zce),xn({id:"item_table_main",ref:"agGrid"},Y.value,{height:fe+"px",isSorting:J(Je),onOnGridReady:at,onSelectionChanged:We}),null,16,["height","isSorting"])]),footer:Se(()=>[we("div",{class:z(ke.$style.tableFooter),id:"table_footer"},[we("span",null,[q[5]||(q[5]=ut(" Showing ",-1)),we("b",null,bt(J(g).loaded)+" of "+bt(J(g).total),1)])],2)]),"new-row":Se(()=>[ye(J(v7),{onCreateNewItem:xt,ref_key:"createNewSceneRef",ref:xe},null,512)]),"bulk-update-actions":Se(()=>{var fe;return[!m.value&&h.value.length>0?(K(),Xe(J(J8),{key:0,selectRowData:((fe=d.value)==null?void 0:fe.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:J(Ot),"take-name":De.value,"selected-all":ue.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):ot("",!0)]}),snackbar:Se(()=>[ye(J(xK))]),popup:Se(()=>[ye(D7,{ref_key:"popupCreateSceneRef",ref:Te,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ae},null,8,["workspace-id","entity-id"]),ye(kde,{ref_key:"popupOverwriteScenesRef",ref:Ee,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ae},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),VM="0.0.36",Lde={key:0},Nde=Ct(lt({__name:"app",setup(e){const t=j(()=>n.id.length===0||n.workspaceId.length===0),n=Ao({id:"",workspaceId:"",apiConfig:{}}),i=bd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=Z(null);hv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",VM);try{if(r.value=Si(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new NM(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),Yn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=j(()=>n.id),l=j(()=>n.workspaceId);return Fa("workspaceId",l),Fa("entityId",a),(c,u)=>(K(),Ce("div",{class:z(c.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",Lde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Xe(J(Mde),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),HS=async(e={},t={})=>{const n=MR(Nde),i=b8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=s,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},console.log(`%cArbo Dashboard Plugin v${VM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n};typeof window<"u"&&(window.arboDashboard=HS),un.default=HS,un.initDashboard=HS,Object.defineProperties(un,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
192
|
+
`,Mde=Ct(lt({__name:"item-table",props:{entityId:{},workspaceId:{}},setup(e,{expose:t}){const n=zC(),{setUserPermissions:i,setEntityPermissions:o}=n,{entityPermissions:s}=nr(n),{addNotification:r}=bd(),a=Z(null),l={ROWS_PER_PAGE:50,ROW_HEIGHT:38,GRID_HEIGHT:"650px"},c=j(()=>{var q;const ke=((q=s.value)==null?void 0:q.has_create_item_permission)===1;return[{label:"Create manually",value:"new_scene",icon:"Plus",type:"icon",id:"create_new_scene",hide:!ke},{label:"Import from CSV or Excel",value:"import_scenes",icon:"FileImport",type:"icon",hide:!ke,id:"import_scenes_option"},{label:"Update existing (CSV or Excel)",value:"overwrite_scenes",icon:"FilePen",type:"icon",hide:!ke,id:"overwrite_scenes_option"}]}),u=e;Ad.initialize({wrapVueCellRenderer:eg,wrapVueCellEditor:P1});const d=Z(null),h=Z([]),f=YC(),{rowCount:g}=nr(f),m=Z(!1),y=Z(""),b=Z(),S=Z(""),F=Z(!1),C=Z(new Set),R=Z(new Map),{apiServices:E}=po(!1,u),{columnDefs:_,checkboxColumn:I,saveColumnConfig:O}=Xce(b,u.entityId),{updateRowData:k,setMetricValues:x}=Tde(d),P=j(()=>y.value.length>0),N=j(()=>!1),G=j(dC),ie=j(()=>_.value.filter(ke=>{var q;return((q=ke.field)==null?void 0:q.startsWith("metric_"))&&!ke.hide}).map(ke=>{var q;return((q=ke.field)==null?void 0:q.replace("metric_",""))||""}));Fa("timezone",G);const B=j(()=>({autoFetch:!1,workspaceId:u.workspaceId,entityId:u.entityId,metricIds:ie.value,updateItemData:k})),{fetchItems:H,getMetricList:X,cusorMap:$,getMetricValues:ce}=Fde(B),ue=j(()=>{if(!d.value)return!1;const ke=d.value.getSelectedRows().length;return ke>0&&ke>=g.value.total}),De=j(()=>{var ke;return((ke=a.value)==null?void 0:ke.name)||"Items"}),ae=(ke,q)=>{var fe,$e,vt;g.value.total=ke.meta.total??0,(fe=ke.meta.next)!=null&&fe.cursor&&($[q+1]=ke.meta.next.cursor),S.value=ke.meta["X-Tsr-content-sha256"]||"",ke.meta.total===0?($e=d.value)==null||$e.showNoRowsOverlay():(vt=d.value)==null||vt.hideOverlay()},Fe=R1(),{sortingAPIConfiguration:Me,isSortingRunning:Je}=nr(Fe),pt=Z([]),Mt=async({page:ke,pageSize:q,filterText:fe})=>{var Le;(Le=d.value)==null||Le.hideOverlay();const $e=$[ke],vt=!$e&&ke>1?(ke-1)*q:void 0,Ft=Me.value;Ft.length>0&&(Je.value=!0);try{const An=await H({cursor:$e,size:q,searchQuery:fe,offset:vt,sort_by:Ft,assignees:pt.value});if(!An)return{rows:[],total:0};const ra=(xo=>{const Os=xo.data.map(Qo=>kF(Qo,G.value));return Os.forEach(Qo=>{C.value.add(String(Qo.id)),R.value.set(String(Qo.id),{})}),Os})(An);return ae(An,ke),{rows:ra,total:g.value.total}}catch(An){return console.error("Failed to fetch items:",An),{rows:[],total:0}}finally{Je.value=!1}},{isLoading:Be,toggleSidebar:jt,onGridReady:nn,handleUnSelect:Ot,onSearch:V}=Ide({selectRowData:Z([]),isSidebarOpen:m,quickFilterText:y,gridApi:d,columnDefs:_,perPage:l.ROWS_PER_PAGE,fetcher:Mt}),Y=j(()=>({blockLoadDebounceMillis:1e3,columnDefs:_.value,rowModelType:"infinite",cacheBlockSize:l.ROWS_PER_PAGE,infiniteInitialRowCount:20,popupParent:document.getElementById("item-table-layout-id")||void 0,rowSelection:{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1,enableSelectionWithoutKeys:!1},suppressHeaderFocus:!1,pagination:!1,rowHeight:l.ROW_HEIGHT,suppressHorizontalScroll:!1,suppressColumnVirtualisation:!1,debounceVerticalScrollbar:!1,animateRows:!1,suppressAnimationFrame:!1,suppressScrollOnNewData:!0,suppressScrollWhenPopupsAreOpen:!1,rowBuffer:20,enableCellTextSelection:!1,suppressDragLeaveHidesColumns:!0,suppressMaxRenderedRowRestriction:!1,height:l.GRID_HEIGHT,stopEditingWhenCellsLoseFocus:!0,onModelUpdated:pe,noRowsOverlayComponent:eg(g7),noRowsOverlayComponentParams:()=>({isSearching:P.value,isFiltering:N.value}),defaultColDef:{editable:!1,filter:!1,sortable:!1,flex:1,minWidth:100,suppressNavigable:!1},getRowId:ke=>ke.data.id,getRowClass:ke=>{if(!ke.data)return["row-empty"];const q=["row-highlight"];return ke.data.id||q.push("row-inactive"),ke.data.isDeleted&&q.push("row-deleted"),ke.data.isArchived&&q.push("row-archived"),q},suppressRowTransform:!1,singleClickEdit:!0,context:{workspaceId:u.workspaceId,entityId:u.entityId,apiServices:E.value,sorting:Je.value}}));function pe(){if(!d.value)return;const ke=d.value.getCacheBlockState();if(!ke)return;const q=Object.values(ke).reduce((fe,$e)=>($e==null?void 0:$e.pageStatus)==="loaded"?fe+($e.endRow-$e.startRow):fe,0);g.value.loaded=Math.min(q,g.value.total)}ct(()=>Me,()=>{d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys($).forEach(ke=>delete $[Number(ke)]),d.value.purgeInfiniteCache(),d.value.ensureIndexVisible(0),d.value.refreshCells({force:!0}))},{deep:!0});const Te=Z(),Ee=Z(),_e=()=>{var ke;(ke=Ee.value)==null||ke.open()},Ve=()=>{var ke;(ke=Te.value)==null||ke.open()},Ae=()=>{console.log("Refreshing table"),d.value&&(S.value="",C.value.clear(),d.value.deselectAll(),Object.keys($).forEach(ke=>delete $[Number(ke)]),d.value.refreshInfiniteCache())},Pe=j(()=>sessionStorage.getItem("ITEM_TABLE_APP_VERSION")||""),xe=Z();function it(ke){var q;ke==="new_scene"?(q=xe.value)==null||q.show():ke==="import_scenes"?Ve():ke==="overwrite_scenes"&&_e()}const We=ke=>{h.value=ke.api.getSelectedRows().map(q=>q.id)},at=ke=>{const q=nn(ke);return q&&(q.addEventListener("modelUpdated",pe),q.addEventListener("bodyScroll",()=>q.stopEditing())),q==null||q.sizeColumnsToFit(),q},dt=(ke,q)=>{if(!d.value)return;const fe=d.value.getRowNode(ke);fe?(d.value.ensureIndexVisible(Number(fe.rowIndex),"middle"),d.value.flashCells({rowNodes:[fe],flashDuration:3e3,fadeDuration:1e3})):d.value.ensureIndexVisible(g.value.total-1,"bottom")},xt=async ke=>{var fe;let q;if(!(!E.value||!ke.trim())){Be.value=!0;try{q=await E.value.createNewScene({workspaceId:u.workspaceId,entityId:u.entityId,name:ke}),g.value.total<50&&await Ae()}catch($e){console.error("Error creating new scene:",$e)}finally{Be.value=!1,q!=null&&q.id&&r({id:String(q==null?void 0:q.id),message:`${ke} created successfully`,actions:[{label:"View",variant:"secondary",action:()=>{dt(String(q==null?void 0:q.id))}},{label:"Scene Hub",variant:"primary",action:()=>{const $e=Vo({type:"scene_hub",config:{ws_code:u.workspaceId,baseDomain:sessionStorage.getItem("URL_BASE")||"app.arbocollab.com",scene_id:String(q==null?void 0:q.id)}}).url;window.open($e,"_blank")},btnIcon:"CustomSceneHub"}],icon:Ode,type:"interactive"}),(fe=xe.value)==null||fe.hide()}}},Lt=ke=>ke.metric_type.code==="number"?"number":"default",Ht=async()=>{if(u.entityId)try{const ke=await X(u.entityId);b.value=ke.data.map(q=>({...q,sortType:Lt(q)}))}catch(ke){console.error("Failed to initialize metric list:",ke),b.value=[]}},Dn=async()=>{if(E.value)try{const ke=await E.value.getUserPermission(u.workspaceId);i(ke)}catch(ke){console.error("Failed to fetch user permissions:",ke)}},cn=async()=>{if(E.value)try{const ke=await E.value.getEntityDetail(u.workspaceId,u.entityId);o(ke.permission),a.value=ke}catch(ke){console.error("Failed to fetch entity details:",ke)}};ct(()=>[u.entityId,u.workspaceId],async([ke,q])=>{!ke||!q||(Ht(),Dn(),cn())},{immediate:!0,deep:!0}),ct(ie,(ke,q)=>{const fe=ke.filter($e=>!(q!=null&&q.includes($e)));fe.length>0&&ce(Array.from(C.value),fe).then($e=>{x($e,C.value,fe)})},{immediate:!0,deep:!0}),ct(S,(ke,q)=>{F.value=!!(q&&ke&&q!==ke)}),t({refreshTable:Ae});const qn=ke=>{pt.value=ke,Ae()};return(ke,q)=>(K(),Xe(J(dK),{"is-sidebar-open":m.value,onCloseSidebar:J(jt),onSidebarClear:J(jt),ref:"itemTableLayoutRef",id:"item-table-layout-id",onSidebarApply:J(jt)},{"header-left":Se(()=>[we("h1",{class:z(ke.$style.tableTitle)},"Scenes",2),we("div",{class:z(ke.$style["beta-tag"])},"Beta",2),ye(J(QC),{variant:["primary"],options:c.value,onSelect:it,onHandleClick:q[1]||(q[1]=fe=>it("new_scene")),id:"create_scene_dropdown"},{prefix:Se(()=>[ye(J(ft),{id:"create_new_scene",variant:["primary"],onClick:q[0]||(q[0]=fe=>it("new_scene")),label:"New"})]),_:1},8,["options"]),we("span",null,bt(Pe.value),1)]),"header-actions":Se(()=>[ye(J(S7),{"onUpdate:assignees":qn}),ye(J(KC),{modelValue:y.value,"onUpdate:modelValue":q[2]||(q[2]=fe=>y.value=fe),onSearch:J(V),class:z(ke.$style.itemSearchBox),onClear:q[3]||(q[3]=fe=>J(V)("")),id:"item_search_box"},null,8,["modelValue","onSearch","class"]),ye(J(HP),{status:J(Be)?"busy":"active",size:10,id:"refresh_table","status-tooltip":"Data has changed, please refresh the table",color:"var(--warning-color)","show-badge":F.value},{default:Se(()=>[ye(J(ft),{variant:"secondary",onClick:Ae},{prefix:Se(()=>[ye(J(gt),{src:"ArrowsRotate"})]),default:Se(()=>[q[4]||(q[4]=ut(" Refresh ",-1))]),_:1})]),_:1},8,["status","show-badge"]),ye(J(h7),{"model-value":J(_),"onUpdate:modelValue":J(O),checkboxColumn:J(I),id:"table_customization"},null,8,["model-value","onUpdate:modelValue","checkboxColumn"])]),grid:Se(({availableHeight:fe})=>[ye(J(zce),xn({id:"item_table_main",ref:"agGrid"},Y.value,{height:fe+"px",isSorting:J(Je),onOnGridReady:at,onSelectionChanged:We}),null,16,["height","isSorting"])]),footer:Se(()=>[we("div",{class:z(ke.$style.tableFooter),id:"table_footer"},[we("span",null,[q[5]||(q[5]=ut(" Showing ",-1)),we("b",null,bt(J(g).loaded)+" of "+bt(J(g).total),1)])],2)]),"new-row":Se(()=>[ye(J(v7),{onCreateNewItem:xt,ref_key:"createNewSceneRef",ref:xe},null,512)]),"bulk-update-actions":Se(()=>{var fe;return[!m.value&&h.value.length>0?(K(),Xe(J(J8),{key:0,selectRowData:((fe=d.value)==null?void 0:fe.getSelectedRows())||[],"workspace-id":u.workspaceId,"entity-id":u.entityId,"grid-api":d.value,onUnselect:J(Ot),"take-name":De.value,"selected-all":ue.value},null,8,["selectRowData","workspace-id","entity-id","grid-api","onUnselect","take-name","selected-all"])):ot("",!0)]}),snackbar:Se(()=>[ye(J(xK))]),popup:Se(()=>[ye(D7,{ref_key:"popupCreateSceneRef",ref:Te,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ae},null,8,["workspace-id","entity-id"]),ye(kde,{ref_key:"popupOverwriteScenesRef",ref:Ee,"workspace-id":u.workspaceId,"entity-id":u.entityId,onImportSuccess:Ae},null,8,["workspace-id","entity-id"])]),_:1},8,["is-sidebar-open","onCloseSidebar","onSidebarClear","onSidebarApply"]))}}),[["__cssModules",{$style:{tableTitle:"_tableTitle_1lefh_1",tableFooter:"_tableFooter_1lefh_7",footerStart:"_footerStart_1lefh_17",newRow:"_newRow_1lefh_25","warning-text":"_warning-text_1lefh_44","has-error":"_has-error_1lefh_49",itemSearchBox:"_itemSearchBox_1lefh_53","beta-tag":"_beta-tag_1lefh_57"}}]]),VM="1.0.35",Lde={key:0},Nde=Ct(lt({__name:"app",setup(e){const t=j(()=>n.id.length===0||n.workspaceId.length===0),n=Ao({id:"",workspaceId:"",apiConfig:{}}),i=bd(),{showMessage:o}=i,s=c=>{var u,d;c.success?o(c.apiCode,"success"):o(((d=(u=c.res)==null?void 0:u.data)==null?void 0:d.message)||c.apiCode,"error")},r=Z(null);hv(()=>{var c,u,d;sessionStorage.setItem("ITEM_TABLE_APP_VERSION",VM);try{if(r.value=Si(),!r.value)throw new Error("Current instance is null");n.id=((c=r.value)==null?void 0:c.appContext.config.globalProperties.id)||"",n.workspaceId=((u=r.value)==null?void 0:u.appContext.config.globalProperties.workspaceId)||sessionStorage.getItem("ws.code")||"";const h={domainApi:"https://api.dev.arbocollab.com/api",wsCode:sessionStorage.getItem("ws.code")||"w:yngazem",entityId:n.id};n.apiConfig=((d=r.value)==null?void 0:d.appContext.config.globalProperties.apiConfig)||{};const f=new NM(n.apiConfig,h);f.on("call-api",s),r.value.appContext.config.globalProperties.apiServices=f}catch(h){console.error("Error getting current instance:",h)}}),Yn(()=>{r.value.appContext.config.globalProperties.apiServices.off("call-api",s)});const a=j(()=>n.id),l=j(()=>n.workspaceId);return Fa("workspaceId",l),Fa("entityId",a),(c,u)=>(K(),Ce("div",{class:z(c.$style.dashboardPluginWrapper)},[t.value?(K(),Ce("span",Lde," There is no workspaceId or entityIds provided in global properties. Please set them to see the Item Table. ")):a.value?(K(),Xe(J(Mde),{key:1,entityId:a.value,workspaceId:l.value},null,8,["entityId","workspaceId"])):ot("",!0)],2))}}),[["__cssModules",{$style:{dashboardPluginWrapper:"_dashboardPluginWrapper_1f1og_1"}}]]),HS=async(e={},t={})=>{const n=MR(Nde),i=b8();n.use(i);const o=["apiConfig","workspaceId","id"],s={};return Object.entries(e).forEach(([r,a])=>{a!==void 0&&(n.config.globalProperties[r]=a,s[r]=a,o.includes(r)&&typeof a=="string"?sessionStorage.setItem(r,a):console.error(`[Config Error] Key "${r}" has an invalid value and will not be persisted.`))}),n.config.globalProperties.$arboConfig=s,Object.values(t).forEach(r=>{r&&typeof r.install=="function"&&n.use(r)}),n.config.errorHandler=(r,a,l)=>{console.error("[Vue Error]",r),l&&console.error("[Info]",l)},console.log(`%cArbo Dashboard Plugin v${VM}`,"color: #4CAF50; font-weight: bold;"),console.log(n.config.globalProperties),n};typeof window<"u"&&(window.arboDashboard=HS),un.default=HS,un.initDashboard=HS,Object.defineProperties(un,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|