Files
establo/frontend/dist/assets/index-eda5d5f8.js
2024-08-13 16:46:44 -04:00

299 lines
1.9 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var yM=Object.defineProperty;var bM=(i,e,t)=>e in i?yM(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ot=(i,e,t)=>(bM(i,typeof e!="symbol"?e+"":e,t),t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function Jy(i,e){const t=Object.create(null),n=i.split(",");for(let s=0;s<n.length;s++)t[n[s]]=!0;return e?s=>!!t[s.toLowerCase()]:s=>!!t[s]}const Xt={},mc=[],Js=()=>{},wM=()=>!1,SM=/^on[^a-z]/,xg=i=>SM.test(i),eb=i=>i.startsWith("onUpdate:"),vi=Object.assign,tb=(i,e)=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)},EM=Object.prototype.hasOwnProperty,Rt=(i,e)=>EM.call(i,e),Xe=Array.isArray,vc=i=>Ag(i)==="[object Map]",J0=i=>Ag(i)==="[object Set]",ht=i=>typeof i=="function",ui=i=>typeof i=="string",ib=i=>typeof i=="symbol",zt=i=>i!==null&&typeof i=="object",eT=i=>zt(i)&&ht(i.then)&&ht(i.catch),tT=Object.prototype.toString,Ag=i=>tT.call(i),_M=i=>Ag(i).slice(8,-1),iT=i=>Ag(i)==="[object Object]",nb=i=>ui(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,up=Jy(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Dg=i=>{const e=Object.create(null);return t=>e[t]||(e[t]=i(t))},RM=/-(\w)/g,Ts=Dg(i=>i.replace(RM,(e,t)=>t?t.toUpperCase():"")),TM=/\B([A-Z])/g,Tl=Dg(i=>i.replace(TM,"-$1").toLowerCase()),wr=Dg(i=>i.charAt(0).toUpperCase()+i.slice(1)),uv=Dg(i=>i?`on${wr(i)}`:""),Rd=(i,e)=>!Object.is(i,e),dp=(i,e)=>{for(let t=0;t<i.length;t++)i[t](e)},Pp=(i,e,t)=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value:t})},gC=i=>{const e=parseFloat(i);return isNaN(e)?i:e},xM=i=>{const e=ui(i)?Number(i):NaN;return isNaN(e)?i:e};let eE;const mC=()=>eE||(eE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yh(i){if(Xe(i)){const e={};for(let t=0;t<i.length;t++){const n=i[t],s=ui(n)?PM(n):yh(n);if(s)for(const o in s)e[o]=s[o]}return e}else{if(ui(i))return i;if(zt(i))return i}}const AM=/;(?![^(]*\))/g,DM=/:([^]+)/,OM=/\/\*[^]*?\*\//g;function PM(i){const e={};return i.replace(OM,"").split(AM).forEach(t=>{if(t){const n=t.split(DM);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function en(i){let e="";if(ui(i))e=i;else if(Xe(i))for(let t=0;t<i.length;t++){const n=en(i[t]);n&&(e+=n+" ")}else if(zt(i))for(const t in i)i[t]&&(e+=t+" ");return e.trim()}const IM="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",MM=Jy(IM);function nT(i){return!!i||i===""}const Me=i=>ui(i)?i:i==null?"":Xe(i)||zt(i)&&(i.toString===tT||!ht(i.toString))?JSON.stringify(i,sT,2):String(i),sT=(i,e)=>e&&e.__v_isRef?sT(i,e.value):vc(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,s])=>(t[`${n} =>`]=s,t),{})}:J0(e)?{[`Set(${e.size})`]:[...e.values()]}:zt(e)&&!Xe(e)&&!iT(e)?String(e):e;let $n;class oT{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=$n,!e&&$n&&(this.index=($n.scopes||($n.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=$n;try{return $n=this,e()}finally{$n=t}}}on(){$n=this}off(){$n=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function Og(i){return new oT(i)}function LM(i,e=$n){e&&e.active&&e.effects.push(i)}function FM(){return $n}function Mn(i){$n&&$n.cleanups.push(i)}const sb=i=>{const e=new Set(i);return e.w=0,e.n=0,e},rT=i=>(i.w&na)>0,aT=i=>(i.n&na)>0,NM=({deps:i})=>{if(i.length)for(let e=0;e<i.length;e++)i[e].w|=na},kM=i=>{const{deps:e}=i;if(e.length){let t=0;for(let n=0;n<e.length;n++){const s=e[n];rT(s)&&!aT(s)?s.delete(i):e[t++]=s,s.w&=~na,s.n&=~na}e.length=t}},Ip=new WeakMap;let Ku=0,na=1;const vC=30;let $s;const il=Symbol(""),CC=Symbol("");class ob{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,LM(this,n)}run(){if(!this.active)return this.fn();let e=$s,t=qr;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=$s,$s=this,qr=!0,na=1<<++Ku,Ku<=vC?NM(this):tE(this),this.fn()}finally{Ku<=vC&&kM(this),na=1<<--Ku,$s=this.parent,qr=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){$s===this?this.deferStop=!0:this.active&&(tE(this),this.onStop&&this.onStop(),this.active=!1)}}function tE(i){const{deps:e}=i;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(i);e.length=0}}let qr=!0;const lT=[];function eu(){lT.push(qr),qr=!1}function tu(){const i=lT.pop();qr=i===void 0?!0:i}function Ln(i,e,t){if(qr&&$s){let n=Ip.get(i);n||Ip.set(i,n=new Map);let s=n.get(t);s||n.set(t,s=sb()),cT(s)}}function cT(i,e){let t=!1;Ku<=vC?aT(i)||(i.n|=na,t=!rT(i)):t=!i.has($s),t&&(i.add($s),$s.deps.push(i))}function ur(i,e,t,n,s,o){const r=Ip.get(i);if(!r)return;let a=[];if(e==="clear")a=[...r.values()];else if(t==="length"&&Xe(i)){const l=Number(n);r.forEach((c,u)=>{(u==="length"||u>=l)&&a.push(c)})}else switch(t!==void 0&&a.push(r.get(t)),e){case"add":Xe(i)?nb(t)&&a.push(r.get("length")):(a.push(r.get(il)),vc(i)&&a.push(r.get(CC)));break;case"delete":Xe(i)||(a.push(r.get(il)),vc(i)&&a.push(r.get(CC)));break;case"set":vc(i)&&a.push(r.get(il));break}if(a.length===1)a[0]&&yC(a[0]);else{const l=[];for(const c of a)c&&l.push(...c);yC(sb(l))}}function yC(i,e){const t=Xe(i)?i:[...i];for(const n of t)n.computed&&iE(n);for(const n of t)n.computed||iE(n)}function iE(i,e){(i!==$s||i.allowRecurse)&&(i.scheduler?i.scheduler():i.run())}function VM(i,e){var t;return(t=Ip.get(i))==null?void 0:t.get(e)}const GM=Jy("__proto__,__v_isRef,__isVue"),uT=new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(ib)),HM=rb(),BM=rb(!1,!0),WM=rb(!0),nE=UM();function UM(){const i={};return["includes","indexOf","lastIndexOf"].forEach(e=>{i[e]=function(...t){const n=it(this);for(let o=0,r=this.length;o<r;o++)Ln(n,"get",o+"");const s=n[e](...t);return s===-1||s===!1?n[e](...t.map(it)):s}}),["push","pop","shift","unshift","splice"].forEach(e=>{i[e]=function(...t){eu();const n=it(this)[e].apply(this,t);return tu(),n}}),i}function jM(i){const e=it(this);return Ln(e,"has",i),e.hasOwnProperty(i)}function rb(i=!1,e=!1){return function(n,s,o){if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return e;if(s==="__v_raw"&&o===(i?e?rL:gT:e?pT:fT).get(n))return n;const r=Xe(n);if(!i){if(r&&Rt(nE,s))return Reflect.get(nE,s,o);if(s==="hasOwnProperty")return jM}const a=Reflect.get(n,s,o);return(ib(s)?uT.has(s):GM(s))||(i||Ln(n,"get",s),e)?a:ii(a)?r&&nb(s)?a:a.value:zt(a)?i?bh(a):xi(a):a}}const $M=dT(),zM=dT(!0);function dT(i=!1){return function(t,n,s,o){let r=t[n];if(Tc(r)&&ii(r)&&!ii(s))return!1;if(!i&&(!Mp(s)&&!Tc(s)&&(r=it(r),s=it(s)),!Xe(t)&&ii(r)&&!ii(s)))return r.value=s,!0;const a=Xe(t)&&nb(n)?Number(n)<t.length:Rt(t,n),l=Reflect.set(t,n,s,o);return t===it(o)&&(a?Rd(s,r)&&ur(t,"set",n,s):ur(t,"add",n,s)),l}}function KM(i,e){const t=Rt(i,e);i[e];const n=Reflect.deleteProperty(i,e);return n&&t&&ur(i,"delete",e,void 0),n}function YM(i,e){const t=Reflect.has(i,e);return(!ib(e)||!uT.has(e))&&Ln(i,"has",e),t}function qM(i){return Ln(i,"iterate",Xe(i)?"length":il),Reflect.ownKeys(i)}const hT={get:HM,set:$M,deleteProperty:KM,has:YM,ownKeys:qM},XM={get:WM,set(i,e){return!0},deleteProperty(i,e){return!0}},QM=vi({},hT,{get:BM,set:zM}),ab=i=>i,Pg=i=>Reflect.getPrototypeOf(i);function _f(i,e,t=!1,n=!1){i=i.__v_raw;const s=it(i),o=it(e);t||(e!==o&&Ln(s,"get",e),Ln(s,"get",o));const{has:r}=Pg(s),a=n?ab:t?ub:Td;if(r.call(s,e))return a(i.get(e));if(r.call(s,o))return a(i.get(o));i!==s&&i.get(e)}function Rf(i,e=!1){const t=this.__v_raw,n=it(t),s=it(i);return e||(i!==s&&Ln(n,"has",i),Ln(n,"has",s)),i===s?t.has(i):t.has(i)||t.has(s)}function Tf(i,e=!1){return i=i.__v_raw,!e&&Ln(it(i),"iterate",il),Reflect.get(i,"size",i)}function sE(i){i=it(i);const e=it(this);return Pg(e).has.call(e,i)||(e.add(i),ur(e,"add",i,i)),this}function oE(i,e){e=it(e);const t=it(this),{has:n,get:s}=Pg(t);let o=n.call(t,i);o||(i=it(i),o=n.call(t,i));const r=s.call(t,i);return t.set(i,e),o?Rd(e,r)&&ur(t,"set",i,e):ur(t,"add",i,e),this}function rE(i){const e=it(this),{has:t,get:n}=Pg(e);let s=t.call(e,i);s||(i=it(i),s=t.call(e,i)),n&&n.call(e,i);const o=e.delete(i);return s&&ur(e,"delete",i,void 0),o}function aE(){const i=it(this),e=i.size!==0,t=i.clear();return e&&ur(i,"clear",void 0,void 0),t}function xf(i,e){return function(n,s){const o=this,r=o.__v_raw,a=it(r),l=e?ab:i?ub:Td;return!i&&Ln(a,"iterate",il),r.forEach((c,u)=>n.call(s,l(c),l(u),o))}}function Af(i,e,t){return function(...n){const s=this.__v_raw,o=it(s),r=vc(o),a=i==="entries"||i===Symbol.iterator&&r,l=i==="keys"&&r,c=s[i](...n),u=t?ab:e?ub:Td;return!e&&Ln(o,"iterate",l?CC:il),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Mr(i){return function(...e){return i==="delete"?!1:this}}function ZM(){const i={get(o){return _f(this,o)},get size(){return Tf(this)},has:Rf,add:sE,set:oE,delete:rE,clear:aE,forEach:xf(!1,!1)},e={get(o){return _f(this,o,!1,!0)},get size(){return Tf(this)},has:Rf,add:sE,set:oE,delete:rE,clear:aE,forEach:xf(!1,!0)},t={get(o){return _f(this,o,!0)},get size(){return Tf(this,!0)},has(o){return Rf.call(this,o,!0)},add:Mr("add"),set:Mr("set"),delete:Mr("delete"),clear:Mr("clear"),forEach:xf(!0,!1)},n={get(o){return _f(this,o,!0,!0)},get size(){return Tf(this,!0)},has(o){return Rf.call(this,o,!0)},add:Mr("add"),set:Mr("set"),delete:Mr("delete"),clear:Mr("clear"),forEach:xf(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{i[o]=Af(o,!1,!1),t[o]=Af(o,!0,!1),e[o]=Af(o,!1,!0),n[o]=Af(o,!0,!0)}),[i,t,e,n]}const[JM,eL,tL,iL]=ZM();function lb(i,e){const t=e?i?iL:tL:i?eL:JM;return(n,s,o)=>s==="__v_isReactive"?!i:s==="__v_isReadonly"?i:s==="__v_raw"?n:Reflect.get(Rt(t,s)&&s in n?t:n,s,o)}const nL={get:lb(!1,!1)},sL={get:lb(!1,!0)},oL={get:lb(!0,!1)},fT=new WeakMap,pT=new WeakMap,gT=new WeakMap,rL=new WeakMap;function aL(i){switch(i){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lL(i){return i.__v_skip||!Object.isExtensible(i)?0:aL(_M(i))}function xi(i){return Tc(i)?i:cb(i,!1,hT,nL,fT)}function mT(i){return cb(i,!1,QM,sL,pT)}function bh(i){return cb(i,!0,XM,oL,gT)}function cb(i,e,t,n,s){if(!zt(i)||i.__v_raw&&!(e&&i.__v_isReactive))return i;const o=s.get(i);if(o)return o;const r=lL(i);if(r===0)return i;const a=new Proxy(i,r===2?n:t);return s.set(i,a),a}function Cc(i){return Tc(i)?Cc(i.__v_raw):!!(i&&i.__v_isReactive)}function Tc(i){return!!(i&&i.__v_isReadonly)}function Mp(i){return!!(i&&i.__v_isShallow)}function Ig(i){return Cc(i)||Tc(i)}function it(i){const e=i&&i.__v_raw;return e?it(e):i}function ad(i){return Pp(i,"__v_skip",!0),i}const Td=i=>zt(i)?xi(i):i,ub=i=>zt(i)?bh(i):i;function vT(i){qr&&$s&&(i=it(i),cT(i.dep||(i.dep=sb())))}function CT(i,e){i=it(i);const t=i.dep;t&&yC(t)}function ii(i){return!!(i&&i.__v_isRef===!0)}function Te(i){return yT(i,!1)}function Fe(i){return yT(i,!0)}function yT(i,e){return ii(i)?i:new cL(i,e)}class cL{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:it(e),this._value=t?e:Td(e)}get value(){return vT(this),this._value}set value(e){const t=this.__v_isShallow||Mp(e)||Tc(e);e=t?e:it(e),Rd(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Td(e),CT(this))}}function Ni(i){return ii(i)?i.value:i}const uL={get:(i,e,t)=>Ni(Reflect.get(i,e,t)),set:(i,e,t,n)=>{const s=i[e];return ii(s)&&!ii(t)?(s.value=t,!0):Reflect.set(i,e,t,n)}};function bT(i){return Cc(i)?i:new Proxy(i,uL)}function db(i){const e=Xe(i)?new Array(i.length):{};for(const t in i)e[t]=wT(i,t);return e}class dL{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return VM(it(this._object),this._key)}}class hL{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Se(i,e,t){return ii(i)?i:ht(i)?new hL(i):zt(i)&&arguments.length>1?wT(i,e,t):Te(i)}function wT(i,e,t){const n=i[e];return ii(n)?n:new dL(i,e,t)}class fL{constructor(e,t,n,s){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ob(e,()=>{this._dirty||(this._dirty=!0,CT(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=it(this);return vT(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function pL(i,e,t=!1){let n,s;const o=ht(i);return o?(n=i,s=Js):(n=i.get,s=i.set),new fL(n,s,o||!s,t)}function Xr(i,e,t,n){let s;try{s=n?i(...n):i()}catch(o){Mg(o,e,t)}return s}function ws(i,e,t,n){if(ht(i)){const o=Xr(i,e,t,n);return o&&eT(o)&&o.catch(r=>{Mg(r,e,t)}),o}const s=[];for(let o=0;o<i.length;o++)s.push(ws(i[o],e,t,n));return s}function Mg(i,e,t,n=!0){const s=e?e.vnode:null;if(e){let o=e.parent;const r=e.proxy,a=t;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](i,r,a)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Xr(l,null,10,[i,r,a]);return}}gL(i,t,s,n)}function gL(i,e,t,n=!0){console.error(i)}let xd=!1,bC=!1;const nn=[];let To=0;const yc=[];let tr=null,Ya=0;const ST=Promise.resolve();let hb=null;function Wt(i){const e=hb||ST;return i?e.then(this?i.bind(this):i):e}function mL(i){let e=To+1,t=nn.length;for(;e<t;){const n=e+t>>>1;Ad(nn[n])<i?e=n+1:t=n}return e}function fb(i){(!nn.length||!nn.includes(i,xd&&i.allowRecurse?To+1:To))&&(i.id==null?nn.push(i):nn.splice(mL(i.id),0,i),ET())}function ET(){!xd&&!bC&&(bC=!0,hb=ST.then(RT))}function vL(i){const e=nn.indexOf(i);e>To&&nn.splice(e,1)}function CL(i){Xe(i)?yc.push(...i):(!tr||!tr.includes(i,i.allowRecurse?Ya+1:Ya))&&yc.push(i),ET()}function lE(i,e=xd?To+1:0){for(;e<nn.length;e++){const t=nn[e];t&&t.pre&&(nn.splice(e,1),e--,t())}}function _T(i){if(yc.length){const e=[...new Set(yc)];if(yc.length=0,tr){tr.push(...e);return}for(tr=e,tr.sort((t,n)=>Ad(t)-Ad(n)),Ya=0;Ya<tr.length;Ya++)tr[Ya]();tr=null,Ya=0}}const Ad=i=>i.id==null?1/0:i.id,yL=(i,e)=>{const t=Ad(i)-Ad(e);if(t===0){if(i.pre&&!e.pre)return-1;if(e.pre&&!i.pre)return 1}return t};function RT(i){bC=!1,xd=!0,nn.sort(yL);const e=Js;try{for(To=0;To<nn.length;To++){const t=nn[To];t&&t.active!==!1&&Xr(t,null,14)}}finally{To=0,nn.length=0,_T(),xd=!1,hb=null,(nn.length||yc.length)&&RT()}}function bL(i,e,...t){if(i.isUnmounted)return;const n=i.vnode.props||Xt;let s=t;const o=e.startsWith("update:"),r=o&&e.slice(7);if(r&&r in n){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:h}=n[u]||Xt;h&&(s=t.map(f=>ui(f)?f.trim():f)),d&&(s=t.map(gC))}let a,l=n[a=uv(e)]||n[a=uv(Ts(e))];!l&&o&&(l=n[a=uv(Tl(e))]),l&&ws(l,i,6,s);const c=n[a+"Once"];if(c){if(!i.emitted)i.emitted={};else if(i.emitted[a])return;i.emitted[a]=!0,ws(c,i,6,s)}}function TT(i,e,t=!1){const n=e.emitsCache,s=n.get(i);if(s!==void 0)return s;const o=i.emits;let r={},a=!1;if(!ht(i)){const l=c=>{const u=TT(c,e,!0);u&&(a=!0,vi(r,u))};!t&&e.mixins.length&&e.mixins.forEach(l),i.extends&&l(i.extends),i.mixins&&i.mixins.forEach(l)}return!o&&!a?(zt(i)&&n.set(i,null),null):(Xe(o)?o.forEach(l=>r[l]=null):vi(r,o),zt(i)&&n.set(i,r),r)}function Lg(i,e){return!i||!xg(e)?!1:(e=e.slice(2).replace(/Once$/,""),Rt(i,e[0].toLowerCase()+e.slice(1))||Rt(i,Tl(e))||Rt(i,e))}let Xn=null,Fg=null;function Lp(i){const e=Xn;return Xn=i,Fg=i&&i.type.__scopeId||null,e}function xT(i){Fg=i}function AT(){Fg=null}function oe(i,e=Xn,t){if(!e||i._n)return i;const n=(...s)=>{n._d&&wE(-1);const o=Lp(e);let r;try{r=i(...s)}finally{Lp(o),n._d&&wE(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function dv(i){const{type:e,vnode:t,proxy:n,withProxy:s,props:o,propsOptions:[r],slots:a,attrs:l,emit:c,render:u,renderCache:d,data:h,setupState:f,ctx:g,inheritAttrs:p}=i;let v,y;const C=Lp(i);try{if(t.shapeFlag&4){const w=s||n;v=So(u.call(w,w,d,o,f,h,g)),y=l}else{const w=e;v=So(w.length>1?w(o,{attrs:l,slots:a,emit:c}):w(o,null)),y=e.props?l:wL(l)}}catch(w){ud.length=0,Mg(w,i,1),v=b(eo)}let m=v;if(y&&p!==!1){const w=Object.keys(y),{shapeFlag:E}=m;w.length&&E&7&&(r&&w.some(eb)&&(y=SL(y,r)),m=dr(m,y))}return t.dirs&&(m=dr(m),m.dirs=m.dirs?m.dirs.concat(t.dirs):t.dirs),t.transition&&(m.transition=t.transition),v=m,Lp(C),v}const wL=i=>{let e;for(const t in i)(t==="class"||t==="style"||xg(t))&&((e||(e={}))[t]=i[t]);return e},SL=(i,e)=>{const t={};for(const n in i)(!eb(n)||!(n.slice(9)in e))&&(t[n]=i[n]);return t};function EL(i,e,t){const{props:n,children:s,component:o}=i,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return n?cE(n,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(r[h]!==n[h]&&!Lg(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===r?!1:n?r?cE(n,r,c):!0:!!r;return!1}function cE(i,e,t){const n=Object.keys(e);if(n.length!==Object.keys(i).length)return!0;for(let s=0;s<n.length;s++){const o=n[s];if(e[o]!==i[o]&&!Lg(t,o))return!0}return!1}function _L({vnode:i,parent:e},t){for(;e&&e.subTree===i;)(i=e.vnode).el=t,e=e.parent}const RL=i=>i.__isSuspense;function TL(i,e){e&&e.pendingBranch?Xe(i)?e.effects.push(...i):e.effects.push(i):CL(i)}function _n(i,e){return pb(i,null,e)}const Df={};function Le(i,e,t){return pb(i,e,t)}function pb(i,e,{immediate:t,deep:n,flush:s,onTrack:o,onTrigger:r}=Xt){var a;const l=FM()===((a=Fi)==null?void 0:a.scope)?Fi:null;let c,u=!1,d=!1;if(ii(i)?(c=()=>i.value,u=Mp(i)):Cc(i)?(c=()=>i,n=!0):Xe(i)?(d=!0,u=i.some(w=>Cc(w)||Mp(w)),c=()=>i.map(w=>{if(ii(w))return w.value;if(Cc(w))return Za(w);if(ht(w))return Xr(w,l,2)})):ht(i)?e?c=()=>Xr(i,l,2):c=()=>{if(!(l&&l.isUnmounted))return h&&h(),ws(i,l,3,[f])}:c=Js,e&&n){const w=c;c=()=>Za(w())}let h,f=w=>{h=C.onStop=()=>{Xr(w,l,4)}},g;if(Id)if(f=Js,e?t&&ws(e,l,3,[c(),d?[]:void 0,f]):c(),s==="sync"){const w=mF();g=w.__watcherHandles||(w.__watcherHandles=[])}else return Js;let p=d?new Array(i.length).fill(Df):Df;const v=()=>{if(C.active)if(e){const w=C.run();(n||u||(d?w.some((E,R)=>Rd(E,p[R])):Rd(w,p)))&&(h&&h(),ws(e,l,3,[w,p===Df?void 0:d&&p[0]===Df?[]:p,f]),p=w)}else C.run()};v.allowRecurse=!!e;let y;s==="sync"?y=v:s==="post"?y=()=>On(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),y=()=>fb(v));const C=new ob(c,y);e?t?v():p=C.run():s==="post"?On(C.run.bind(C),l&&l.suspense):C.run();const m=()=>{C.stop(),l&&l.scope&&tb(l.scope.effects,C)};return g&&g.push(m),m}function xL(i,e,t){const n=this.proxy,s=ui(i)?i.includes(".")?DT(n,i):()=>n[i]:i.bind(n,n);let o;ht(e)?o=e:(o=e.handler,t=e);const r=Fi;xc(this);const a=pb(s,o.bind(n),t);return r?xc(r):nl(),a}function DT(i,e){const t=e.split(".");return()=>{let n=i;for(let s=0;s<t.length&&n;s++)n=n[t[s]];return n}}function Za(i,e){if(!zt(i)||i.__v_skip||(e=e||new Set,e.has(i)))return i;if(e.add(i),ii(i))Za(i.value,e);else if(Xe(i))for(let t=0;t<i.length;t++)Za(i[t],e);else if(J0(i)||vc(i))i.forEach(t=>{Za(t,e)});else if(iT(i))for(const t in i)Za(i[t],e);return i}function Mt(i,e){const t=Xn;if(t===null)return i;const n=Hg(t)||t.proxy,s=i.dirs||(i.dirs=[]);for(let o=0;o<e.length;o++){let[r,a,l,c=Xt]=e[o];r&&(ht(r)&&(r={mounted:r,updated:r}),r.deep&&Za(a),s.push({dir:r,instance:n,value:a,oldValue:void 0,arg:l,modifiers:c}))}return i}function La(i,e,t,n){const s=i.dirs,o=e&&e.dirs;for(let r=0;r<s.length;r++){const a=s[r];o&&(a.oldValue=o[r].value);let l=a.dir[n];l&&(eu(),ws(l,t,8,[i.el,a,i,e]),tu())}}function OT(){const i={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pi(()=>{i.isMounted=!0}),dn(()=>{i.isUnmounting=!0}),i}const fs=[Function,Array],PT={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fs,onEnter:fs,onAfterEnter:fs,onEnterCancelled:fs,onBeforeLeave:fs,onLeave:fs,onAfterLeave:fs,onLeaveCancelled:fs,onBeforeAppear:fs,onAppear:fs,onAfterAppear:fs,onAppearCancelled:fs},AL={name:"BaseTransition",props:PT,setup(i,{slots:e}){const t=Sh(),n=OT();let s;return()=>{const o=e.default&&gb(e.default(),!0);if(!o||!o.length)return;let r=o[0];if(o.length>1){for(const p of o)if(p.type!==eo){r=p;break}}const a=it(i),{mode:l}=a;if(n.isLeaving)return hv(r);const c=uE(r);if(!c)return hv(r);const u=Dd(c,a,n,t);Od(c,u);const d=t.subTree,h=d&&uE(d);let f=!1;const{getTransitionKey:g}=c.type;if(g){const p=g();s===void 0?s=p:p!==s&&(s=p,f=!0)}if(h&&h.type!==eo&&(!qa(c,h)||f)){const p=Dd(h,a,n,t);if(Od(h,p),l==="out-in")return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},hv(r);l==="in-out"&&c.type!==eo&&(p.delayLeave=(v,y,C)=>{const m=IT(n,h);m[String(h.key)]=h,v._leaveCb=()=>{y(),v._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=C})}return r}}},DL=AL;function IT(i,e){const{leavingVNodes:t}=i;let n=t.get(e.type);return n||(n=Object.create(null),t.set(e.type,n)),n}function Dd(i,e,t,n){const{appear:s,mode:o,persisted:r=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:h,onAfterLeave:f,onLeaveCancelled:g,onBeforeAppear:p,onAppear:v,onAfterAppear:y,onAppearCancelled:C}=e,m=String(i.key),w=IT(t,i),E=(A,D)=>{A&&ws(A,n,9,D)},R=(A,D)=>{const L=D[1];E(A,D),Xe(A)?A.every(S=>S.length<=1)&&L():A.length<=1&&L()},O={mode:o,persisted:r,beforeEnter(A){let D=a;if(!t.isMounted)if(s)D=p||a;else return;A._leaveCb&&A._leaveCb(!0);const L=w[m];L&&qa(i,L)&&L.el._leaveCb&&L.el._leaveCb(),E(D,[A])},enter(A){let D=l,L=c,S=u;if(!t.isMounted)if(s)D=v||l,L=y||c,S=C||u;else return;let x=!1;const T=A._enterCb=H=>{x||(x=!0,H?E(S,[A]):E(L,[A]),O.delayedLeave&&O.delayedLeave(),A._enterCb=void 0)};D?R(D,[A,T]):T()},leave(A,D){const L=String(i.key);if(A._enterCb&&A._enterCb(!0),t.isUnmounting)return D();E(d,[A]);let S=!1;const x=A._leaveCb=T=>{S||(S=!0,D(),T?E(g,[A]):E(f,[A]),A._leaveCb=void 0,w[L]===i&&delete w[L])};w[L]=i,h?R(h,[A,x]):x()},clone(A){return Dd(A,e,t,n)}};return O}function hv(i){if(Ng(i))return i=dr(i),i.children=null,i}function uE(i){return Ng(i)?i.children?i.children[0]:void 0:i}function Od(i,e){i.shapeFlag&6&&i.component?Od(i.component.subTree,e):i.shapeFlag&128?(i.ssContent.transition=e.clone(i.ssContent),i.ssFallback.transition=e.clone(i.ssFallback)):i.transition=e}function gb(i,e=!1,t){let n=[],s=0;for(let o=0;o<i.length;o++){let r=i[o];const a=t==null?r.key:String(t)+String(r.key!=null?r.key:o);r.type===He?(r.patchFlag&128&&s++,n=n.concat(gb(r.children,e,a))):(e||r.type!==eo)&&n.push(a!=null?dr(r,{key:a}):r)}if(s>1)for(let o=0;o<n.length;o++)n[o].patchFlag=-2;return n}function xl(i,e){return ht(i)?(()=>vi({name:i.name},e,{setup:i}))():i}const hp=i=>!!i.type.__asyncLoader,Ng=i=>i.type.__isKeepAlive;function MT(i,e){FT(i,"a",e)}function LT(i,e){FT(i,"da",e)}function FT(i,e,t=Fi){const n=i.__wdc||(i.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return i()});if(kg(e,n,t),t){let s=t.parent;for(;s&&s.parent;)Ng(s.parent.vnode)&&OL(n,e,t,s),s=s.parent}}function OL(i,e,t,n){const s=kg(e,i,n,!0);VT(()=>{tb(n[e],s)},t)}function kg(i,e,t=Fi,n=!1){if(t){const s=t[i]||(t[i]=[]),o=e.__weh||(e.__weh=(...r)=>{if(t.isUnmounted)return;eu(),xc(t);const a=ws(e,t,i,r);return nl(),tu(),a});return n?s.unshift(o):s.push(o),o}}const Sr=i=>(e,t=Fi)=>(!Id||i==="sp")&&kg(i,(...n)=>e(...n),t),Vg=Sr("bm"),Pi=Sr("m"),NT=Sr("bu"),kT=Sr("u"),dn=Sr("bum"),VT=Sr("um"),PL=Sr("sp"),IL=Sr("rtg"),ML=Sr("rtc");function LL(i,e=Fi){kg("ec",i,e)}const mb="components",FL="directives";function de(i,e){return vb(mb,i,!0,e)||i}const GT=Symbol.for("v-ndc");function NL(i){return ui(i)?vb(mb,i,!1)||i:i||GT}function Vi(i){return vb(FL,i)}function vb(i,e,t=!0,n=!1){const s=Xn||Fi;if(s){const o=s.type;if(i===mb){const a=fF(o,!1);if(a&&(a===e||a===Ts(e)||a===wr(Ts(e))))return o}const r=dE(s[i]||o[i],e)||dE(s.appContext[i],e);return!r&&n?o:r}}function dE(i,e){return i&&(i[e]||i[Ts(e)]||i[wr(Ts(e))])}function Wo(i,e,t,n){let s;const o=t&&t[n];if(Xe(i)||ui(i)){s=new Array(i.length);for(let r=0,a=i.length;r<a;r++)s[r]=e(i[r],r,void 0,o&&o[r])}else if(typeof i=="number"){s=new Array(i);for(let r=0;r<i;r++)s[r]=e(r+1,r,void 0,o&&o[r])}else if(zt(i))if(i[Symbol.iterator])s=Array.from(i,(r,a)=>e(r,a,void 0,o&&o[a]));else{const r=Object.keys(i);s=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const c=r[a];s[a]=e(i[c],c,a,o&&o[a])}}else s=[];return t&&(t[n]=s),s}const wC=i=>i?XT(i)?Hg(i)||i.proxy:wC(i.parent):null,ld=vi(Object.create(null),{$:i=>i,$el:i=>i.vnode.el,$data:i=>i.data,$props:i=>i.props,$attrs:i=>i.attrs,$slots:i=>i.slots,$refs:i=>i.refs,$parent:i=>wC(i.parent),$root:i=>wC(i.root),$emit:i=>i.emit,$options:i=>Cb(i),$forceUpdate:i=>i.f||(i.f=()=>fb(i.update)),$nextTick:i=>i.n||(i.n=Wt.bind(i.proxy)),$watch:i=>xL.bind(i)}),fv=(i,e)=>i!==Xt&&!i.__isScriptSetup&&Rt(i,e),kL={get({_:i},e){const{ctx:t,setupState:n,data:s,props:o,accessCache:r,type:a,appContext:l}=i;let c;if(e[0]!=="$"){const f=r[e];if(f!==void 0)switch(f){case 1:return n[e];case 2:return s[e];case 4:return t[e];case 3:return o[e]}else{if(fv(n,e))return r[e]=1,n[e];if(s!==Xt&&Rt(s,e))return r[e]=2,s[e];if((c=i.propsOptions[0])&&Rt(c,e))return r[e]=3,o[e];if(t!==Xt&&Rt(t,e))return r[e]=4,t[e];SC&&(r[e]=0)}}const u=ld[e];let d,h;if(u)return e==="$attrs"&&Ln(i,"get",e),u(i);if((d=a.__cssModules)&&(d=d[e]))return d;if(t!==Xt&&Rt(t,e))return r[e]=4,t[e];if(h=l.config.globalProperties,Rt(h,e))return h[e]},set({_:i},e,t){const{data:n,setupState:s,ctx:o}=i;return fv(s,e)?(s[e]=t,!0):n!==Xt&&Rt(n,e)?(n[e]=t,!0):Rt(i.props,e)||e[0]==="$"&&e.slice(1)in i?!1:(o[e]=t,!0)},has({_:{data:i,setupState:e,accessCache:t,ctx:n,appContext:s,propsOptions:o}},r){let a;return!!t[r]||i!==Xt&&Rt(i,r)||fv(e,r)||(a=o[0])&&Rt(a,r)||Rt(n,r)||Rt(ld,r)||Rt(s.config.globalProperties,r)},defineProperty(i,e,t){return t.get!=null?i._.accessCache[e]=0:Rt(t,"value")&&this.set(i,e,t.value,null),Reflect.defineProperty(i,e,t)}};function hE(i){return Xe(i)?i.reduce((e,t)=>(e[t]=null,e),{}):i}let SC=!0;function VL(i){const e=Cb(i),t=i.proxy,n=i.ctx;SC=!1,e.beforeCreate&&fE(e.beforeCreate,i,"bc");const{data:s,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:g,activated:p,deactivated:v,beforeDestroy:y,beforeUnmount:C,destroyed:m,unmounted:w,render:E,renderTracked:R,renderTriggered:O,errorCaptured:A,serverPrefetch:D,expose:L,inheritAttrs:S,components:x,directives:T,filters:H}=e;if(c&&GL(c,n,null),r)for(const te in r){const F=r[te];ht(F)&&(n[te]=F.bind(t))}if(s){const te=s.call(t,t);zt(te)&&(i.data=xi(te))}if(SC=!0,o)for(const te in o){const F=o[te],k=ht(F)?F.bind(t,t):ht(F.get)?F.get.bind(t,t):Js,q=!ht(F)&&ht(F.set)?F.set.bind(t):Js,V=z({get:k,set:q});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>V.value,set:J=>V.value=J})}if(a)for(const te in a)HT(a[te],n,t,te);if(l){const te=ht(l)?l.call(t):l;Reflect.ownKeys(te).forEach(F=>{Ht(F,te[F])})}u&&fE(u,i,"c");function Q(te,F){Xe(F)?F.forEach(k=>te(k.bind(t))):F&&te(F.bind(t))}if(Q(Vg,d),Q(Pi,h),Q(NT,f),Q(kT,g),Q(MT,p),Q(LT,v),Q(LL,A),Q(ML,R),Q(IL,O),Q(dn,C),Q(VT,w),Q(PL,D),Xe(L))if(L.length){const te=i.exposed||(i.exposed={});L.forEach(F=>{Object.defineProperty(te,F,{get:()=>t[F],set:k=>t[F]=k})})}else i.exposed||(i.exposed={});E&&i.render===Js&&(i.render=E),S!=null&&(i.inheritAttrs=S),x&&(i.components=x),T&&(i.directives=T)}function GL(i,e,t=Js){Xe(i)&&(i=EC(i));for(const n in i){const s=i[n];let o;zt(s)?"default"in s?o=ct(s.from||n,s.default,!0):o=ct(s.from||n):o=ct(s),ii(o)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[n]=o}}function fE(i,e,t){ws(Xe(i)?i.map(n=>n.bind(e.proxy)):i.bind(e.proxy),e,t)}function HT(i,e,t,n){const s=n.includes(".")?DT(t,n):()=>t[n];if(ui(i)){const o=e[i];ht(o)&&Le(s,o)}else if(ht(i))Le(s,i.bind(t));else if(zt(i))if(Xe(i))i.forEach(o=>HT(o,e,t,n));else{const o=ht(i.handler)?i.handler.bind(t):e[i.handler];ht(o)&&Le(s,o,i)}}function Cb(i){const e=i.type,{mixins:t,extends:n}=e,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=i.appContext,a=o.get(e);let l;return a?l=a:!s.length&&!t&&!n?l=e:(l={},s.length&&s.forEach(c=>Fp(l,c,r,!0)),Fp(l,e,r)),zt(e)&&o.set(e,l),l}function Fp(i,e,t,n=!1){const{mixins:s,extends:o}=e;o&&Fp(i,o,t,!0),s&&s.forEach(r=>Fp(i,r,t,!0));for(const r in e)if(!(n&&r==="expose")){const a=HL[r]||t&&t[r];i[r]=a?a(i[r],e[r]):e[r]}return i}const HL={data:pE,props:gE,emits:gE,methods:Yu,computed:Yu,beforeCreate:pn,created:pn,beforeMount:pn,mounted:pn,beforeUpdate:pn,updated:pn,beforeDestroy:pn,beforeUnmount:pn,destroyed:pn,unmounted:pn,activated:pn,deactivated:pn,errorCaptured:pn,serverPrefetch:pn,components:Yu,directives:Yu,watch:WL,provide:pE,inject:BL};function pE(i,e){return e?i?function(){return vi(ht(i)?i.call(this,this):i,ht(e)?e.call(this,this):e)}:e:i}function BL(i,e){return Yu(EC(i),EC(e))}function EC(i){if(Xe(i)){const e={};for(let t=0;t<i.length;t++)e[i[t]]=i[t];return e}return i}function pn(i,e){return i?[...new Set([].concat(i,e))]:e}function Yu(i,e){return i?vi(Object.create(null),i,e):e}function gE(i,e){return i?Xe(i)&&Xe(e)?[...new Set([...i,...e])]:vi(Object.create(null),hE(i),hE(e??{})):e}function WL(i,e){if(!i)return e;if(!e)return i;const t=vi(Object.create(null),i);for(const n in e)t[n]=pn(i[n],e[n]);return t}function BT(){return{app:null,config:{isNativeTag:wM,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 UL=0;function jL(i,e){return function(n,s=null){ht(n)||(n=vi({},n)),s!=null&&!zt(s)&&(s=null);const o=BT(),r=new Set;let a=!1;const l=o.app={_uid:UL++,_component:n,_props:s,_container:null,_context:o,_instance:null,version:Eb,get config(){return o.config},set config(c){},use(c,...u){return r.has(c)||(c&&ht(c.install)?(r.add(c),c.install(l,...u)):ht(c)&&(r.add(c),c(l,...u))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,u){return u?(o.components[c]=u,l):o.components[c]},directive(c,u){return u?(o.directives[c]=u,l):o.directives[c]},mount(c,u,d){if(!a){const h=b(n,s);return h.appContext=o,u&&e?e(h,c):i(h,c,d),a=!0,l._container=c,c.__vue_app__=l,Hg(h.component)||h.component.proxy}},unmount(){a&&(i(null,l._container),delete l._container.__vue_app__)},provide(c,u){return o.provides[c]=u,l},runWithContext(c){Np=l;try{return c()}finally{Np=null}}};return l}}let Np=null;function Ht(i,e){if(Fi){let t=Fi.provides;const n=Fi.parent&&Fi.parent.provides;n===t&&(t=Fi.provides=Object.create(n)),t[i]=e}}function ct(i,e,t=!1){const n=Fi||Xn;if(n||Np){const s=n?n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:Np._context.provides;if(s&&i in s)return s[i];if(arguments.length>1)return t&&ht(e)?e.call(n&&n.proxy):e}}function $L(i,e,t,n=!1){const s={},o={};Pp(o,Gg,1),i.propsDefaults=Object.create(null),WT(i,e,s,o);for(const r in i.propsOptions[0])r in s||(s[r]=void 0);t?i.props=n?s:mT(s):i.type.props?i.props=s:i.props=o,i.attrs=o}function zL(i,e,t,n){const{props:s,attrs:o,vnode:{patchFlag:r}}=i,a=it(s),[l]=i.propsOptions;let c=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=i.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Lg(i.emitsOptions,h))continue;const f=e[h];if(l)if(Rt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const g=Ts(h);s[g]=_C(l,a,g,f,i,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{WT(i,e,s,o)&&(c=!0);let u;for(const d in a)(!e||!Rt(e,d)&&((u=Tl(d))===d||!Rt(e,u)))&&(l?t&&(t[d]!==void 0||t[u]!==void 0)&&(s[d]=_C(l,a,d,void 0,i,!0)):delete s[d]);if(o!==a)for(const d in o)(!e||!Rt(e,d))&&(delete o[d],c=!0)}c&&ur(i,"set","$attrs")}function WT(i,e,t,n){const[s,o]=i.propsOptions;let r=!1,a;if(e)for(let l in e){if(up(l))continue;const c=e[l];let u;s&&Rt(s,u=Ts(l))?!o||!o.includes(u)?t[u]=c:(a||(a={}))[u]=c:Lg(i.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,r=!0)}if(o){const l=it(t),c=a||Xt;for(let u=0;u<o.length;u++){const d=o[u];t[d]=_C(s,l,d,c[d],i,!Rt(c,d))}}return r}function _C(i,e,t,n,s,o){const r=i[t];if(r!=null){const a=Rt(r,"default");if(a&&n===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&ht(l)){const{propsDefaults:c}=s;t in c?n=c[t]:(xc(s),n=c[t]=l.call(null,e),nl())}else n=l}r[0]&&(o&&!a?n=!1:r[1]&&(n===""||n===Tl(t))&&(n=!0))}return n}function UT(i,e,t=!1){const n=e.propsCache,s=n.get(i);if(s)return s;const o=i.props,r={},a=[];let l=!1;if(!ht(i)){const u=d=>{l=!0;const[h,f]=UT(d,e,!0);vi(r,h),f&&a.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(u),i.extends&&u(i.extends),i.mixins&&i.mixins.forEach(u)}if(!o&&!l)return zt(i)&&n.set(i,mc),mc;if(Xe(o))for(let u=0;u<o.length;u++){const d=Ts(o[u]);mE(d)&&(r[d]=Xt)}else if(o)for(const u in o){const d=Ts(u);if(mE(d)){const h=o[u],f=r[d]=Xe(h)||ht(h)?{type:h}:vi({},h);if(f){const g=yE(Boolean,f.type),p=yE(String,f.type);f[0]=g>-1,f[1]=p<0||g<p,(g>-1||Rt(f,"default"))&&a.push(d)}}}const c=[r,a];return zt(i)&&n.set(i,c),c}function mE(i){return i[0]!=="$"}function vE(i){const e=i&&i.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:i===null?"null":""}function CE(i,e){return vE(i)===vE(e)}function yE(i,e){return Xe(e)?e.findIndex(t=>CE(t,i)):ht(e)&&CE(e,i)?0:-1}const jT=i=>i[0]==="_"||i==="$stable",yb=i=>Xe(i)?i.map(So):[So(i)],KL=(i,e,t)=>{if(e._n)return e;const n=oe((...s)=>yb(e(...s)),t);return n._c=!1,n},$T=(i,e,t)=>{const n=i._ctx;for(const s in i){if(jT(s))continue;const o=i[s];if(ht(o))e[s]=KL(s,o,n);else if(o!=null){const r=yb(o);e[s]=()=>r}}},zT=(i,e)=>{const t=yb(e);i.slots.default=()=>t},YL=(i,e)=>{if(i.vnode.shapeFlag&32){const t=e._;t?(i.slots=it(e),Pp(e,"_",t)):$T(e,i.slots={})}else i.slots={},e&&zT(i,e);Pp(i.slots,Gg,1)},qL=(i,e,t)=>{const{vnode:n,slots:s}=i;let o=!0,r=Xt;if(n.shapeFlag&32){const a=e._;a?t&&a===1?o=!1:(vi(s,e),!t&&a===1&&delete s._):(o=!e.$stable,$T(e,s)),r=e}else e&&(zT(i,e),r={default:1});if(o)for(const a in s)!jT(a)&&!(a in r)&&delete s[a]};function RC(i,e,t,n,s=!1){if(Xe(i)){i.forEach((h,f)=>RC(h,e&&(Xe(e)?e[f]:e),t,n,s));return}if(hp(n)&&!s)return;const o=n.shapeFlag&4?Hg(n.component)||n.component.proxy:n.el,r=s?null:o,{i:a,r:l}=i,c=e&&e.r,u=a.refs===Xt?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(ui(c)?(u[c]=null,Rt(d,c)&&(d[c]=null)):ii(c)&&(c.value=null)),ht(l))Xr(l,a,12,[r,u]);else{const h=ui(l),f=ii(l);if(h||f){const g=()=>{if(i.f){const p=h?Rt(d,l)?d[l]:u[l]:l.value;s?Xe(p)&&tb(p,o):Xe(p)?p.includes(o)||p.push(o):h?(u[l]=[o],Rt(d,l)&&(d[l]=u[l])):(l.value=[o],i.k&&(u[i.k]=l.value))}else h?(u[l]=r,Rt(d,l)&&(d[l]=r)):f&&(l.value=r,i.k&&(u[i.k]=r))};r?(g.id=-1,On(g,t)):g()}}}const On=TL;function XL(i){return QL(i)}function QL(i,e){const t=mC();t.__VUE__=!0;const{insert:n,remove:s,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Js,insertStaticContent:g}=i,p=(j,M,B,X=null,Z=null,ue=null,G=!1,U=null,I=!!M.dynamicChildren)=>{if(j===M)return;j&&!qa(j,M)&&(X=K(j),J(j,Z,ue,!0),j=null),M.patchFlag===-2&&(I=!1,M.dynamicChildren=null);const{type:_,ref:P,shapeFlag:$}=M;switch(_){case wh:v(j,M,B,X);break;case eo:y(j,M,B,X);break;case pv:j==null&&C(M,B,X,G);break;case He:x(j,M,B,X,Z,ue,G,U,I);break;default:$&1?E(j,M,B,X,Z,ue,G,U,I):$&6?T(j,M,B,X,Z,ue,G,U,I):($&64||$&128)&&_.process(j,M,B,X,Z,ue,G,U,I,ne)}P!=null&&Z&&RC(P,j&&j.ref,ue,M||j,!M)},v=(j,M,B,X)=>{if(j==null)n(M.el=a(M.children),B,X);else{const Z=M.el=j.el;M.children!==j.children&&c(Z,M.children)}},y=(j,M,B,X)=>{j==null?n(M.el=l(M.children||""),B,X):M.el=j.el},C=(j,M,B,X)=>{[j.el,j.anchor]=g(j.children,M,B,X,j.el,j.anchor)},m=({el:j,anchor:M},B,X)=>{let Z;for(;j&&j!==M;)Z=h(j),n(j,B,X),j=Z;n(M,B,X)},w=({el:j,anchor:M})=>{let B;for(;j&&j!==M;)B=h(j),s(j),j=B;s(M)},E=(j,M,B,X,Z,ue,G,U,I)=>{G=G||M.type==="svg",j==null?R(M,B,X,Z,ue,G,U,I):D(j,M,Z,ue,G,U,I)},R=(j,M,B,X,Z,ue,G,U)=>{let I,_;const{type:P,props:$,shapeFlag:le,transition:pe,dirs:ve}=j;if(I=j.el=r(j.type,ue,$&&$.is,$),le&8?u(I,j.children):le&16&&A(j.children,I,null,X,Z,ue&&P!=="foreignObject",G,U),ve&&La(j,null,X,"created"),O(I,j,j.scopeId,G,X),$){for(const Ue in $)Ue!=="value"&&!up(Ue)&&o(I,Ue,null,$[Ue],ue,j.children,X,Z,re);"value"in $&&o(I,"value",null,$.value),(_=$.onVnodeBeforeMount)&&mo(_,X,j)}ve&&La(j,null,X,"beforeMount");const Ge=(!Z||Z&&!Z.pendingBranch)&&pe&&!pe.persisted;Ge&&pe.beforeEnter(I),n(I,M,B),((_=$&&$.onVnodeMounted)||Ge||ve)&&On(()=>{_&&mo(_,X,j),Ge&&pe.enter(I),ve&&La(j,null,X,"mounted")},Z)},O=(j,M,B,X,Z)=>{if(B&&f(j,B),X)for(let ue=0;ue<X.length;ue++)f(j,X[ue]);if(Z){let ue=Z.subTree;if(M===ue){const G=Z.vnode;O(j,G,G.scopeId,G.slotScopeIds,Z.parent)}}},A=(j,M,B,X,Z,ue,G,U,I=0)=>{for(let _=I;_<j.length;_++){const P=j[_]=U?Vr(j[_]):So(j[_]);p(null,P,M,B,X,Z,ue,G,U)}},D=(j,M,B,X,Z,ue,G)=>{const U=M.el=j.el;let{patchFlag:I,dynamicChildren:_,dirs:P}=M;I|=j.patchFlag&16;const $=j.props||Xt,le=M.props||Xt;let pe;B&&Fa(B,!1),(pe=le.onVnodeBeforeUpdate)&&mo(pe,B,M,j),P&&La(M,j,B,"beforeUpdate"),B&&Fa(B,!0);const ve=Z&&M.type!=="foreignObject";if(_?L(j.dynamicChildren,_,U,B,X,ve,ue):G||F(j,M,U,null,B,X,ve,ue,!1),I>0){if(I&16)S(U,M,$,le,B,X,Z);else if(I&2&&$.class!==le.class&&o(U,"class",null,le.class,Z),I&4&&o(U,"style",$.style,le.style,Z),I&8){const Ge=M.dynamicProps;for(let Ue=0;Ue<Ge.length;Ue++){const et=Ge[Ue],At=$[et],Et=le[et];(Et!==At||et==="value")&&o(U,et,At,Et,Z,j.children,B,X,re)}}I&1&&j.children!==M.children&&u(U,M.children)}else!G&&_==null&&S(U,M,$,le,B,X,Z);((pe=le.onVnodeUpdated)||P)&&On(()=>{pe&&mo(pe,B,M,j),P&&La(M,j,B,"updated")},X)},L=(j,M,B,X,Z,ue,G)=>{for(let U=0;U<M.length;U++){const I=j[U],_=M[U],P=I.el&&(I.type===He||!qa(I,_)||I.shapeFlag&70)?d(I.el):B;p(I,_,P,null,X,Z,ue,G,!0)}},S=(j,M,B,X,Z,ue,G)=>{if(B!==X){if(B!==Xt)for(const U in B)!up(U)&&!(U in X)&&o(j,U,B[U],null,G,M.children,Z,ue,re);for(const U in X){if(up(U))continue;const I=X[U],_=B[U];I!==_&&U!=="value"&&o(j,U,_,I,G,M.children,Z,ue,re)}"value"in X&&o(j,"value",B.value,X.value)}},x=(j,M,B,X,Z,ue,G,U,I)=>{const _=M.el=j?j.el:a(""),P=M.anchor=j?j.anchor:a("");let{patchFlag:$,dynamicChildren:le,slotScopeIds:pe}=M;pe&&(U=U?U.concat(pe):pe),j==null?(n(_,B,X),n(P,B,X),A(M.children,B,P,Z,ue,G,U,I)):$>0&&$&64&&le&&j.dynamicChildren?(L(j.dynamicChildren,le,B,Z,ue,G,U),(M.key!=null||Z&&M===Z.subTree)&&bb(j,M,!0)):F(j,M,B,P,Z,ue,G,U,I)},T=(j,M,B,X,Z,ue,G,U,I)=>{M.slotScopeIds=U,j==null?M.shapeFlag&512?Z.ctx.activate(M,B,X,G,I):H(M,B,X,Z,ue,G,I):Y(j,M,I)},H=(j,M,B,X,Z,ue,G)=>{const U=j.component=lF(j,X,Z);if(Ng(j)&&(U.ctx.renderer=ne),cF(U),U.asyncDep){if(Z&&Z.registerDep(U,Q),!j.el){const I=U.subTree=b(eo);y(null,I,M,B)}return}Q(U,j,M,B,Z,ue,G)},Y=(j,M,B)=>{const X=M.component=j.component;if(EL(j,M,B))if(X.asyncDep&&!X.asyncResolved){te(X,M,B);return}else X.next=M,vL(X.update),X.update();else M.el=j.el,X.vnode=M},Q=(j,M,B,X,Z,ue,G)=>{const U=()=>{if(j.isMounted){let{next:P,bu:$,u:le,parent:pe,vnode:ve}=j,Ge=P,Ue;Fa(j,!1),P?(P.el=ve.el,te(j,P,G)):P=ve,$&&dp($),(Ue=P.props&&P.props.onVnodeBeforeUpdate)&&mo(Ue,pe,P,ve),Fa(j,!0);const et=dv(j),At=j.subTree;j.subTree=et,p(At,et,d(At.el),K(At),j,Z,ue),P.el=et.el,Ge===null&&_L(j,et.el),le&&On(le,Z),(Ue=P.props&&P.props.onVnodeUpdated)&&On(()=>mo(Ue,pe,P,ve),Z)}else{let P;const{el:$,props:le}=M,{bm:pe,m:ve,parent:Ge}=j,Ue=hp(M);if(Fa(j,!1),pe&&dp(pe),!Ue&&(P=le&&le.onVnodeBeforeMount)&&mo(P,Ge,M),Fa(j,!0),$&&ee){const et=()=>{j.subTree=dv(j),ee($,j.subTree,j,Z,null)};Ue?M.type.__asyncLoader().then(()=>!j.isUnmounted&&et()):et()}else{const et=j.subTree=dv(j);p(null,et,B,X,j,Z,ue),M.el=et.el}if(ve&&On(ve,Z),!Ue&&(P=le&&le.onVnodeMounted)){const et=M;On(()=>mo(P,Ge,et),Z)}(M.shapeFlag&256||Ge&&hp(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&j.a&&On(j.a,Z),j.isMounted=!0,M=B=X=null}},I=j.effect=new ob(U,()=>fb(_),j.scope),_=j.update=()=>I.run();_.id=j.uid,Fa(j,!0),_()},te=(j,M,B)=>{M.component=j;const X=j.vnode.props;j.vnode=M,j.next=null,zL(j,M.props,X,B),qL(j,M.children,B),eu(),lE(),tu()},F=(j,M,B,X,Z,ue,G,U,I=!1)=>{const _=j&&j.children,P=j?j.shapeFlag:0,$=M.children,{patchFlag:le,shapeFlag:pe}=M;if(le>0){if(le&128){q(_,$,B,X,Z,ue,G,U,I);return}else if(le&256){k(_,$,B,X,Z,ue,G,U,I);return}}pe&8?(P&16&&re(_,Z,ue),$!==_&&u(B,$)):P&16?pe&16?q(_,$,B,X,Z,ue,G,U,I):re(_,Z,ue,!0):(P&8&&u(B,""),pe&16&&A($,B,X,Z,ue,G,U,I))},k=(j,M,B,X,Z,ue,G,U,I)=>{j=j||mc,M=M||mc;const _=j.length,P=M.length,$=Math.min(_,P);let le;for(le=0;le<$;le++){const pe=M[le]=I?Vr(M[le]):So(M[le]);p(j[le],pe,B,null,Z,ue,G,U,I)}_>P?re(j,Z,ue,!0,!1,$):A(M,B,X,Z,ue,G,U,I,$)},q=(j,M,B,X,Z,ue,G,U,I)=>{let _=0;const P=M.length;let $=j.length-1,le=P-1;for(;_<=$&&_<=le;){const pe=j[_],ve=M[_]=I?Vr(M[_]):So(M[_]);if(qa(pe,ve))p(pe,ve,B,null,Z,ue,G,U,I);else break;_++}for(;_<=$&&_<=le;){const pe=j[$],ve=M[le]=I?Vr(M[le]):So(M[le]);if(qa(pe,ve))p(pe,ve,B,null,Z,ue,G,U,I);else break;$--,le--}if(_>$){if(_<=le){const pe=le+1,ve=pe<P?M[pe].el:X;for(;_<=le;)p(null,M[_]=I?Vr(M[_]):So(M[_]),B,ve,Z,ue,G,U,I),_++}}else if(_>le)for(;_<=$;)J(j[_],Z,ue,!0),_++;else{const pe=_,ve=_,Ge=new Map;for(_=ve;_<=le;_++){const wi=M[_]=I?Vr(M[_]):So(M[_]);wi.key!=null&&Ge.set(wi.key,_)}let Ue,et=0;const At=le-ve+1;let Et=!1,Hs=0;const Tn=new Array(At);for(_=0;_<At;_++)Tn[_]=0;for(_=pe;_<=$;_++){const wi=j[_];if(et>=At){J(wi,Z,ue,!0);continue}let go;if(wi.key!=null)go=Ge.get(wi.key);else for(Ue=ve;Ue<=le;Ue++)if(Tn[Ue-ve]===0&&qa(wi,M[Ue])){go=Ue;break}go===void 0?J(wi,Z,ue,!0):(Tn[go-ve]=_+1,go>=Hs?Hs=go:Et=!0,p(wi,M[go],B,null,Z,ue,G,U,I),et++)}const hs=Et?ZL(Tn):mc;for(Ue=hs.length-1,_=At-1;_>=0;_--){const wi=ve+_,go=M[wi],JS=wi+1<P?M[wi+1].el:X;Tn[_]===0?p(null,go,B,JS,Z,ue,G,U,I):Et&&(Ue<0||_!==hs[Ue]?V(go,B,JS,2):Ue--)}}},V=(j,M,B,X,Z=null)=>{const{el:ue,type:G,transition:U,children:I,shapeFlag:_}=j;if(_&6){V(j.component.subTree,M,B,X);return}if(_&128){j.suspense.move(M,B,X);return}if(_&64){G.move(j,M,B,ne);return}if(G===He){n(ue,M,B);for(let $=0;$<I.length;$++)V(I[$],M,B,X);n(j.anchor,M,B);return}if(G===pv){m(j,M,B);return}if(X!==2&&_&1&&U)if(X===0)U.beforeEnter(ue),n(ue,M,B),On(()=>U.enter(ue),Z);else{const{leave:$,delayLeave:le,afterLeave:pe}=U,ve=()=>n(ue,M,B),Ge=()=>{$(ue,()=>{ve(),pe&&pe()})};le?le(ue,ve,Ge):Ge()}else n(ue,M,B)},J=(j,M,B,X=!1,Z=!1)=>{const{type:ue,props:G,ref:U,children:I,dynamicChildren:_,shapeFlag:P,patchFlag:$,dirs:le}=j;if(U!=null&&RC(U,null,B,j,!0),P&256){M.ctx.deactivate(j);return}const pe=P&1&&le,ve=!hp(j);let Ge;if(ve&&(Ge=G&&G.onVnodeBeforeUnmount)&&mo(Ge,M,j),P&6)ce(j.component,B,X);else{if(P&128){j.suspense.unmount(B,X);return}pe&&La(j,null,M,"beforeUnmount"),P&64?j.type.remove(j,M,B,Z,ne,X):_&&(ue!==He||$>0&&$&64)?re(_,M,B,!1,!0):(ue===He&&$&384||!Z&&P&16)&&re(I,M,B),X&&ae(j)}(ve&&(Ge=G&&G.onVnodeUnmounted)||pe)&&On(()=>{Ge&&mo(Ge,M,j),pe&&La(j,null,M,"unmounted")},B)},ae=j=>{const{type:M,el:B,anchor:X,transition:Z}=j;if(M===He){se(B,X);return}if(M===pv){w(j);return}const ue=()=>{s(B),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(j.shapeFlag&1&&Z&&!Z.persisted){const{leave:G,delayLeave:U}=Z,I=()=>G(B,ue);U?U(j.el,ue,I):I()}else ue()},se=(j,M)=>{let B;for(;j!==M;)B=h(j),s(j),j=B;s(M)},ce=(j,M,B)=>{const{bum:X,scope:Z,update:ue,subTree:G,um:U}=j;X&&dp(X),Z.stop(),ue&&(ue.active=!1,J(G,j,M,B)),U&&On(U,M),On(()=>{j.isUnmounted=!0},M),M&&M.pendingBranch&&!M.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===M.pendingId&&(M.deps--,M.deps===0&&M.resolve())},re=(j,M,B,X=!1,Z=!1,ue=0)=>{for(let G=ue;G<j.length;G++)J(j[G],M,B,X,Z)},K=j=>j.shapeFlag&6?K(j.component.subTree):j.shapeFlag&128?j.suspense.next():h(j.anchor||j.el),he=(j,M,B)=>{j==null?M._vnode&&J(M._vnode,null,null,!0):p(M._vnode||null,j,M,null,null,null,B),lE(),_T(),M._vnode=j},ne={p,um:J,m:V,r:ae,mt:H,mc:A,pc:F,pbc:L,n:K,o:i};let ie,ee;return e&&([ie,ee]=e(ne)),{render:he,hydrate:ie,createApp:jL(he,ie)}}function Fa({effect:i,update:e},t){i.allowRecurse=e.allowRecurse=t}function bb(i,e,t=!1){const n=i.children,s=e.children;if(Xe(n)&&Xe(s))for(let o=0;o<n.length;o++){const r=n[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=Vr(s[o]),a.el=r.el),t||bb(r,a)),a.type===wh&&(a.el=r.el)}}function ZL(i){const e=i.slice(),t=[0];let n,s,o,r,a;const l=i.length;for(n=0;n<l;n++){const c=i[n];if(c!==0){if(s=t[t.length-1],i[s]<c){e[n]=s,t.push(n);continue}for(o=0,r=t.length-1;o<r;)a=o+r>>1,i[t[a]]<c?o=a+1:r=a;c<i[t[o]]&&(o>0&&(e[n]=t[o-1]),t[o]=n)}}for(o=t.length,r=t[o-1];o-- >0;)t[o]=r,r=e[r];return t}const JL=i=>i.__isTeleport,cd=i=>i&&(i.disabled||i.disabled===""),bE=i=>typeof SVGElement<"u"&&i instanceof SVGElement,TC=(i,e)=>{const t=i&&i.to;return ui(t)?e?e(t):null:t},eF={__isTeleport:!0,process(i,e,t,n,s,o,r,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:g,createText:p,createComment:v}}=c,y=cd(e.props);let{shapeFlag:C,children:m,dynamicChildren:w}=e;if(i==null){const E=e.el=p(""),R=e.anchor=p("");f(E,t,n),f(R,t,n);const O=e.target=TC(e.props,g),A=e.targetAnchor=p("");O&&(f(A,O),r=r||bE(O));const D=(L,S)=>{C&16&&u(m,L,S,s,o,r,a,l)};y?D(t,R):O&&D(O,A)}else{e.el=i.el;const E=e.anchor=i.anchor,R=e.target=i.target,O=e.targetAnchor=i.targetAnchor,A=cd(i.props),D=A?t:R,L=A?E:O;if(r=r||bE(R),w?(h(i.dynamicChildren,w,D,s,o,r,a),bb(i,e,!0)):l||d(i,e,D,L,s,o,r,a,!1),y)A||Of(e,t,E,c,1);else if((e.props&&e.props.to)!==(i.props&&i.props.to)){const S=e.target=TC(e.props,g);S&&Of(e,S,null,c,0)}else A&&Of(e,R,O,c,1)}KT(e)},remove(i,e,t,n,{um:s,o:{remove:o}},r){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:h}=i;if(d&&o(u),(r||!cd(h))&&(o(c),a&16))for(let f=0;f<l.length;f++){const g=l[f];s(g,e,t,!0,!!g.dynamicChildren)}},move:Of,hydrate:tF};function Of(i,e,t,{o:{insert:n},m:s},o=2){o===0&&n(i.targetAnchor,e,t);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=i,d=o===2;if(d&&n(r,e,t),(!d||cd(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],e,t,2);d&&n(a,e,t)}function tF(i,e,t,n,s,o,{o:{nextSibling:r,parentNode:a,querySelector:l}},c){const u=e.target=TC(e.props,l);if(u){const d=u._lpa||u.firstChild;if(e.shapeFlag&16)if(cd(e.props))e.anchor=c(r(i),e,a(i),t,n,s,o),e.targetAnchor=d;else{e.anchor=r(i);let h=d;for(;h;)if(h=r(h),h&&h.nodeType===8&&h.data==="teleport anchor"){e.targetAnchor=h,u._lpa=e.targetAnchor&&r(e.targetAnchor);break}c(d,e,u,t,n,s,o)}KT(e)}return e.anchor&&r(e.anchor)}const iF=eF;function KT(i){const e=i.ctx;if(e&&e.ut){let t=i.children[0].el;for(;t!==i.targetAnchor;)t.nodeType===1&&t.setAttribute("data-v-owner",e.uid),t=t.nextSibling;e.ut()}}const He=Symbol.for("v-fgt"),wh=Symbol.for("v-txt"),eo=Symbol.for("v-cmt"),pv=Symbol.for("v-stc"),ud=[];let zs=null;function me(i=!1){ud.push(zs=i?null:[])}function nF(){ud.pop(),zs=ud[ud.length-1]||null}let Pd=1;function wE(i){Pd+=i}function YT(i){return i.dynamicChildren=Pd>0?zs||mc:null,nF(),Pd>0&&zs&&zs.push(i),i}function kt(i,e,t,n,s,o){return YT(pt(i,e,t,n,s,o,!0))}function we(i,e,t,n,s){return YT(b(i,e,t,n,s,!0))}function xC(i){return i?i.__v_isVNode===!0:!1}function qa(i,e){return i.type===e.type&&i.key===e.key}const Gg="__vInternal",qT=({key:i})=>i??null,fp=({ref:i,ref_key:e,ref_for:t})=>(typeof i=="number"&&(i=""+i),i!=null?ui(i)||ii(i)||ht(i)?{i:Xn,r:i,k:e,f:!!t}:i:null);function pt(i,e=null,t=null,n=0,s=null,o=i===He?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:i,props:e,key:e&&qT(e),ref:e&&fp(e),scopeId:Fg,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Xn};return a?(wb(l,t),o&128&&i.normalize(l)):t&&(l.shapeFlag|=ui(t)?8:16),Pd>0&&!r&&zs&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&zs.push(l),l}const b=sF;function sF(i,e=null,t=null,n=0,s=null,o=!1){if((!i||i===GT)&&(i=eo),xC(i)){const a=dr(i,e,!0);return t&&wb(a,t),Pd>0&&!o&&zs&&(a.shapeFlag&6?zs[zs.indexOf(i)]=a:zs.push(a)),a.patchFlag|=-2,a}if(pF(i)&&(i=i.__vccOpts),e){e=oF(e);let{class:a,style:l}=e;a&&!ui(a)&&(e.class=en(a)),zt(l)&&(Ig(l)&&!Xe(l)&&(l=vi({},l)),e.style=yh(l))}const r=ui(i)?1:RL(i)?128:JL(i)?64:zt(i)?4:ht(i)?2:0;return pt(i,e,t,n,s,r,o,!0)}function oF(i){return i?Ig(i)||Gg in i?vi({},i):i:null}function dr(i,e,t=!1){const{props:n,ref:s,patchFlag:o,children:r}=i,a=e?Ie(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:i.type,props:a,key:a&&qT(a),ref:e&&e.ref?t&&s?Xe(s)?s.concat(fp(e)):[s,fp(e)]:fp(e):s,scopeId:i.scopeId,slotScopeIds:i.slotScopeIds,children:r,target:i.target,targetAnchor:i.targetAnchor,staticCount:i.staticCount,shapeFlag:i.shapeFlag,patchFlag:e&&i.type!==He?o===-1?16:o|16:o,dynamicProps:i.dynamicProps,dynamicChildren:i.dynamicChildren,appContext:i.appContext,dirs:i.dirs,transition:i.transition,component:i.component,suspense:i.suspense,ssContent:i.ssContent&&dr(i.ssContent),ssFallback:i.ssFallback&&dr(i.ssFallback),el:i.el,anchor:i.anchor,ctx:i.ctx,ce:i.ce}}function De(i=" ",e=0){return b(wh,null,i,e)}function Yt(i="",e=!1){return e?(me(),we(eo,null,i)):b(eo,null,i)}function So(i){return i==null||typeof i=="boolean"?b(eo):Xe(i)?b(He,null,i.slice()):typeof i=="object"?Vr(i):b(wh,null,String(i))}function Vr(i){return i.el===null&&i.patchFlag!==-1||i.memo?i:dr(i)}function wb(i,e){let t=0;const{shapeFlag:n}=i;if(e==null)e=null;else if(Xe(e))t=16;else if(typeof e=="object")if(n&65){const s=e.default;s&&(s._c&&(s._d=!1),wb(i,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!(Gg in e)?e._ctx=Xn:s===3&&Xn&&(Xn.slots._===1?e._=1:(e._=2,i.patchFlag|=1024))}else ht(e)?(e={default:e,_ctx:Xn},t=32):(e=String(e),n&64?(t=16,e=[De(e)]):t=8);i.children=e,i.shapeFlag|=t}function Ie(...i){const e={};for(let t=0;t<i.length;t++){const n=i[t];for(const s in n)if(s==="class")e.class!==n.class&&(e.class=en([e.class,n.class]));else if(s==="style")e.style=yh([e.style,n.style]);else if(xg(s)){const o=e[s],r=n[s];r&&o!==r&&!(Xe(o)&&o.includes(r))&&(e[s]=o?[].concat(o,r):r)}else s!==""&&(e[s]=n[s])}return e}function mo(i,e,t,n=null){ws(i,e,7,[t,n])}const rF=BT();let aF=0;function lF(i,e,t){const n=i.type,s=(e?e.appContext:i.appContext)||rF,o={uid:aF++,vnode:i,type:n,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new oT(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:UT(n,s),emitsOptions:TT(n,s),emit:null,emitted:null,propsDefaults:Xt,inheritAttrs:n.inheritAttrs,ctx:Xt,data:Xt,props:Xt,attrs:Xt,slots:Xt,refs:Xt,setupState:Xt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:t,suspenseId:t?t.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 o.ctx={_:o},o.root=e?e.root:o,o.emit=bL.bind(null,o),i.ce&&i.ce(o),o}let Fi=null;const Sh=()=>Fi||Xn;let Sb,ql,SE="__VUE_INSTANCE_SETTERS__";(ql=mC()[SE])||(ql=mC()[SE]=[]),ql.push(i=>Fi=i),Sb=i=>{ql.length>1?ql.forEach(e=>e(i)):ql[0](i)};const xc=i=>{Sb(i),i.scope.on()},nl=()=>{Fi&&Fi.scope.off(),Sb(null)};function XT(i){return i.vnode.shapeFlag&4}let Id=!1;function cF(i,e=!1){Id=e;const{props:t,children:n}=i.vnode,s=XT(i);$L(i,t,s,e),YL(i,n);const o=s?uF(i,e):void 0;return Id=!1,o}function uF(i,e){const t=i.type;i.accessCache=Object.create(null),i.proxy=ad(new Proxy(i.ctx,kL));const{setup:n}=t;if(n){const s=i.setupContext=n.length>1?hF(i):null;xc(i),eu();const o=Xr(n,i,0,[i.props,s]);if(tu(),nl(),eT(o)){if(o.then(nl,nl),e)return o.then(r=>{EE(i,r,e)}).catch(r=>{Mg(r,i,0)});i.asyncDep=o}else EE(i,o,e)}else QT(i,e)}function EE(i,e,t){ht(e)?i.type.__ssrInlineRender?i.ssrRender=e:i.render=e:zt(e)&&(i.setupState=bT(e)),QT(i,t)}let _E;function QT(i,e,t){const n=i.type;if(!i.render){if(!e&&_E&&!n.render){const s=n.template||Cb(i).template;if(s){const{isCustomElement:o,compilerOptions:r}=i.appContext.config,{delimiters:a,compilerOptions:l}=n,c=vi(vi({isCustomElement:o,delimiters:a},r),l);n.render=_E(s,c)}}i.render=n.render||Js}xc(i),eu(),VL(i),tu(),nl()}function dF(i){return i.attrsProxy||(i.attrsProxy=new Proxy(i.attrs,{get(e,t){return Ln(i,"get","$attrs"),e[t]}}))}function hF(i){const e=t=>{i.exposed=t||{}};return{get attrs(){return dF(i)},slots:i.slots,emit:i.emit,expose:e}}function Hg(i){if(i.exposed)return i.exposeProxy||(i.exposeProxy=new Proxy(bT(ad(i.exposed)),{get(e,t){if(t in e)return e[t];if(t in ld)return ld[t](i)},has(e,t){return t in e||t in ld}}))}function fF(i,e=!0){return ht(i)?i.displayName||i.name:i.name||e&&i.__name}function pF(i){return ht(i)&&"__vccOpts"in i}const z=(i,e)=>pL(i,e,Id);function ts(i,e,t){const n=arguments.length;return n===2?zt(e)&&!Xe(e)?xC(e)?b(i,null,[e]):b(i,e):b(i,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&xC(t)&&(t=[t]),b(i,e,t))}const gF=Symbol.for("v-scx"),mF=()=>ct(gF),Eb="3.3.4",vF="http://www.w3.org/2000/svg",Xa=typeof document<"u"?document:null,RE=Xa&&Xa.createElement("template"),CF={insert:(i,e,t)=>{e.insertBefore(i,t||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,t,n)=>{const s=e?Xa.createElementNS(vF,i):Xa.createElement(i,t?{is:t}:void 0);return i==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:i=>Xa.createTextNode(i),createComment:i=>Xa.createComment(i),setText:(i,e)=>{i.nodeValue=e},setElementText:(i,e)=>{i.textContent=e},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>Xa.querySelector(i),setScopeId(i,e){i.setAttribute(e,"")},insertStaticContent(i,e,t,n,s,o){const r=t?t.previousSibling:e.lastChild;if(s&&(s===o||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===o||!(s=s.nextSibling)););else{RE.innerHTML=n?`<svg>${i}</svg>`:i;const a=RE.content;if(n){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[r?r.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}};function yF(i,e,t){const n=i._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?i.removeAttribute("class"):t?i.setAttribute("class",e):i.className=e}function bF(i,e,t){const n=i.style,s=ui(t);if(t&&!s){if(e&&!ui(e))for(const o in e)t[o]==null&&AC(n,o,"");for(const o in t)AC(n,o,t[o])}else{const o=n.display;s?e!==t&&(n.cssText=t):e&&i.removeAttribute("style"),"_vod"in i&&(n.display=o)}}const TE=/\s*!important$/;function AC(i,e,t){if(Xe(t))t.forEach(n=>AC(i,e,n));else if(t==null&&(t=""),e.startsWith("--"))i.setProperty(e,t);else{const n=wF(i,e);TE.test(t)?i.setProperty(Tl(n),t.replace(TE,""),"important"):i[n]=t}}const xE=["Webkit","Moz","ms"],gv={};function wF(i,e){const t=gv[e];if(t)return t;let n=Ts(e);if(n!=="filter"&&n in i)return gv[e]=n;n=wr(n);for(let s=0;s<xE.length;s++){const o=xE[s]+n;if(o in i)return gv[e]=o}return e}const AE="http://www.w3.org/1999/xlink";function SF(i,e,t,n,s){if(n&&e.startsWith("xlink:"))t==null?i.removeAttributeNS(AE,e.slice(6,e.length)):i.setAttributeNS(AE,e,t);else{const o=MM(e);t==null||o&&!nT(t)?i.removeAttribute(e):i.setAttribute(e,o?"":t)}}function EF(i,e,t,n,s,o,r){if(e==="innerHTML"||e==="textContent"){n&&r(n,s,o),i[e]=t??"";return}const a=i.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){i._value=t;const c=a==="OPTION"?i.getAttribute("value"):i.value,u=t??"";c!==u&&(i.value=u),t==null&&i.removeAttribute(e);return}let l=!1;if(t===""||t==null){const c=typeof i[e];c==="boolean"?t=nT(t):t==null&&c==="string"?(t="",l=!0):c==="number"&&(t=0,l=!0)}try{i[e]=t}catch{}l&&i.removeAttribute(e)}function rc(i,e,t,n){i.addEventListener(e,t,n)}function _F(i,e,t,n){i.removeEventListener(e,t,n)}function RF(i,e,t,n,s=null){const o=i._vei||(i._vei={}),r=o[e];if(n&&r)r.value=n;else{const[a,l]=TF(e);if(n){const c=o[e]=DF(n,s);rc(i,a,c,l)}else r&&(_F(i,a,r,l),o[e]=void 0)}}const DE=/(?:Once|Passive|Capture)$/;function TF(i){let e;if(DE.test(i)){e={};let n;for(;n=i.match(DE);)i=i.slice(0,i.length-n[0].length),e[n[0].toLowerCase()]=!0}return[i[2]===":"?i.slice(3):Tl(i.slice(2)),e]}let mv=0;const xF=Promise.resolve(),AF=()=>mv||(xF.then(()=>mv=0),mv=Date.now());function DF(i,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;ws(OF(n,t.value),e,5,[n])};return t.value=i,t.attached=AF(),t}function OF(i,e){if(Xe(e)){const t=i.stopImmediatePropagation;return i.stopImmediatePropagation=()=>{t.call(i),i._stopped=!0},e.map(n=>s=>!s._stopped&&n&&n(s))}else return e}const OE=/^on[a-z]/,PF=(i,e,t,n,s=!1,o,r,a,l)=>{e==="class"?yF(i,n,s):e==="style"?bF(i,t,n):xg(e)?eb(e)||RF(i,e,t,n,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IF(i,e,n,s))?EF(i,e,n,o,r,a,l):(e==="true-value"?i._trueValue=n:e==="false-value"&&(i._falseValue=n),SF(i,e,n,s))};function IF(i,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in i&&OE.test(e)&&ht(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&i.tagName==="INPUT"||e==="type"&&i.tagName==="TEXTAREA"||OE.test(e)&&ui(t)?!1:e in i}const Lr="transition",Iu="animation",Po=(i,{slots:e})=>ts(DL,JT(i),e);Po.displayName="Transition";const ZT={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},MF=Po.props=vi({},PT,ZT),Na=(i,e=[])=>{Xe(i)?i.forEach(t=>t(...e)):i&&i(...e)},PE=i=>i?Xe(i)?i.some(e=>e.length>1):i.length>1:!1;function JT(i){const e={};for(const x in i)x in ZT||(e[x]=i[x]);if(i.css===!1)return e;const{name:t="v",type:n,duration:s,enterFromClass:o=`${t}-enter-from`,enterActiveClass:r=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=i,g=LF(s),p=g&&g[0],v=g&&g[1],{onBeforeEnter:y,onEnter:C,onEnterCancelled:m,onLeave:w,onLeaveCancelled:E,onBeforeAppear:R=y,onAppear:O=C,onAppearCancelled:A=m}=e,D=(x,T,H)=>{kr(x,T?u:a),kr(x,T?c:r),H&&H()},L=(x,T)=>{x._isLeaving=!1,kr(x,d),kr(x,f),kr(x,h),T&&T()},S=x=>(T,H)=>{const Y=x?O:C,Q=()=>D(T,x,H);Na(Y,[T,Q]),IE(()=>{kr(T,x?l:o),Zo(T,x?u:a),PE(Y)||ME(T,n,p,Q)})};return vi(e,{onBeforeEnter(x){Na(y,[x]),Zo(x,o),Zo(x,r)},onBeforeAppear(x){Na(R,[x]),Zo(x,l),Zo(x,c)},onEnter:S(!1),onAppear:S(!0),onLeave(x,T){x._isLeaving=!0;const H=()=>L(x,T);Zo(x,d),tx(),Zo(x,h),IE(()=>{x._isLeaving&&(kr(x,d),Zo(x,f),PE(w)||ME(x,n,v,H))}),Na(w,[x,H])},onEnterCancelled(x){D(x,!1),Na(m,[x])},onAppearCancelled(x){D(x,!0),Na(A,[x])},onLeaveCancelled(x){L(x),Na(E,[x])}})}function LF(i){if(i==null)return null;if(zt(i))return[vv(i.enter),vv(i.leave)];{const e=vv(i);return[e,e]}}function vv(i){return xM(i)}function Zo(i,e){e.split(/\s+/).forEach(t=>t&&i.classList.add(t)),(i._vtc||(i._vtc=new Set)).add(e)}function kr(i,e){e.split(/\s+/).forEach(n=>n&&i.classList.remove(n));const{_vtc:t}=i;t&&(t.delete(e),t.size||(i._vtc=void 0))}function IE(i){requestAnimationFrame(()=>{requestAnimationFrame(i)})}let FF=0;function ME(i,e,t,n){const s=i._endId=++FF,o=()=>{s===i._endId&&n()};if(t)return setTimeout(o,t);const{type:r,timeout:a,propCount:l}=ex(i,e);if(!r)return n();const c=r+"end";let u=0;const d=()=>{i.removeEventListener(c,h),o()},h=f=>{f.target===i&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),i.addEventListener(c,h)}function ex(i,e){const t=window.getComputedStyle(i),n=g=>(t[g]||"").split(", "),s=n(`${Lr}Delay`),o=n(`${Lr}Duration`),r=LE(s,o),a=n(`${Iu}Delay`),l=n(`${Iu}Duration`),c=LE(a,l);let u=null,d=0,h=0;e===Lr?r>0&&(u=Lr,d=r,h=o.length):e===Iu?c>0&&(u=Iu,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Lr:Iu:null,h=u?u===Lr?o.length:l.length:0);const f=u===Lr&&/\b(transform|all)(,|$)/.test(n(`${Lr}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function LE(i,e){for(;i.length<e.length;)i=i.concat(i);return Math.max(...e.map((t,n)=>FE(t)+FE(i[n])))}function FE(i){return Number(i.slice(0,-1).replace(",","."))*1e3}function tx(){return document.body.offsetHeight}const ix=new WeakMap,nx=new WeakMap,sx={name:"TransitionGroup",props:vi({},MF,{tag:String,moveClass:String}),setup(i,{slots:e}){const t=Sh(),n=OT();let s,o;return kT(()=>{if(!s.length)return;const r=i.moveClass||`${i.name||"v"}-move`;if(!BF(s[0].el,t.vnode.el,r))return;s.forEach(VF),s.forEach(GF);const a=s.filter(HF);tx(),a.forEach(l=>{const c=l.el,u=c.style;Zo(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c._moveCb=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c._moveCb=null,kr(c,r))};c.addEventListener("transitionend",d)})}),()=>{const r=it(i),a=JT(r);let l=r.tag||He;s=o,o=e.default?gb(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&Od(u,Dd(u,a,n,t))}if(s)for(let c=0;c<s.length;c++){const u=s[c];Od(u,Dd(u,a,n,t)),ix.set(u,u.el.getBoundingClientRect())}return b(l,null,o)}}},NF=i=>delete i.mode;sx.props;const kF=sx;function VF(i){const e=i.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function GF(i){nx.set(i,i.el.getBoundingClientRect())}function HF(i){const e=ix.get(i),t=nx.get(i),n=e.left-t.left,s=e.top-t.top;if(n||s){const o=i.el.style;return o.transform=o.webkitTransform=`translate(${n}px,${s}px)`,o.transitionDuration="0s",i}}function BF(i,e,t){const n=i.cloneNode();i._vtc&&i._vtc.forEach(r=>{r.split(/\s+/).forEach(a=>a&&n.classList.remove(a))}),t.split(/\s+/).forEach(r=>r&&n.classList.add(r)),n.style.display="none";const s=e.nodeType===1?e:e.parentNode;s.appendChild(n);const{hasTransform:o}=ex(n);return s.removeChild(n),o}const NE=i=>{const e=i.props["onUpdate:modelValue"]||!1;return Xe(e)?t=>dp(e,t):e};function WF(i){i.target.composing=!0}function kE(i){const e=i.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const UF={created(i,{modifiers:{lazy:e,trim:t,number:n}},s){i._assign=NE(s);const o=n||s.props&&s.props.type==="number";rc(i,e?"change":"input",r=>{if(r.target.composing)return;let a=i.value;t&&(a=a.trim()),o&&(a=gC(a)),i._assign(a)}),t&&rc(i,"change",()=>{i.value=i.value.trim()}),e||(rc(i,"compositionstart",WF),rc(i,"compositionend",kE),rc(i,"change",kE))},mounted(i,{value:e}){i.value=e??""},beforeUpdate(i,{value:e,modifiers:{lazy:t,trim:n,number:s}},o){if(i._assign=NE(o),i.composing||document.activeElement===i&&i.type!=="range"&&(t||n&&i.value.trim()===e||(s||i.type==="number")&&gC(i.value)===e))return;const r=e??"";i.value!==r&&(i.value=r)}},jF=["ctrl","shift","alt","meta"],$F={stop:i=>i.stopPropagation(),prevent:i=>i.preventDefault(),self:i=>i.target!==i.currentTarget,ctrl:i=>!i.ctrlKey,shift:i=>!i.shiftKey,alt:i=>!i.altKey,meta:i=>!i.metaKey,left:i=>"button"in i&&i.button!==0,middle:i=>"button"in i&&i.button!==1,right:i=>"button"in i&&i.button!==2,exact:(i,e)=>jF.some(t=>i[`${t}Key`]&&!e.includes(t))},DC=(i,e)=>(t,...n)=>{for(let s=0;s<e.length;s++){const o=$F[e[s]];if(o&&o(t,e))return}return i(t,...n)},zF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Md=(i,e)=>t=>{if(!("key"in t))return;const n=Tl(t.key);if(e.some(s=>s===n||zF[s]===n))return i(t)},Ps={beforeMount(i,{value:e},{transition:t}){i._vod=i.style.display==="none"?"":i.style.display,t&&e?t.beforeEnter(i):Mu(i,e)},mounted(i,{value:e},{transition:t}){t&&e&&t.enter(i)},updated(i,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(i),Mu(i,!0),n.enter(i)):n.leave(i,()=>{Mu(i,!1)}):Mu(i,e))},beforeUnmount(i,{value:e}){Mu(i,e)}};function Mu(i,e){i.style.display=e?i._vod:"none"}const KF=vi({patchProp:PF},CF);let VE;function ox(){return VE||(VE=XL(KF))}const GE=(...i)=>{ox().render(...i)},YF=(...i)=>{const e=ox().createApp(...i),{mount:t}=e;return e.mount=n=>{const s=qF(n);if(!s)return;const o=e._component;!ht(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.innerHTML="";const r=t(s,!1,s instanceof SVGElement);return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},e};function qF(i){return ui(i)?document.querySelector(i):i}function XF(){return rx().__VUE_DEVTOOLS_GLOBAL_HOOK__}function rx(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const QF=typeof Proxy=="function",ZF="devtools-plugin:setup",JF="plugin:settings:set";let Xl,OC;function eN(){var i;return Xl!==void 0||(typeof window<"u"&&window.performance?(Xl=!0,OC=window.performance):typeof global<"u"&&(!((i=global.perf_hooks)===null||i===void 0)&&i.performance)?(Xl=!0,OC=global.perf_hooks.performance):Xl=!1),Xl}function tN(){return eN()?OC.now():Date.now()}class iN{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const r in e.settings){const a=e.settings[r];n[r]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let o=Object.assign({},n);try{const r=localStorage.getItem(s),a=JSON.parse(r);Object.assign(o,a)}catch{}this.fallbacks={getSettings(){return o},setSettings(r){try{localStorage.setItem(s,JSON.stringify(r))}catch{}o=r},now(){return tN()}},t&&t.on(JF,(r,a)=>{r===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(r,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(r,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function nN(i,e){const t=i,n=rx(),s=XF(),o=QF&&t.enableEarlyProxy;if(s&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!o))s.emit(ZF,i,e);else{const r=o?new iN(t,s):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:r}),r&&e(r.proxiedTarget)}}/*!
* vue-router v4.2.4
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/const ac=typeof window<"u";function sN(i){return i.__esModule||i[Symbol.toStringTag]==="Module"}const Lt=Object.assign;function Cv(i,e){const t={};for(const n in e){const s=e[n];t[n]=so(s)?s.map(i):i(s)}return t}const dd=()=>{},so=Array.isArray,oN=/\/$/,rN=i=>i.replace(oN,"");function yv(i,e,t="/"){let n,s={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(n=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),s=i(o)),a>-1&&(n=n||e.slice(0,a),r=e.slice(a,e.length)),n=uN(n??e,t),{fullPath:n+(o&&"?")+o+r,path:n,query:s,hash:r}}function aN(i,e){const t=e.query?i(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function HE(i,e){return!e||!i.toLowerCase().startsWith(e.toLowerCase())?i:i.slice(e.length)||"/"}function lN(i,e,t){const n=e.matched.length-1,s=t.matched.length-1;return n>-1&&n===s&&Ac(e.matched[n],t.matched[s])&&ax(e.params,t.params)&&i(e.query)===i(t.query)&&e.hash===t.hash}function Ac(i,e){return(i.aliasOf||i)===(e.aliasOf||e)}function ax(i,e){if(Object.keys(i).length!==Object.keys(e).length)return!1;for(const t in i)if(!cN(i[t],e[t]))return!1;return!0}function cN(i,e){return so(i)?BE(i,e):so(e)?BE(e,i):i===e}function BE(i,e){return so(e)?i.length===e.length&&i.every((t,n)=>t===e[n]):i.length===1&&i[0]===e}function uN(i,e){if(i.startsWith("/"))return i;if(!i)return e;const t=e.split("/"),n=i.split("/"),s=n[n.length-1];(s===".."||s===".")&&n.push("");let o=t.length-1,r,a;for(r=0;r<n.length;r++)if(a=n[r],a!==".")if(a==="..")o>1&&o--;else break;return t.slice(0,o).join("/")+"/"+n.slice(r-(r===n.length?1:0)).join("/")}var Ld;(function(i){i.pop="pop",i.push="push"})(Ld||(Ld={}));var hd;(function(i){i.back="back",i.forward="forward",i.unknown=""})(hd||(hd={}));function dN(i){if(!i)if(ac){const e=document.querySelector("base");i=e&&e.getAttribute("href")||"/",i=i.replace(/^\w+:\/\/[^\/]+/,"")}else i="/";return i[0]!=="/"&&i[0]!=="#"&&(i="/"+i),rN(i)}const hN=/^[^#]+#/;function fN(i,e){return i.replace(hN,"#")+e}function pN(i,e){const t=document.documentElement.getBoundingClientRect(),n=i.getBoundingClientRect();return{behavior:e.behavior,left:n.left-t.left-(e.left||0),top:n.top-t.top-(e.top||0)}}const Bg=()=>({left:window.pageXOffset,top:window.pageYOffset});function gN(i){let e;if("el"in i){const t=i.el,n=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?n?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=pN(s,i)}else e=i;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function WE(i,e){return(history.state?history.state.position-e:-1)+i}const PC=new Map;function mN(i,e){PC.set(i,e)}function vN(i){const e=PC.get(i);return PC.delete(i),e}let CN=()=>location.protocol+"//"+location.host;function lx(i,e){const{pathname:t,search:n,hash:s}=e,o=i.indexOf("#");if(o>-1){let a=s.includes(i.slice(o))?i.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),HE(l,"")}return HE(t,i)+n+s}function yN(i,e,t,n){let s=[],o=[],r=null;const a=({state:h})=>{const f=lx(i,location),g=t.value,p=e.value;let v=0;if(h){if(t.value=f,e.value=h,r&&r===g){r=null;return}v=p?h.position-p.position:0}else n(f);s.forEach(y=>{y(t.value,g,{delta:v,type:Ld.pop,direction:v?v>0?hd.forward:hd.back:hd.unknown})})};function l(){r=t.value}function c(h){s.push(h);const f=()=>{const g=s.indexOf(h);g>-1&&s.splice(g,1)};return o.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(Lt({},h.state,{scroll:Bg()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function UE(i,e,t,n=!1,s=!1){return{back:i,current:e,forward:t,replaced:n,position:window.history.length,scroll:s?Bg():null}}function bN(i){const{history:e,location:t}=window,n={value:lx(i,t)},s={value:e.state};s.value||o(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=i.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?i:i.slice(d))+l:CN()+i+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),t[u?"replace":"assign"](h)}}function r(l,c){const u=Lt({},e.state,UE(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,u,!0),n.value=l}function a(l,c){const u=Lt({},s.value,e.state,{forward:l,scroll:Bg()});o(u.current,u,!0);const d=Lt({},UE(n.value,l,null),{position:u.position+1},c);o(l,d,!1),n.value=l}return{location:n,state:s,push:a,replace:r}}function wN(i){i=dN(i);const e=bN(i),t=yN(i,e.state,e.location,e.replace);function n(o,r=!0){r||t.pauseListeners(),history.go(o)}const s=Lt({location:"",base:i,go:n,createHref:fN.bind(null,i)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function SN(i){return typeof i=="string"||i&&typeof i=="object"}function cx(i){return typeof i=="string"||typeof i=="symbol"}const Fr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ux=Symbol("");var jE;(function(i){i[i.aborted=4]="aborted",i[i.cancelled=8]="cancelled",i[i.duplicated=16]="duplicated"})(jE||(jE={}));function Dc(i,e){return Lt(new Error,{type:i,[ux]:!0},e)}function Xo(i,e){return i instanceof Error&&ux in i&&(e==null||!!(i.type&e))}const $E="[^/]+?",EN={sensitive:!1,strict:!1,start:!0,end:!0},_N=/[.+*?^${}()[\]/\\]/g;function RN(i,e){const t=Lt({},EN,e),n=[];let s=t.start?"^":"";const o=[];for(const c of i){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=40+(t.sensitive?.25:0);if(h.type===0)d||(s+="/"),s+=h.value.replace(_N,"\\$&"),f+=40;else if(h.type===1){const{value:g,repeatable:p,optional:v,regexp:y}=h;o.push({name:g,repeatable:p,optional:v});const C=y||$E;if(C!==$E){f+=10;try{new RegExp(`(${C})`)}catch(w){throw new Error(`Invalid custom RegExp for param "${g}" (${C}): `+w.message)}}let m=p?`((?:${C})(?:/(?:${C}))*)`:`(${C})`;d||(m=v&&c.length<2?`(?:/${m})`:"/"+m),v&&(m+="?"),s+=m,f+=20,v&&(f+=-8),p&&(f+=-20),C===".*"&&(f+=-50)}u.push(f)}n.push(u)}if(t.strict&&t.end){const c=n.length-1;n[c][n[c].length-1]+=.7000000000000001}t.strict||(s+="/?"),t.end?s+="$":t.strict&&(s+="(?:/|$)");const r=new RegExp(s,t.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",g=o[h-1];d[g.name]=f&&g.repeatable?f.split("/"):f}return d}function l(c){let u="",d=!1;for(const h of i){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:g,repeatable:p,optional:v}=f,y=g in c?c[g]:"";if(so(y)&&!p)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const C=so(y)?y.join("/"):y;if(!C)if(v)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);u+=C}}return u||"/"}return{re:r,score:n,keys:o,parse:a,stringify:l}}function TN(i,e){let t=0;for(;t<i.length&&t<e.length;){const n=e[t]-i[t];if(n)return n;t++}return i.length<e.length?i.length===1&&i[0]===40+40?-1:1:i.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function xN(i,e){let t=0;const n=i.score,s=e.score;for(;t<n.length&&t<s.length;){const o=TN(n[t],s[t]);if(o)return o;t++}if(Math.abs(s.length-n.length)===1){if(zE(n))return 1;if(zE(s))return-1}return s.length-n.length}function zE(i){const e=i[i.length-1];return i.length>0&&e[e.length-1]<0}const AN={type:0,value:""},DN=/[a-zA-Z0-9_]/;function ON(i){if(!i)return[[]];if(i==="/")return[[AN]];if(!i.startsWith("/"))throw new Error(`Invalid path "${i}"`);function e(f){throw new Error(`ERR (${t})/"${c}": ${f}`)}let t=0,n=t;const s=[];let o;function r(){o&&s.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(t===0?o.push({type:0,value:c}):t===1||t===2||t===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<i.length;){if(l=i[a++],l==="\\"&&t!==2){n=t,t=4;continue}switch(t){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),t=1):h();break;case 4:h(),t=n;break;case 1:l==="("?t=2:DN.test(l)?h():(d(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:t=3:u+=l;break;case 3:d(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),d(),r(),s}function PN(i,e,t){const n=RN(ON(i.path),t),s=Lt(n,{record:i,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function IN(i,e){const t=[],n=new Map;e=qE({strict:!1,end:!0,sensitive:!1},e);function s(u){return n.get(u)}function o(u,d,h){const f=!h,g=MN(u);g.aliasOf=h&&h.record;const p=qE(e,u),v=[g];if("alias"in u){const m=typeof u.alias=="string"?[u.alias]:u.alias;for(const w of m)v.push(Lt({},g,{components:h?h.record.components:g.components,path:w,aliasOf:h?h.record:g}))}let y,C;for(const m of v){const{path:w}=m;if(d&&w[0]!=="/"){const E=d.record.path,R=E[E.length-1]==="/"?"":"/";m.path=d.record.path+(w&&R+w)}if(y=PN(m,d,p),h?h.alias.push(y):(C=C||y,C!==y&&C.alias.push(y),f&&u.name&&!YE(y)&&r(u.name)),g.children){const E=g.children;for(let R=0;R<E.length;R++)o(E[R],y,h&&h.children[R])}h=h||y,(y.record.components&&Object.keys(y.record.components).length||y.record.name||y.record.redirect)&&l(y)}return C?()=>{r(C)}:dd}function r(u){if(cx(u)){const d=n.get(u);d&&(n.delete(u),t.splice(t.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=t.indexOf(u);d>-1&&(t.splice(d,1),u.record.name&&n.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return t}function l(u){let d=0;for(;d<t.length&&xN(u,t[d])>=0&&(u.record.path!==t[d].record.path||!dx(u,t[d]));)d++;t.splice(d,0,u),u.record.name&&!YE(u)&&n.set(u.record.name,u)}function c(u,d){let h,f={},g,p;if("name"in u&&u.name){if(h=n.get(u.name),!h)throw Dc(1,{location:u});p=h.record.name,f=Lt(KE(d.params,h.keys.filter(C=>!C.optional).map(C=>C.name)),u.params&&KE(u.params,h.keys.map(C=>C.name))),g=h.stringify(f)}else if("path"in u)g=u.path,h=t.find(C=>C.re.test(g)),h&&(f=h.parse(g),p=h.record.name);else{if(h=d.name?n.get(d.name):t.find(C=>C.re.test(d.path)),!h)throw Dc(1,{location:u,currentLocation:d});p=h.record.name,f=Lt({},d.params,u.params),g=h.stringify(f)}const v=[];let y=h;for(;y;)v.unshift(y.record),y=y.parent;return{name:p,path:g,params:f,matched:v,meta:FN(v)}}return i.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:s}}function KE(i,e){const t={};for(const n of e)n in i&&(t[n]=i[n]);return t}function MN(i){return{path:i.path,redirect:i.redirect,name:i.name,meta:i.meta||{},aliasOf:void 0,beforeEnter:i.beforeEnter,props:LN(i),children:i.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in i?i.components||null:i.component&&{default:i.component}}}function LN(i){const e={},t=i.props||!1;if("component"in i)e.default=t;else for(const n in i.components)e[n]=typeof t=="object"?t[n]:t;return e}function YE(i){for(;i;){if(i.record.aliasOf)return!0;i=i.parent}return!1}function FN(i){return i.reduce((e,t)=>Lt(e,t.meta),{})}function qE(i,e){const t={};for(const n in i)t[n]=n in e?e[n]:i[n];return t}function dx(i,e){return e.children.some(t=>t===i||dx(i,t))}const hx=/#/g,NN=/&/g,kN=/\//g,VN=/=/g,GN=/\?/g,fx=/\+/g,HN=/%5B/g,BN=/%5D/g,px=/%5E/g,WN=/%60/g,gx=/%7B/g,UN=/%7C/g,mx=/%7D/g,jN=/%20/g;function _b(i){return encodeURI(""+i).replace(UN,"|").replace(HN,"[").replace(BN,"]")}function $N(i){return _b(i).replace(gx,"{").replace(mx,"}").replace(px,"^")}function IC(i){return _b(i).replace(fx,"%2B").replace(jN,"+").replace(hx,"%23").replace(NN,"%26").replace(WN,"`").replace(gx,"{").replace(mx,"}").replace(px,"^")}function zN(i){return IC(i).replace(VN,"%3D")}function KN(i){return _b(i).replace(hx,"%23").replace(GN,"%3F")}function YN(i){return i==null?"":KN(i).replace(kN,"%2F")}function kp(i){try{return decodeURIComponent(""+i)}catch{}return""+i}function qN(i){const e={};if(i===""||i==="?")return e;const n=(i[0]==="?"?i.slice(1):i).split("&");for(let s=0;s<n.length;++s){const o=n[s].replace(fx," "),r=o.indexOf("="),a=kp(r<0?o:o.slice(0,r)),l=r<0?null:kp(o.slice(r+1));if(a in e){let c=e[a];so(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function XE(i){let e="";for(let t in i){const n=i[t];if(t=zN(t),n==null){n!==void 0&&(e+=(e.length?"&":"")+t);continue}(so(n)?n.map(o=>o&&IC(o)):[n&&IC(n)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+t,o!=null&&(e+="="+o))})}return e}function XN(i){const e={};for(const t in i){const n=i[t];n!==void 0&&(e[t]=so(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return e}const QN=Symbol(""),QE=Symbol(""),Rb=Symbol(""),Tb=Symbol(""),MC=Symbol("");function Lu(){let i=[];function e(n){return i.push(n),()=>{const s=i.indexOf(n);s>-1&&i.splice(s,1)}}function t(){i=[]}return{add:e,list:()=>i.slice(),reset:t}}function Gr(i,e,t,n,s){const o=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((r,a)=>{const l=d=>{d===!1?a(Dc(4,{from:t,to:e})):d instanceof Error?a(d):SN(d)?a(Dc(2,{from:e,to:d})):(o&&n.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),r())},c=i.call(n&&n.instances[s],e,t,l);let u=Promise.resolve(c);i.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function bv(i,e,t,n){const s=[];for(const o of i)for(const r in o.components){let a=o.components[r];if(!(e!=="beforeRouteEnter"&&!o.instances[r]))if(ZN(a)){const c=(a.__vccOpts||a)[e];c&&s.push(Gr(c,t,n,o,r))}else{let l=a();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${o.path}"`));const u=sN(c)?c.default:c;o.components[r]=u;const h=(u.__vccOpts||u)[e];return h&&Gr(h,t,n,o,r)()}))}}return s}function ZN(i){return typeof i=="object"||"displayName"in i||"props"in i||"__vccOpts"in i}function ZE(i){const e=ct(Rb),t=ct(Tb),n=z(()=>e.resolve(Ni(i.to))),s=z(()=>{const{matched:l}=n.value,{length:c}=l,u=l[c-1],d=t.matched;if(!u||!d.length)return-1;const h=d.findIndex(Ac.bind(null,u));if(h>-1)return h;const f=JE(l[c-2]);return c>1&&JE(u)===f&&d[d.length-1].path!==f?d.findIndex(Ac.bind(null,l[c-2])):h}),o=z(()=>s.value>-1&&i1(t.params,n.value.params)),r=z(()=>s.value>-1&&s.value===t.matched.length-1&&ax(t.params,n.value.params));function a(l={}){return t1(l)?e[Ni(i.replace)?"replace":"push"](Ni(i.to)).catch(dd):Promise.resolve()}return{route:n,href:z(()=>n.value.href),isActive:o,isExactActive:r,navigate:a}}const JN=xl({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ZE,setup(i,{slots:e}){const t=xi(ZE(i)),{options:n}=ct(Rb),s=z(()=>({[e_(i.activeClass,n.linkActiveClass,"router-link-active")]:t.isActive,[e_(i.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const o=e.default&&e.default(t);return i.custom?o:ts("a",{"aria-current":t.isExactActive?i.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},o)}}}),e1=JN;function t1(i){if(!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)&&!i.defaultPrevented&&!(i.button!==void 0&&i.button!==0)){if(i.currentTarget&&i.currentTarget.getAttribute){const e=i.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return i.preventDefault&&i.preventDefault(),!0}}function i1(i,e){for(const t in e){const n=e[t],s=i[t];if(typeof n=="string"){if(n!==s)return!1}else if(!so(s)||s.length!==n.length||n.some((o,r)=>o!==s[r]))return!1}return!0}function JE(i){return i?i.aliasOf?i.aliasOf.path:i.path:""}const e_=(i,e,t)=>i??e??t,n1=xl({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(i,{attrs:e,slots:t}){const n=ct(MC),s=z(()=>i.route||n.value),o=ct(QE,0),r=z(()=>{let c=Ni(o);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=z(()=>s.value.matched[r.value]);Ht(QE,z(()=>r.value+1)),Ht(QN,a),Ht(MC,s);const l=Te();return Le(()=>[l.value,a.value,i.name],([c,u,d],[h,f,g])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!Ac(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(p=>p(c))},{flush:"post"}),()=>{const c=s.value,u=i.name,d=a.value,h=d&&d.components[u];if(!h)return t_(t.default,{Component:h,route:c});const f=d.props[u],g=f?f===!0?c.params:typeof f=="function"?f(c):f:null,v=ts(h,Lt({},g,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return t_(t.default,{Component:v,route:c})||v}}});function t_(i,e){if(!i)return null;const t=i(e);return t.length===1?t[0]:t}const s1=n1;function o1(i){const e=IN(i.routes,i),t=i.parseQuery||qN,n=i.stringifyQuery||XE,s=i.history,o=Lu(),r=Lu(),a=Lu(),l=Fe(Fr);let c=Fr;ac&&i.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Cv.bind(null,K=>""+K),d=Cv.bind(null,YN),h=Cv.bind(null,kp);function f(K,he){let ne,ie;return cx(K)?(ne=e.getRecordMatcher(K),ie=he):ie=K,e.addRoute(ie,ne)}function g(K){const he=e.getRecordMatcher(K);he&&e.removeRoute(he)}function p(){return e.getRoutes().map(K=>K.record)}function v(K){return!!e.getRecordMatcher(K)}function y(K,he){if(he=Lt({},he||l.value),typeof K=="string"){const B=yv(t,K,he.path),X=e.resolve({path:B.path},he),Z=s.createHref(B.fullPath);return Lt(B,X,{params:h(X.params),hash:kp(B.hash),redirectedFrom:void 0,href:Z})}let ne;if("path"in K)ne=Lt({},K,{path:yv(t,K.path,he.path).path});else{const B=Lt({},K.params);for(const X in B)B[X]==null&&delete B[X];ne=Lt({},K,{params:d(B)}),he.params=d(he.params)}const ie=e.resolve(ne,he),ee=K.hash||"";ie.params=u(h(ie.params));const j=aN(n,Lt({},K,{hash:$N(ee),path:ie.path})),M=s.createHref(j);return Lt({fullPath:j,hash:ee,query:n===XE?XN(K.query):K.query||{}},ie,{redirectedFrom:void 0,href:M})}function C(K){return typeof K=="string"?yv(t,K,l.value.path):Lt({},K)}function m(K,he){if(c!==K)return Dc(8,{from:he,to:K})}function w(K){return O(K)}function E(K){return w(Lt(C(K),{replace:!0}))}function R(K){const he=K.matched[K.matched.length-1];if(he&&he.redirect){const{redirect:ne}=he;let ie=typeof ne=="function"?ne(K):ne;return typeof ie=="string"&&(ie=ie.includes("?")||ie.includes("#")?ie=C(ie):{path:ie},ie.params={}),Lt({query:K.query,hash:K.hash,params:"path"in ie?{}:K.params},ie)}}function O(K,he){const ne=c=y(K),ie=l.value,ee=K.state,j=K.force,M=K.replace===!0,B=R(ne);if(B)return O(Lt(C(B),{state:typeof B=="object"?Lt({},ee,B.state):ee,force:j,replace:M}),he||ne);const X=ne;X.redirectedFrom=he;let Z;return!j&&lN(n,ie,ne)&&(Z=Dc(16,{to:X,from:ie}),V(ie,ie,!0,!1)),(Z?Promise.resolve(Z):L(X,ie)).catch(ue=>Xo(ue)?Xo(ue,2)?ue:q(ue):F(ue,X,ie)).then(ue=>{if(ue){if(Xo(ue,2))return O(Lt({replace:M},C(ue.to),{state:typeof ue.to=="object"?Lt({},ee,ue.to.state):ee,force:j}),he||X)}else ue=x(X,ie,!0,M,ee);return S(X,ie,ue),ue})}function A(K,he){const ne=m(K,he);return ne?Promise.reject(ne):Promise.resolve()}function D(K){const he=se.values().next().value;return he&&typeof he.runWithContext=="function"?he.runWithContext(K):K()}function L(K,he){let ne;const[ie,ee,j]=r1(K,he);ne=bv(ie.reverse(),"beforeRouteLeave",K,he);for(const B of ie)B.leaveGuards.forEach(X=>{ne.push(Gr(X,K,he))});const M=A.bind(null,K,he);return ne.push(M),re(ne).then(()=>{ne=[];for(const B of o.list())ne.push(Gr(B,K,he));return ne.push(M),re(ne)}).then(()=>{ne=bv(ee,"beforeRouteUpdate",K,he);for(const B of ee)B.updateGuards.forEach(X=>{ne.push(Gr(X,K,he))});return ne.push(M),re(ne)}).then(()=>{ne=[];for(const B of j)if(B.beforeEnter)if(so(B.beforeEnter))for(const X of B.beforeEnter)ne.push(Gr(X,K,he));else ne.push(Gr(B.beforeEnter,K,he));return ne.push(M),re(ne)}).then(()=>(K.matched.forEach(B=>B.enterCallbacks={}),ne=bv(j,"beforeRouteEnter",K,he),ne.push(M),re(ne))).then(()=>{ne=[];for(const B of r.list())ne.push(Gr(B,K,he));return ne.push(M),re(ne)}).catch(B=>Xo(B,8)?B:Promise.reject(B))}function S(K,he,ne){a.list().forEach(ie=>D(()=>ie(K,he,ne)))}function x(K,he,ne,ie,ee){const j=m(K,he);if(j)return j;const M=he===Fr,B=ac?history.state:{};ne&&(ie||M?s.replace(K.fullPath,Lt({scroll:M&&B&&B.scroll},ee)):s.push(K.fullPath,ee)),l.value=K,V(K,he,ne,M),q()}let T;function H(){T||(T=s.listen((K,he,ne)=>{if(!ce.listening)return;const ie=y(K),ee=R(ie);if(ee){O(Lt(ee,{replace:!0}),ie).catch(dd);return}c=ie;const j=l.value;ac&&mN(WE(j.fullPath,ne.delta),Bg()),L(ie,j).catch(M=>Xo(M,12)?M:Xo(M,2)?(O(M.to,ie).then(B=>{Xo(B,20)&&!ne.delta&&ne.type===Ld.pop&&s.go(-1,!1)}).catch(dd),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),F(M,ie,j))).then(M=>{M=M||x(ie,j,!1),M&&(ne.delta&&!Xo(M,8)?s.go(-ne.delta,!1):ne.type===Ld.pop&&Xo(M,20)&&s.go(-1,!1)),S(ie,j,M)}).catch(dd)}))}let Y=Lu(),Q=Lu(),te;function F(K,he,ne){q(K);const ie=Q.list();return ie.length?ie.forEach(ee=>ee(K,he,ne)):console.error(K),Promise.reject(K)}function k(){return te&&l.value!==Fr?Promise.resolve():new Promise((K,he)=>{Y.add([K,he])})}function q(K){return te||(te=!K,H(),Y.list().forEach(([he,ne])=>K?ne(K):he()),Y.reset()),K}function V(K,he,ne,ie){const{scrollBehavior:ee}=i;if(!ac||!ee)return Promise.resolve();const j=!ne&&vN(WE(K.fullPath,0))||(ie||!ne)&&history.state&&history.state.scroll||null;return Wt().then(()=>ee(K,he,j)).then(M=>M&&gN(M)).catch(M=>F(M,K,he))}const J=K=>s.go(K);let ae;const se=new Set,ce={currentRoute:l,listening:!0,addRoute:f,removeRoute:g,hasRoute:v,getRoutes:p,resolve:y,options:i,push:w,replace:E,go:J,back:()=>J(-1),forward:()=>J(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:Q.add,isReady:k,install(K){const he=this;K.component("RouterLink",e1),K.component("RouterView",s1),K.config.globalProperties.$router=he,Object.defineProperty(K.config.globalProperties,"$route",{enumerable:!0,get:()=>Ni(l)}),ac&&!ae&&l.value===Fr&&(ae=!0,w(s.location).catch(ee=>{}));const ne={};for(const ee in Fr)Object.defineProperty(ne,ee,{get:()=>l.value[ee],enumerable:!0});K.provide(Rb,he),K.provide(Tb,mT(ne)),K.provide(MC,l);const ie=K.unmount;se.add(K),K.unmount=function(){se.delete(K),se.size<1&&(c=Fr,T&&T(),T=null,l.value=Fr,ae=!1,te=!1),ie()}}};function re(K){return K.reduce((he,ne)=>he.then(()=>D(ne)),Promise.resolve())}return ce}function r1(i,e){const t=[],n=[],s=[],o=Math.max(e.matched.length,i.matched.length);for(let r=0;r<o;r++){const a=e.matched[r];a&&(i.matched.find(c=>Ac(c,a))?n.push(a):t.push(a));const l=i.matched[r];l&&(e.matched.find(c=>Ac(c,l))||s.push(l))}return[t,n,s]}function a1(){return ct(Tb)}/**
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.0.5
* @link https://www.ag-grid.com/
* @license MIT
*/function Qr(i){return i==null||i===""?null:i}function ye(i,e=!1){return i!=null&&(i!==""||e)}function $e(i){return!ye(i)}function Kn(i){return i==null||i.length===0}function Fd(i){return i!=null&&typeof i.toString=="function"?i.toString():null}function Cs(i){if(i===void 0)return;if(i===null||i==="")return null;if(typeof i=="number")return isNaN(i)?void 0:i;const e=parseInt(i,10);return isNaN(e)?void 0:e}function Eo(i){if(i!==void 0)return i===null||i===""?!1:typeof i=="boolean"?i:/true/i.test(i)}function l1(i){if(!(i==null||i===""))return i}function c1(i,e){return i==null&&e==null?!0:i==null&&e!=null||i!=null&&e==null?!1:i===e}function u1(i,e){const t=i?JSON.stringify(i):null,n=e?JSON.stringify(e):null;return t===n}function d1(i,e,t=!1){const n=i==null,s=e==null;if(i&&i.toNumber&&(i=i.toNumber()),e&&e.toNumber&&(e=e.toNumber()),n&&s)return 0;if(n)return-1;if(s)return 1;function o(r,a){return r>a?1:r<a?-1:0}if(typeof i!="string"||!t)return o(i,e);try{return i.localeCompare(e)}catch{return o(i,e)}}function sl(i){if(i instanceof Set||i instanceof Map){const e=[];return i.forEach(t=>e.push(t)),e}return Object.values(i)}var h1=Object.freeze({__proto__:null,makeNull:Qr,exists:ye,missing:$e,missingOrEmpty:Kn,toStringOrNull:Fd,attrToNumber:Cs,attrToBoolean:Eo,attrToString:l1,referenceCompare:c1,jsonEquals:u1,defaultComparator:d1,values:sl});class f1{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=Fd(e);let n=0;for(;;){let s;if(e?(s=e,n!==0&&(s+="_"+n)):t?(s=t,n!==0&&(s+="_"+n)):s=""+n,!this.existingKeys[s])return this.existingKeys[s]=!0,s;n++}}}function Qt(i,e){i!=null&&(Array.isArray(i)?i.forEach((t,n)=>e(`${n}`,t)):Object.keys(i).forEach(t=>e(t,i[t])))}function xb(i){const e={},t=Object.keys(i);for(let n=0;n<t.length;n++){const s=t[n],o=i[s];e[s]=o}return e}function p1(i){return JSON.parse(JSON.stringify(i))}function Vp(i,e){if(!i)return;const t=i,n={};return Object.keys(t).forEach(s=>{if(e&&e.indexOf(s)>=0)return;const o=t[s];Gp(o)&&o.constructor===Object?n[s]=Vp(o):n[s]=o}),n}function vx(i,e){return i[e]}function Cx(i,e,t){i[e]=t}function g1(i,e,...t){t.forEach(n=>yx(i,e,n))}function yx(i,e,t,n){const s=vx(i,t);s!==void 0&&Cx(e,t,n?n(s):s)}function bx(i){const e={};return i.filter(t=>t!=null).forEach(t=>{Object.keys(t).forEach(n=>e[n]=null)}),Object.keys(e)}function Io(i){if(!i)return[];const e=Object;if(typeof e.values=="function")return e.values(i);const t=[];for(const n in i)i.hasOwnProperty(n)&&i.propertyIsEnumerable(n)&&t.push(i[n]);return t}function Qn(i,e,t=!0,n=!1){ye(e)&&Qt(e,(s,o)=>{let r=i[s];r!==o&&(n&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},i[s]=r),Gp(o)&&Gp(r)&&!Array.isArray(r)?Qn(r,o,t,n):(t||o!==void 0)&&(i[s]=o))})}function m1(i){return $e(i)||Object.keys(i).length===0}function v1(i,e,t){if(i==null)return t;const n=e.split(".");let s=i;for(;n.length>1;)if(s=s[n.shift()],s==null)return t;const o=s[n[0]];return o??t}function C1(i,e,t){if(i==null)return;const n=e.split(".");let s=i;n.forEach((o,r)=>{s[o]||(s[o]={}),r<n.length-1&&(s=s[o])}),s[n[n.length-1]]=t}function bc(i,e,t){if(!e||!i)return;if(!t)return i[e];const n=e.split(".");let s=i;for(let o=0;o<n.length;o++){if(s==null)return;s=s[n[o]]}return s}function Sx(i,e){Object.keys(i).forEach(s=>{typeof i[s]=="object"&&(i[s]=void 0)});const t=Object.getPrototypeOf(i),n={};Object.keys(t).forEach(s=>{if(typeof t[s]=="function"){const r=()=>{console.warn(`AG Grid: ${e} function ${s}() cannot be called as the grid has been destroyed.
Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't
be keeping the API reference, your application has a memory leak! Remove the API reference
when the grid is destroyed.`)};n[s]={value:r,writable:!0}}}),Object.defineProperties(i,n)}function Gp(i){return typeof i=="object"&&i!==null}var y1=Object.freeze({__proto__:null,iterateObject:Qt,cloneObject:xb,deepCloneObject:p1,deepCloneDefinition:Vp,getProperty:vx,setProperty:Cx,copyPropertiesIfPresent:g1,copyPropertyIfPresent:yx,getAllKeysInObjects:bx,getAllValuesInObject:Io,mergeDeep:Qn,missingOrEmptyObject:m1,get:v1,set:C1,getValueUsingField:bc,removeAllReferences:Sx,isNonNullObject:Gp});const i_={};function yt(i,e){i_[e]||(i(),i_[e]=!0)}function Wg(i){if(i.name)return i.name;const e=/function\s+([^\(]+)/.exec(i.toString());return e&&e.length===2?e[1].trim():null}function Ug(i){return!!(i&&i.constructor&&i.call&&i.apply)}function Ex(i){_x(i,400)}const wv=[];let Sv=!1;function LC(i){wv.push(i),!Sv&&(Sv=!0,window.setTimeout(()=>{const e=wv.slice();wv.length=0,Sv=!1,e.forEach(t=>t())},0))}function _x(i,e=0){i.length>0&&window.setTimeout(()=>i.forEach(t=>t()),e)}function xo(i,e){let t;return function(...n){const s=this;window.clearTimeout(t),t=window.setTimeout(function(){i.apply(s,n)},e)}}function FC(i,e){let t=0;return function(...n){const s=this,o=new Date().getTime();o-t<e||(t=o,i.apply(s,n))}}function Ab(i,e,t=100,n){const s=new Date().getTime();let o=null,r=!1;const a=()=>{const l=new Date().getTime()-s>t;(i()||l)&&(e(),r=!0,o!=null&&(window.clearInterval(o),o=null),l&&n&&console.warn(n))};a(),r||(o=window.setInterval(a,10))}function b1(...i){return e=>i.reduce((t,n)=>n(t),e)}function Rx(i){i&&i()}const w1=()=>{};var S1=Object.freeze({__proto__:null,doOnce:yt,getFunctionName:Wg,isFunction:Ug,executeInAWhile:Ex,executeNextVMTurn:LC,executeAfter:_x,debounce:xo,throttle:FC,waitUntil:Ab,compose:b1,callIfPresent:Rx,noop:w1}),We;(function(i){i.CommunityCoreModule="@ag-grid-community/core",i.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",i.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",i.CsvExportModule="@ag-grid-community/csv-export",i.EnterpriseCoreModule="@ag-grid-enterprise/core",i.RowGroupingModule="@ag-grid-enterprise/row-grouping",i.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",i.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",i.MenuModule="@ag-grid-enterprise/menu",i.SetFilterModule="@ag-grid-enterprise/set-filter",i.MultiFilterModule="@ag-grid-enterprise/multi-filter",i.StatusBarModule="@ag-grid-enterprise/status-bar",i.SideBarModule="@ag-grid-enterprise/side-bar",i.RangeSelectionModule="@ag-grid-enterprise/range-selection",i.MasterDetailModule="@ag-grid-enterprise/master-detail",i.RichSelectModule="@ag-grid-enterprise/rich-select",i.GridChartsModule="@ag-grid-enterprise/charts",i.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",i.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",i.ExcelExportModule="@ag-grid-enterprise/excel-export",i.ClipboardModule="@ag-grid-enterprise/clipboard",i.SparklinesModule="@ag-grid-enterprise/sparklines",i.AngularModule="@ag-grid-community/angular",i.ReactModule="@ag-grid-community/react",i.VueModule="@ag-grid-community/vue"})(We||(We={}));class Pe{static register(e){Pe.__register(e,!0,void 0)}static registerModules(e){Pe.__registerModules(e,!0,void 0)}static __register(e,t,n){Pe.runVersionChecks(e),n!==void 0?(Pe.areGridScopedModules=!0,Pe.gridModulesMap[n]===void 0&&(Pe.gridModulesMap[n]={}),Pe.gridModulesMap[n][e.moduleName]=e):Pe.globalModulesMap[e.moduleName]=e,Pe.setModuleBased(t)}static __unRegisterGridModules(e){delete Pe.gridModulesMap[e]}static __registerModules(e,t,n){Pe.setModuleBased(t),e&&e.forEach(s=>Pe.__register(s,t,n))}static isValidModuleVersion(e){const[t,n]=e.version.split(".")||[],[s,o]=Pe.currentModuleVersion.split(".")||[];return t===s&&n===o}static runVersionChecks(e){if(Pe.currentModuleVersion||(Pe.currentModuleVersion=e.version),e.version?Pe.isValidModuleVersion(e)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${e.moduleName}' is version ${e.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${e.moduleName}' is incompatible. Please update all modules to the same version.`),e.validate){const t=e.validate();t.isValid||console.error(`AG Grid: ${t.message}`)}}static setModuleBased(e){Pe.moduleBased===void 0?Pe.moduleBased=e:Pe.moduleBased!==e&&yt(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){Pe.isBundled=!0}static __assertRegistered(e,t,n){var s;if(this.__isRegistered(e,n))return!0;const o=t+e;let r;if(Pe.isBundled)r=`AG Grid: unable to use ${t} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:
<script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>
For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(Pe.moduleBased||Pe.moduleBased===void 0){let a=(s=Object.entries(We).find(([l,c])=>c===e))===null||s===void 0?void 0:s[0];r=`AG Grid: unable to use ${t} as the ${a} is not registered${Pe.areGridScopedModules?` for gridId: ${n}`:""}. Check if you have registered the module:
import { ModuleRegistry } from '@ag-grid-community/core';
import { ${a} } from '${e}';
ModuleRegistry.registerModules([ ${a} ]);
For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else r=`AG Grid: unable to use ${t} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:
import 'ag-grid-enterprise';
For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return yt(()=>{console.warn(r)},o),!1}static __isRegistered(e,t){var n;return!!Pe.globalModulesMap[e]||!!(!((n=Pe.gridModulesMap[t])===null||n===void 0)&&n[e])}static __getRegisteredModules(e){return[...sl(Pe.globalModulesMap),...sl(Pe.gridModulesMap[e]||{})]}static __getGridRegisteredModules(e){var t;return sl((t=Pe.gridModulesMap[e])!==null&&t!==void 0?t:{})||[]}static __isPackageBased(){return!Pe.moduleBased}}Pe.globalModulesMap={};Pe.gridModulesMap={};Pe.areGridScopedModules=!1;class E1{constructor(e,t){if(this.beanWrappers={},this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const n=this.getBeanInstances();this.wireBeans(n),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return sl(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),ye(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),Qt(this.beanWrappers,(t,n)=>{let s;n.bean.__agBeanMetaData&&n.bean.__agBeanMetaData.autowireMethods&&n.bean.__agBeanMetaData.autowireMethods.agConstructor&&(s=n.bean.__agBeanMetaData.autowireMethods.agConstructor);const o=this.getBeansForParameters(s,n.bean.name),r=new(n.bean.bind.apply(n.bean,[null,...o]));n.beanInstance=r});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const t=e.__agBeanMetaData;if(!t){let s;e.prototype.constructor?s=Wg(e.prototype.constructor):s=""+e,console.error(`Context item ${s} is not a bean`);return}const n={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=n}autoWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(n,s)=>{const o=n.agClassAttributes;o&&o.forEach(r=>{const a=this.lookupBeanInstance(s,r.beanName,r.optional);t[r.attributeName]=a})})})}methodWireBeans(e){e.forEach(t=>{this.forEachMetaDataInHierarchy(t,(n,s)=>{Qt(n.autowireMethods,(o,r)=>{if(o==="agConstructor")return;const a=this.getBeansForParameters(r,s);t[o].apply(t,a)})})})}forEachMetaDataInHierarchy(e,t){let n=Object.getPrototypeOf(e);for(;n!=null;){const s=n.constructor;if(s.hasOwnProperty("__agBeanMetaData")){const o=s.__agBeanMetaData,r=this.getBeanName(s);t(o,r)}n=Object.getPrototypeOf(n)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const t=e.toString();return t.substring(9,t.indexOf("("))}getBeansForParameters(e,t){const n=[];return e&&Qt(e,(s,o)=>{const r=this.lookupBeanInstance(t,o);n[Number(s)]=r}),n}lookupBeanInstance(e,t,n=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${t} is used after the grid is destroyed!`),null;if(t==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];const s=this.beanWrappers[t];return s?s.beanInstance:(n||console.error(`AG Grid: unable to find bean reference ${t} while initialising ${e}`),null)}callLifeCycleMethods(e,t){e.forEach(n=>this.callLifeCycleMethodsOnBean(n,t))}callLifeCycleMethodsOnBean(e,t,n){const s={};this.forEachMetaDataInHierarchy(e,r=>{const a=r[t];a&&a.forEach(l=>{l!=n&&(s[l]=!0)})}),Object.keys(s).forEach(r=>e[r]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,Pe.__unRegisterGridModules(this.contextParams.gridId),this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(t=>{this.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy");const n=t;typeof n.destroy=="function"&&n.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}}function Tx(i,e,t){const n=gl(i.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(e)}function Re(i,e,t){const n=gl(i.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(e)}function Hi(i,e,t){const n=gl(i.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(e)}function Be(i){return e=>{const t=gl(e);t.beanName=i}}function W(i){return(e,t,n)=>{xx(e,i,!1,e,t,null)}}function xt(i){return(e,t,n)=>{xx(e,i,!0,e,t,null)}}function xx(i,e,t,n,s,o){if(e===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof o=="number"){console.error("AG Grid: Autowired should be on an attribute");return}const r=gl(i.constructor);r.agClassAttributes||(r.agClassAttributes=[]),r.agClassAttributes.push({attributeName:s,beanName:e,optional:t})}function bn(i){return(e,t,n)=>{const s=typeof e=="function"?e:e.constructor;let o;if(typeof n=="number"){let r;t?(o=gl(s),r=t):(o=gl(s),r="agConstructor"),o.autowireMethods||(o.autowireMethods={}),o.autowireMethods[r]||(o.autowireMethods[r]={}),o.autowireMethods[r][n]=i}}}function gl(i){return i.hasOwnProperty("__agBeanMetaData")||(i.__agBeanMetaData={}),i.__agBeanMetaData}var Ax=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Pf=function(i,e){return function(t,n){e(t,n,i)}};let oo=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={}}setBeans(e,t,n,s=null){if(this.frameworkOverrides=n,this.gridOptionsService=t,s){const o=t.useAsyncEvents();this.addGlobalListener(s,o)}}getListeners(e,t,n){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&n&&(o=new Set,s.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 s=this.getListeners(e,n,!1);s&&(s.delete(t),s.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let t=e;if(this.gridOptionsService){const{api:n,columnApi:s,context:o}=this.gridOptionsService;t.api=n,t.columnApi=s,t.context=o}this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.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 s=a=>a.forEach(l=>{t?this.dispatchAsync(()=>l(e)):l(e)}),o=new Set(this.getListeners(n,t,!1));o&&s(o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{t?this.dispatchAsync(()=>this.frameworkOverrides.dispatchEvent(n,()=>a(n,e),!0)):this.frameworkOverrides.dispatchEvent(n,()=>a(n,e),!0)})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};Ax([Pf(0,bn("loggerFactory")),Pf(1,bn("gridOptionsService")),Pf(2,bn("frameworkOverrides")),Pf(3,bn("globalEventListener"))],oo.prototype,"setBeans",null);oo=Ax([Be("eventService")],oo);var jg=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let _1=0;function Dx(){return _1++}class qe{constructor(e,t,n,s){this.instanceId=Dx(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new oo,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=s,this.setState(e)}getInstanceId(){return this.instanceId}setState(e){e.sort!==void 0?(e.sort==="asc"||e.sort==="desc")&&(this.sort=e.sort):(e.initialSort==="asc"||e.initialSort==="desc")&&(this.sort=e.initialSort);const t=Cs(e.sortIndex),n=Cs(e.initialSortIndex);t!==void 0?t!==null&&(this.sortIndex=t):n!==null&&(this.sortIndex=n);const s=Eo(e.hide),o=Eo(e.initialHide);s!==void 0?this.visible=!s:this.visible=!o,e.pinned!==void 0?this.setPinned(e.pinned):this.setPinned(e.initialPinned);const r=Cs(e.flex),a=Cs(e.initialFlex);r!==void 0?this.flex=r:a!==void 0&&(this.flex=a)}setColDef(e,t){this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged","api"))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(e){this.parent=e}getParent(){return this.parent}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.validate()}initDotNotation(){const e=this.gridOptionsService.is("suppressFieldDotNotation");this.fieldContainsDots=ye(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=ye(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)}initTooltip(){this.tooltipEnabled=ye(this.colDef.tooltipField)||ye(this.colDef.tooltipValueGetter)||ye(this.colDef.tooltipComponent)}resetActualWidth(e="api"){const t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if($e(this.colDef)||$e(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,n=this.colDef.showRowGroup===e;return t||n}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}validate(){const e=this.colDef;function t(s,o,r){yt(()=>{r?console.warn(s,r):yt(()=>console.warn(s),o)},o)}if(this.gridOptionsService.isRowModelType("clientSide")&&!Pe.__isRegistered(We.RowGroupingModule,this.gridOptionsService.getGridId())){const o=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"].filter(r=>ye(e[r]));o.length>0&&Pe.__assertRegistered(We.RowGroupingModule,o.map(r=>"colDef."+r).join(", "),this.gridOptionsService.getGridId())}if((this.colDef.cellEditor==="agRichSelect"||this.colDef.cellEditor==="agRichSelectCellEditor")&&Pe.__assertRegistered(We.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId()),this.gridOptionsService.isTreeData()){const o=["rowGroup","rowGroupIndex","pivot","pivotIndex"].filter(r=>ye(e[r]));o.length>0&&t(`AG Grid: ${o.join()} is not possible when doing tree data, your column definition should not have ${o.join()}`,"TreeDataCannotRowGroup")}if(ye(e.menuTabs))if(Array.isArray(e.menuTabs)){const s=["filterMenuTab"],o=["columnsMenuTab","generalMenuTab"],r=o.filter(a=>e.menuTabs.includes(a));r.length>0&&Pe.__assertRegistered(We.MenuModule,`menuTab(s): ${r.map(a=>`'${a}'`).join()}`,this.gridOptionsService.getGridId()),e.menuTabs.forEach(a=>{!o.includes(a)&&!s.includes(a)&&t(`AG Grid: '${a}' is not valid for 'colDef.menuTabs'. Valid values are: ${[...s,...o].map(l=>`'${l}'`).join()}.`,"wrongValue_menuTabs_"+a)})}else t("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof e.menuTabs,"wrongType_menuTabs");ye(e.columnsMenuParams)&&Pe.__assertRegistered(We.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId()),ye(e.columnsMenuParams)&&Pe.__assertRegistered(We.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId()),ye(this.colDef.width)&&typeof this.colDef.width!="number"&&t("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck"),ye(e.columnGroupShow)&&e.columnGroupShow!=="closed"&&e.columnGroupShow!=="open"&&t(`AG Grid: '${e.columnGroupShow}' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null`,"columnGroupShow_invalid")}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}createColumnFunctionCallbackParams(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),n=this.colDef.suppressNavigable;return n(t)}return!1}isCellEditable(e){return e.group&&!this.gridOptionsService.is("enableGroupEdit")?!1:this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!Eo(this.colDef.suppressFillHandle)}isAutoHeight(){return!!Eo(this.colDef.autoHeight)}isAutoHeaderHeight(){return!!Eo(this.colDef.autoHeaderHeight)}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!Eo(this.colDef.resizable)}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}setMoving(e,t="api"){this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return{type:e,column:this,columns:[this],source:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t="api"){this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(e,t="api"){this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return $e(this.sort)}isSorting(){return ye(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t="api"){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t="api",n){this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);n&&Qn(s,n),this.eventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t="api"){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t="api"){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("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="api"){const n=e===!0;this.visible!==n&&(this.visible=n,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return{node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}}getColSpan(e){if($e(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if($e(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t="api",n=!1){this.minWidth!=null&&(e=Math.max(e,this.minWidth)),this.maxWidth!=null&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return this.maxWidth!=null?e>this.maxWidth:!1}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e="api"){ye(this.minWidth)&&this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t="api"){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t="api"){this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t="api"){this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}getMenuTabs(e){let t=this.getColDef().menuTabs;return t==null&&(t=e),t}dispatchStateUpdatedEvent(e){this.eventService.dispatchEvent({type:qe.EVENT_STATE_UPDATED,key:e})}}qe.EVENT_MOVING_CHANGED="movingChanged";qe.EVENT_LEFT_CHANGED="leftChanged";qe.EVENT_WIDTH_CHANGED="widthChanged";qe.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged";qe.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged";qe.EVENT_VISIBLE_CHANGED="visibleChanged";qe.EVENT_FILTER_CHANGED="filterChanged";qe.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged";qe.EVENT_SORT_CHANGED="sortChanged";qe.EVENT_COL_DEF_CHANGED="colDefChanged";qe.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged";qe.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged";qe.EVENT_PIVOT_CHANGED="columnPivotChanged";qe.EVENT_VALUE_CHANGED="columnValueChanged";qe.EVENT_STATE_UPDATED="columnStateUpdated";jg([W("gridOptionsService")],qe.prototype,"gridOptionsService",void 0);jg([W("columnUtils")],qe.prototype,"columnUtils",void 0);jg([W("columnHoverService")],qe.prototype,"columnHoverService",void 0);jg([Re],qe.prototype,"initialise",null);var R1=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class It{constructor(e,t,n,s){this.localEventService=new oo,this.expandable=!1,this.instanceId=Dx(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=n,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}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}setOriginalParent(e){this.originalParent=e}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;const t={type:It.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(t)}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}addLeafColumns(e){this.children&&this.children.forEach(t=>{t instanceof qe?e.push(t):t instanceof It&&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);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const s=this.findChildrenRemovingPadding();for(let r=0,a=s.length;r<a;r++){const l=s[r];if(!l.isVisible())continue;const c=l.getColumnGroupShow();c==="open"?(e=!0,n=!0):c==="closed"?(t=!0,n=!0):(e=!0,t=!0)}const o=e&&t&&n;if(this.expandable!==o){this.expandable=o;const r={type:It.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(r)}}findChildrenRemovingPadding(){const e=[],t=n=>{n.forEach(s=>{s instanceof It&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}}It.EVENT_EXPANDED_CHANGED="expandedChanged";It.EVENT_EXPANDABLE_CHANGED="expandableChanged";R1([Hi],It.prototype,"destroy",null);const T1={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Ox(...i){for(let e=0;e<i.length;e++){const t=i[e];if(ye(t))return t}return null}function x1(i){return i!=null&&i.length>0}function Ot(i){if(!(!i||!i.length))return i[i.length-1]}function Ur(i,e,t){return i==null&&e==null?!0:i!=null&&e!=null&&i.length===e.length&&i.every((n,s)=>t?t(n,e[s]):e[s]===n)}function A1(i,e){return Ur(i,e)}function Px(i){return i.sort((e,t)=>e-t)}function D1(i,e){if(i)for(let t=i.length-2;t>=0;t--){const n=i[t]===e,s=i[t+1]===e;n&&s&&i.splice(t+1,1)}}function tn(i,e){const t=i.indexOf(e);t>=0&&i.splice(t,1)}function Db(i,e){e.forEach(t=>tn(i,t))}function Nd(i,e,t){i.splice(t,0,e)}function O1(i,e,t){if(!(i==null||e==null))for(let n=e.length-1;n>=0;n--){const s=e[n];Nd(i,s,t)}}function NC(i,e,t){Db(i,e),e.slice().reverse().forEach(n=>Nd(i,n,t))}function Ss(i,e){return i.indexOf(e)>-1}function Ix(i){return[].concat.apply([],i)}function kC(i,e){e==null||i==null||e.forEach(t=>i.push(t))}function P1(i){return i.map(Fd)}function I1(i,e){if(i!=null)for(let t=i.length-1;t>=0;t--)e(i[t],t)}var M1=Object.freeze({__proto__:null,firstExistingValue:Ox,existsAndNotEmpty:x1,last:Ot,areEqual:Ur,shallowCompare:A1,sortNumerically:Px,removeRepeatsFromArray:D1,removeFromArray:tn,removeAllFromArray:Db,insertIntoArray:Nd,insertArrayIntoArray:O1,moveInArray:NC,includes:Ss,flatten:Ix,pushAll:kC,toStrings:P1,forEachReverse:I1});const Mx="__ag_Grid_Stop_Propagation",L1=["touchstart","touchend","touchmove","touchcancel","scroll"],Ev={};function hr(i){i[Mx]=!0}function Ao(i){return i[Mx]===!0}const Ob=(()=>{const i={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if(typeof Ev[t]=="boolean")return Ev[t];const n=document.createElement(i[t]||"div");return t="on"+t,Ev[t]=t in n}})();function Hp(i,e,t){let n=e;for(;n;){const s=i.getDomData(n,t);if(s)return s;n=n.parentElement}return null}function Bp(i,e){return!e||!i?!1:Fx(e).indexOf(i)>=0}function Lx(i){const e=[];let t=i.target;for(;t;)e.push(t),t=t.parentElement;return e}function Fx(i){const e=i;return e.path?e.path:e.composedPath?e.composedPath():Lx(e)}function Nx(i,e,t,n){const o=Ss(L1,t)?{passive:!0}:void 0;i&&i.addEventListener&&i.addEventListener(e,t,n,o)}var F1=Object.freeze({__proto__:null,stopPropagationForAgGrid:hr,isStopPropagationForAgGrid:Ao,isEventSupported:Ob,getCtrlForEventTarget:Hp,isElementInEventPath:Bp,createEventPath:Lx,getEventPath:Fx,addSafePassiveEventListener:Nx}),Al=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class be{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){this.destroyFunctions.forEach(e=>e()),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:be.EVENT_DESTROYED})}addEventListener(e,t){this.localEventService||(this.localEventService=new oo),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}dispatchEventAsync(e){window.setTimeout(()=>this.dispatchEvent(e),0)}dispatchEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedListener(e,t,n){if(this.destroyed)return;e instanceof HTMLElement?Nx(this.getFrameworkOverrides(),e,t,n):e.addEventListener(t,n);const s=()=>(e.removeEventListener(t,n),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null);return this.destroyFunctions.push(s),s}addManagedPropertyListener(e,t){if(this.destroyed)return;this.gridOptionsService.addEventListener(e,t);const n=()=>(this.gridOptionsService.removeEventListener(e,t),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==n),null);return this.destroyFunctions.push(n),n}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}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.getContext()).createBean(e,n)}destroyBean(e,t){return(t||this.getContext()).destroyBean(e)}destroyBeans(e,t){return e&&e.forEach(n=>this.destroyBean(n,t)),[]}}be.EVENT_DESTROYED="destroyed";Al([W("frameworkOverrides")],be.prototype,"frameworkOverrides",void 0);Al([W("context")],be.prototype,"context",void 0);Al([W("eventService")],be.prototype,"eventService",void 0);Al([W("gridOptionsService")],be.prototype,"gridOptionsService",void 0);Al([W("localeService")],be.prototype,"localeService",void 0);Al([W("environment")],be.prototype,"environment",void 0);Al([Hi],be.prototype,"destroy",null);var $g=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},N1=function(i,e){return function(t,n){e(t,n,i)}};let Oc=class extends be{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,t,n){const s=new f1,{existingCols:o,existingGroups:r,existingColKeys:a}=this.extractExistingTreeData(n);s.addExistingKeys(a);const l=this.recursivelyCreateColumns(e,0,t,o,s,r),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);const u=this.balanceColumnTree(l,0,c,s),d=(h,f)=>{h instanceof It&&h.setupExpandable(),h.setOriginalParent(f)};return this.columnUtils.depthFirstOriginalTreeSearch(null,u,d),{columnTree:u,treeDept:c}}extractExistingTreeData(e){const t=[],n=[],s=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,o=>{if(o instanceof It){const r=o;n.push(r)}else{const r=o;s.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:n,existingColKeys:s}}createForAutoGroups(e,t){return e.map(n=>this.createAutoGroupTreeItem(t,n))}createAutoGroupTreeItem(e,t){const n=this.findDepth(e);let s=t;for(let o=n-1;o>=0;o--){const r=new It(null,`FAKE_PATH_${t.getId()}}_${o}`,!0,o);this.createBean(r),r.setChildren([s]),s.setOriginalParent(r),s=r}return s}findDepth(e){let t=0,n=e;for(;n&&n[0]&&n[0]instanceof It;)t++,n=n[0].getChildren();return t}balanceColumnTree(e,t,n,s){const o=[];for(let r=0;r<e.length;r++){const a=e[r];if(a instanceof It){const l=a,c=this.balanceColumnTree(l.getChildren(),t+1,n,s);l.setChildren(c),o.push(l)}else{let l,c;for(let u=n-1;u>=t;u--){const d=s.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new It(h,d,!0,t);this.createBean(f),c&&c.setChildren([f]),c=f,l||(l=c)}if(l&&c)if(o.push(l),e.some(d=>d instanceof It)){c.setChildren([a]);continue}else{c.setChildren(e);break}o.push(a)}}return o}findMaxDept(e,t){let n=t;for(let s=0;s<e.length;s++){const o=e[s];if(o instanceof It){const r=o,a=this.findMaxDept(r.getChildren(),t+1);n<a&&(n=a)}}return n}recursivelyCreateColumns(e,t,n,s,o,r){return(e||[]).map(a=>this.isColumnGroup(a)?this.createColumnGroup(n,a,t,s,o,r):this.createColumn(n,a,s,o))}createColumnGroup(e,t,n,s,o,r){const a=this.createMergedColGroupDef(t),l=o.getUniqueKey(a.groupId||null,null),c=new It(a,l,!1,n);this.createBean(c);const u=this.findExistingGroup(t,r);u&&tn(r,u),u&&u.isExpanded()&&c.setExpanded(!0);const d=this.recursivelyCreateColumns(a.children,n+1,e,s,o,r);return c.setChildren(d),c}createMergedColGroupDef(e){const t={};return Object.assign(t,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(t,e),t}createColumn(e,t,n,s){let o=this.findExistingColumn(t,n);if(n&&o&&tn(n,o),o){const r=this.mergeColDefs(t,o.getColId());o.setColDef(r,t),this.applyColumnState(o,r)}else{const r=s.getUniqueKey(t.colId,t.field),a=this.mergeColDefs(t,r);o=new qe(a,t,r,e),this.context.createBean(o)}return this.dataTypeService.addColumnListeners(o),o}applyColumnState(e,t){const n=Cs(t.flex);if(n!==void 0&&e.setFlex(n),e.getFlex()<=0){const a=Cs(t.width);if(a!=null)e.setActualWidth(a);else{const l=e.getActualWidth();e.setActualWidth(l)}}t.sort!==void 0&&(t.sort=="asc"||t.sort=="desc"?e.setSort(t.sort):e.setSort(void 0));const o=Cs(t.sortIndex);o!==void 0&&e.setSortIndex(o);const r=Eo(t.hide);r!==void 0&&e.setVisible(!r),t.pinned!==void 0&&e.setPinned(t.pinned)}findExistingColumn(e,t){return(t||[]).find(n=>{const s=n.getUserProvidedColDef();if(!s)return!1;const o=e.colId!=null,r=e.field!=null;return o?n.getId()===e.colId:r?s.field===e.field:s===e})}findExistingGroup(e,t){return t.find(n=>n.getColGroupDef()&&e.groupId!=null?n.getId()===e.groupId:!1)}mergeColDefs(e,t){const n={},s=this.gridOptionsService.get("defaultColDef");Qn(n,s,!1,!0);const o=this.dataTypeService.updateColDefAndGetColumnType(n,e,t);o&&this.assignColumnTypes(o,n),Qn(n,e,!1,!0);const r=this.gridOptionsService.get("autoGroupColumnDef"),a=this.gridOptionsService.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&a&&Qn(n,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(n),n}assignColumnTypes(e,t){if(!e.length)return;const n=Object.assign({},T1),s=this.gridOptionsService.get("columnTypes")||{};Qt(s,(o,r)=>{o in n?console.warn(`AG Grid: the column type '${o}' is a default column type and cannot be overridden.`):n[o]=r}),e.forEach(o=>{const r=n[o.trim()];r?Qn(t,r,!1,!0):console.warn("AG Grid: colDef.type '"+o+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};$g([W("columnUtils")],Oc.prototype,"columnUtils",void 0);$g([W("dataTypeService")],Oc.prototype,"dataTypeService",void 0);$g([N1(0,bn("loggerFactory"))],Oc.prototype,"setBeans",null);Oc=$g([Be("columnFactory")],Oc);var k1=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Bt{constructor(e,t,n,s){this.displayedChildren=[],this.localEventService=new oo,this.groupId=t,this.partId=n,this.providedColumnGroup=e,this.pinned=s}static createUniqueId(e,t){return e+"_"+t}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return Bt.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{e instanceof Bt&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsService.is("enableRtl")){const t=Ot(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=e,this.left!==e&&(this.left=e,this.localEventService.dispatchEvent(this.createAgEvent(Bt.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(e){return{type:e}}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(e){let t=!1;return this.children.forEach(n=>{e===n&&(t=!0),n instanceof Bt&&n.isChildInThisGroupDeepSearch(e)&&(t=!0)}),t}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()||0}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{t instanceof qe?e.push(t):t instanceof Bt&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{t instanceof qe?e.push(t):t instanceof Bt&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.providedColumnGroup.isExpandable():!1)){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(Bt.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(n=>{if(n instanceof Bt&&(!n.displayedChildren||!n.displayedChildren.length))return;switch(n.getColumnGroupShow()){case"open":e.providedColumnGroup.isExpanded()&&this.displayedChildren.push(n);break;case"closed":e.providedColumnGroup.isExpanded()||this.displayedChildren.push(n);break;default:this.displayedChildren.push(n);break}}),this.localEventService.dispatchEvent(this.createAgEvent(Bt.EVENT_DISPLAYED_CHILDREN_CHANGED))}}Bt.EVENT_LEFT_CHANGED="leftChanged";Bt.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged";k1([W("gridOptionsService")],Bt.prototype,"gridOptionsService",void 0);class N{}N.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged";N.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded";N.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged";N.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged";N.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll";N.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged";N.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged";N.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged";N.EVENT_COLUMN_MOVED="columnMoved";N.EVENT_COLUMN_VISIBLE="columnVisible";N.EVENT_COLUMN_PINNED="columnPinned";N.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened";N.EVENT_COLUMN_RESIZED="columnResized";N.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged";N.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged";N.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed";N.EVENT_ROW_GROUP_OPENED="rowGroupOpened";N.EVENT_ROW_DATA_CHANGED="rowDataChanged";N.EVENT_ROW_DATA_UPDATED="rowDataUpdated";N.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged";N.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged";N.EVENT_CHART_CREATED="chartCreated";N.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged";N.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged";N.EVENT_CHART_DESTROYED="chartDestroyed";N.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged";N.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged";N.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart";N.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd";N.EVENT_MODEL_UPDATED="modelUpdated";N.EVENT_CUT_START="cutStart";N.EVENT_CUT_END="cutEnd";N.EVENT_PASTE_START="pasteStart";N.EVENT_PASTE_END="pasteEnd";N.EVENT_FILL_START="fillStart";N.EVENT_FILL_END="fillEnd";N.EVENT_RANGE_DELETE_START="rangeDeleteStart";N.EVENT_RANGE_DELETE_END="rangeDeleteEnd";N.EVENT_UNDO_STARTED="undoStarted";N.EVENT_UNDO_ENDED="undoEnded";N.EVENT_REDO_STARTED="redoStarted";N.EVENT_REDO_ENDED="redoEnded";N.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart";N.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd";N.EVENT_CELL_CLICKED="cellClicked";N.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked";N.EVENT_CELL_MOUSE_DOWN="cellMouseDown";N.EVENT_CELL_CONTEXT_MENU="cellContextMenu";N.EVENT_CELL_VALUE_CHANGED="cellValueChanged";N.EVENT_CELL_EDIT_REQUEST="cellEditRequest";N.EVENT_ROW_VALUE_CHANGED="rowValueChanged";N.EVENT_CELL_FOCUSED="cellFocused";N.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared";N.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused";N.EVENT_ROW_SELECTED="rowSelected";N.EVENT_SELECTION_CHANGED="selectionChanged";N.EVENT_CELL_KEY_DOWN="cellKeyDown";N.EVENT_CELL_MOUSE_OVER="cellMouseOver";N.EVENT_CELL_MOUSE_OUT="cellMouseOut";N.EVENT_FILTER_CHANGED="filterChanged";N.EVENT_FILTER_MODIFIED="filterModified";N.EVENT_FILTER_OPENED="filterOpened";N.EVENT_SORT_CHANGED="sortChanged";N.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved";N.EVENT_ROW_CLICKED="rowClicked";N.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked";N.EVENT_GRID_READY="gridReady";N.EVENT_GRID_SIZE_CHANGED="gridSizeChanged";N.EVENT_VIEWPORT_CHANGED="viewportChanged";N.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged";N.EVENT_FIRST_DATA_RENDERED="firstDataRendered";N.EVENT_DRAG_STARTED="dragStarted";N.EVENT_DRAG_STOPPED="dragStopped";N.EVENT_CHECKBOX_CHANGED="checkboxChanged";N.EVENT_ROW_EDITING_STARTED="rowEditingStarted";N.EVENT_ROW_EDITING_STOPPED="rowEditingStopped";N.EVENT_CELL_EDITING_STARTED="cellEditingStarted";N.EVENT_CELL_EDITING_STOPPED="cellEditingStopped";N.EVENT_BODY_SCROLL="bodyScroll";N.EVENT_BODY_SCROLL_END="bodyScrollEnd";N.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged";N.EVENT_PAGINATION_CHANGED="paginationChanged";N.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged";N.EVENT_STORE_REFRESHED="storeRefreshed";N.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged";N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged";N.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged";N.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged";N.EVENT_FLASH_CELLS="flashCells";N.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged";N.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged";N.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged";N.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged";N.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged";N.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged";N.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged";N.EVENT_ROW_DRAG_ENTER="rowDragEnter";N.EVENT_ROW_DRAG_MOVE="rowDragMove";N.EVENT_ROW_DRAG_LEAVE="rowDragLeave";N.EVENT_ROW_DRAG_END="rowDragEnd";N.EVENT_GRID_STYLES_CHANGED="gridStylesChanged";N.EVENT_POPUP_TO_FRONT="popupToFront";N.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest";N.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest";N.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest";N.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest";N.EVENT_KEYBOARD_FOCUS="keyboardFocus";N.EVENT_MOUSE_FOCUS="mouseFocus";N.EVENT_STORE_UPDATED="storeUpdated";N.EVENT_FILTER_DESTROYED="filterDestroyed";N.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted";class kx{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}}var Pb=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const Pc="ag-Grid-AutoColumn";let kd=class extends be{createAutoGroupColumns(e,t){const n=[],s=this.gridOptionsService.isTreeData();let o=this.gridOptionsService.isGroupMultiAutoColumn();return s&&o&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((r,a)=>{n.push(this.createOneAutoGroupColumn(e,r,a))}):n.push(this.createOneAutoGroupColumn(e)),n}createOneAutoGroupColumn(e,t,n){let s=this.generateDefaultColDef(t),o;t?o=`${Pc}-${t.getId()}`:o=Pc;const r=this.gridOptionsService.get("autoGroupColumnDef");Qn(s,r),s=this.columnFactory.mergeColDefs(s,o),s.colId=o,this.gridOptionsService.isTreeData()||$e(s.field)&&$e(s.valueGetter)&&$e(s.filterValueGetter)&&s.filter!=="agGroupColumnFilter"&&(s.filter=!1),n&&n>0&&(s.headerCheckboxSelection=!1);const a=e.find(u=>u.getId()==o),l=this.gridOptionsService.isColumnsSortingCoupledToGroup();if(a)return l&&(s.sort=void 0,s.sortIndex=void 0),a.setColDef(s,null),this.columnFactory.applyColumnState(a,s),a;l&&(s.sort||s.initialSort||"sortIndex"in s)&&!s.field&&(s.sort=null,s.sortIndex=null,s.initialSort=null);const c=new qe(s,null,o,!0);return this.context.createBean(c),c}generateDefaultColDef(e){const t=this.gridOptionsService.get("autoGroupColumnDef"),s={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(s.cellRenderer="agGroupCellRenderer"),e){const r=e.getColDef();Object.assign(s,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&Object.assign(s,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),s.showRowGroup=e.getColId()}else s.showRowGroup=!0;return s}};Pb([W("columnModel")],kd.prototype,"columnModel",void 0);Pb([W("columnFactory")],kd.prototype,"columnFactory",void 0);kd=Pb([Be("autoGroupColService")],kd);const V1=/[&<>"']/g,G1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function H1(i){const e=String.fromCharCode;function t(d){const h=[];if(!d)return[];const f=d.length;let g=0,p,v;for(;g<f;)p=d.charCodeAt(g++),p>=55296&&p<=56319&&g<f?(v=d.charCodeAt(g++),(v&64512)==56320?h.push(((p&1023)<<10)+(v&1023)+65536):(h.push(p),g--)):h.push(p);return h}function n(d){if(d>=55296&&d<=57343)throw Error("Lone surrogate U+"+d.toString(16).toUpperCase()+" is not a scalar value")}function s(d,h){return e(d>>h&63|128)}function o(d){if(d>=0&&d<=31&&d!==10)return`_x${d.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(d&4294967168))return e(d);let h="";return d&4294965248?d&4294901760?d&4292870144||(h=e(d>>18&7|240),h+=s(d,12),h+=s(d,6)):(n(d),h=e(d>>12&15|224),h+=s(d,6)):h=e(d>>6&31|192),h+=e(d&63|128),h}const r=t(i),a=r.length;let l=-1,c,u="";for(;++l<a;)c=r[l],u+=o(c);return u}function Vx(i){return i[0].toUpperCase()+i.substr(1).toLowerCase()}function Mo(i,e){if(i==null)return null;const t=i.toString().toString();return e?t:t.replace(V1,n=>G1[n])}function Gx(i){if(!i||i==null)return null;const e=/([a-z])([A-Z])/g,t=/([A-Z]+)([A-Z])([a-z])/g;return i.replace(e,"$1 $2").replace(t,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}function Hx(i){return i.replace(/[A-Z]/g,e=>`-${e.toLocaleLowerCase()}`)}var B1=Object.freeze({__proto__:null,utf8_encode:H1,capitalise:Vx,escapeString:Mo,camelCaseToHumanText:Gx,camelCaseToHyphenated:Hx});function sr(i){const e=new Map;return i.forEach(t=>e.set(t[0],t[1])),e}function W1(i,e){const t=new Map;return i.forEach(n=>t.set(e(n),n)),t}function U1(i){const e=[];return i.forEach((t,n)=>e.push(n)),e}var j1=Object.freeze({__proto__:null,convertToMap:sr,mapById:W1,keys:U1});class Wp{}Wp.ColDefPropertyMap={headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0};Wp.ALL_PROPERTIES=Object.keys(Wp.ColDefPropertyMap);class $t{}$t.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","serverSideStoreType","groupDisplayType","treeDataDisplayType","colResizeDefault"];$t.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions"];$t.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass"];$t.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","tabIndex"];$t.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHorizontalScroll","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSelectsChildren","groupIncludeFooter","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilteringAlwaysResets","serverSideFilterAllLevels","serverSideSortingAlwaysResets","serverSideSortAllLevels","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","suppressReactUi","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","suppressCutToClipboard"];$t.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processSecondaryColDef","processSecondaryColGroupDef","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer"];$t.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideStoreParams","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","groupAggFiltering"];$t.FUNCTION_PROPERTIES=[...$t.FUNCTIONAL_PROPERTIES,...$t.CALLBACK_PROPERTIES];$t.ALL_PROPERTIES=[...$t.ARRAY_PROPERTIES,...$t.OBJECT_PROPERTIES,...$t.STRING_PROPERTIES,...$t.NUMBER_PROPERTIES,...$t.FUNCTION_PROPERTIES,...$t.BOOLEAN_PROPERTIES];class dt{static getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)}static getCoercionLookup(){let e={};return[...dt.ARRAY_PROPERTIES,...dt.OBJECT_PROPERTIES,...dt.STRING_PROPERTIES,...dt.FUNCTION_PROPERTIES,...dt.EVENT_CALLBACKS].forEach(t=>e[t]="none"),dt.BOOLEAN_PROPERTIES.forEach(t=>e[t]="boolean"),dt.NUMBER_PROPERTIES.forEach(t=>e[t]="number"),e}static getValue(e,t){const n=dt.coercionLookup[e];if(n){let s=t;switch(n){case"number":{s=dt.toNumber(t);break}case"boolean":{s=dt.toBoolean(t);break}case"none":{e==="groupAggFiltering"&&typeof t!="function"&&(s=dt.toBoolean(t));break}}return s}}static getGridOptionKeys(e,t){return Object.keys(t?dt.coercionLookup:e)}static copyAttributesToGridOptions(e,t,n=!1){typeof e!="object"&&(e={});const s=e;return dt.getGridOptionKeys(t,n).forEach(r=>{const a=t[r];if(typeof a<"u"){const l=dt.getValue(r,a);l!==void 0&&(s[r]=l)}}),e}static processOnChange(e,t){if(!e||Object.keys(e).length===0)return;const n=Object.assign({},e);n.columnTypes&&(t.setColumnTypes(n.columnTypes.currentValue,"gridOptionsChanged"),delete n.columnTypes),n.autoGroupColumnDef&&(t.setAutoGroupColumnDef(n.autoGroupColumnDef.currentValue,"gridOptionsChanged"),delete n.autoGroupColumnDef),n.defaultColDef&&(t.setDefaultColDef(n.defaultColDef.currentValue,"gridOptionsChanged"),delete n.defaultColDef),n.columnDefs&&(t.setColumnDefs(n.columnDefs.currentValue,"gridOptionsChanged"),delete n.columnDefs),Object.keys(n).forEach(o=>{const r=o,a=dt.getValue(r,n[r].currentValue);t.__setProperty(r,a)});const s={type:N.EVENT_COMPONENT_STATE_CHANGED};Qt(e,(o,r)=>{s[o]=r}),t.dispatchEvent(s)}static toBoolean(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}static toNumber(e){if(typeof e=="number")return e;if(typeof e=="string")return Number(e)}}dt.EVENTS=sl(N);dt.EXCLUDED_INTERNAL_EVENTS=[N.EVENT_SCROLLBAR_WIDTH_CHANGED,N.EVENT_CHECKBOX_CHANGED,N.EVENT_HEIGHT_SCALE_CHANGED,N.EVENT_BODY_HEIGHT_CHANGED,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,N.EVENT_SCROLL_VISIBILITY_CHANGED,N.EVENT_COLUMN_HOVER_CHANGED,N.EVENT_FLASH_CELLS,N.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,N.EVENT_DISPLAYED_ROWS_CHANGED,N.EVENT_LEFT_PINNED_WIDTH_CHANGED,N.EVENT_RIGHT_PINNED_WIDTH_CHANGED,N.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,N.EVENT_POPUP_TO_FRONT,N.EVENT_KEYBOARD_FOCUS,N.EVENT_MOUSE_FOCUS,N.EVENT_STORE_UPDATED,N.EVENT_COLUMN_PANEL_ITEM_DRAG_START,N.EVENT_COLUMN_PANEL_ITEM_DRAG_END,N.EVENT_FILL_START,N.EVENT_FILL_END,N.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,N.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,N.EVENT_FULL_WIDTH_ROW_FOCUSED,N.EVENT_HEADER_HEIGHT_CHANGED,N.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,N.EVENT_CELL_FOCUS_CLEARED,N.EVENT_GRID_STYLES_CHANGED,N.EVENT_FILTER_DESTROYED,N.EVENT_ROW_DATA_UPDATE_STARTED];dt.PUBLIC_EVENTS=dt.EVENTS.filter(i=>!Ss(dt.EXCLUDED_INTERNAL_EVENTS,i));dt.EVENT_CALLBACKS=dt.EVENTS.map(i=>dt.getCallbackForEvent(i));dt.STRING_PROPERTIES=$t.STRING_PROPERTIES;dt.OBJECT_PROPERTIES=$t.OBJECT_PROPERTIES;dt.ARRAY_PROPERTIES=$t.ARRAY_PROPERTIES;dt.NUMBER_PROPERTIES=$t.NUMBER_PROPERTIES;dt.BOOLEAN_PROPERTIES=$t.BOOLEAN_PROPERTIES;dt.FUNCTION_PROPERTIES=$t.FUNCTION_PROPERTIES;dt.ALL_PROPERTIES=$t.ALL_PROPERTIES;dt.ALL_PROPERTIES_SET=new Set($t.ALL_PROPERTIES);dt.coercionLookup=dt.getCoercionLookup();function Bx(i,e,t){const n={},s=i.filter(o=>!e.some(r=>r===o));return s.length>0&&s.forEach(o=>n[o]=Ib(o,t)),n}function Ib(i,e,t,n){let s=e.map(o=>({value:o,relevance:$1(i.toLowerCase(),o.toLocaleLowerCase())}));if(s.sort((o,r)=>r.relevance-o.relevance),t&&(s=s.filter(o=>o.relevance!==0)),n&&n>0){const r=s[0].relevance*n;s=s.filter(a=>r-a.relevance<0)}return s.map(o=>o.value)}function $1(i,e){const t=i.replace(/\s/g,""),n=e.replace(/\s/g,"");let s=0,o=-1;for(let r=0;r<t.length;r++){const a=n.indexOf(t[r],o+1);a!==-1&&(o=a,s+=100-o*100/1e4*100)}return s}var z1=Object.freeze({__proto__:null,fuzzyCheckStrings:Bx,fuzzySuggestions:Ib}),zg=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};function vs(i,e,t,n){const s=t?`Please use '${t}' instead. `:"";yt(()=>console.warn(`AG Grid: since v${i}, '${e}' is deprecated. ${s}${n??""}`),`Deprecated_${e}`)}const n_=["__ob__","__v_skip","__metadata__"];let Ic=class{constructor(){this.deprecatedProperties={rememberGroupStateWhenNewData:{version:"24",message:"Now that transaction updates are possible and they keep group state, this feature is no longer needed."},serverSideFilteringAlwaysResets:{version:"28.0",newProp:"serverSideOnlyRefreshFilteredGroups",copyToNewProp:!0},serverSideSortingAlwaysResets:{version:"28.0",newProp:"serverSideSortAllLevels",copyToNewProp:!0},suppressReactUi:{version:"28",message:"The legacy React rendering engine is deprecated and will be removed in the next major version of the grid."},processSecondaryColDef:{version:"28",newProp:"processPivotResultColDef",copyToNewProp:!0},processSecondaryColGroupDef:{version:"28",newProp:"processPivotResultColGroupDef",copyToNewProp:!0},getServerSideStoreParams:{version:"28",newProp:"getServerSideGroupLevelParams",copyToNewProp:!0},serverSideInfiniteScroll:{version:"29",message:"Infinite Scrolling is now the default behaviour. This can be suppressed with `suppressServerSideInfiniteScroll`."},enableChartToolPanelsButton:{version:"29",message:"The Chart Tool Panels button is now enabled by default. To hide the Chart Tool Panels button and display the hamburger button instead, set suppressChartToolPanelsButton=true."},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",newProp:"enterNavigatesVertically",copyToNewProp:!0},enterMovesDownAfterEdit:{version:"30",newProp:"enterNavigatesVerticallyAfterEdit",copyToNewProp:!0}}}pickOneWarning(e,t){console.warn(`AG Grid: ${e} and ${t} do not work with each other, you need to pick one.`)}init(){if(this.checkForDeprecated(),this.checkForViolations(),this.gridOptions.suppressPropertyNamesCheck!==!0&&(this.checkGridOptionsProperties(),this.checkColumnDefProperties()),this.checkColumnDefViolations(),this.gridOptionsService.is("groupSelectsChildren")&&this.gridOptionsService.is("suppressParentsInRowNodes")&&console.warn("AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work"),this.gridOptionsService.is("groupSelectsChildren")&&this.gridOptionsService.get("rowSelection")!=="multiple"&&console.warn("AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense"),this.gridOptionsService.is("groupRemoveSingleChildren")&&this.gridOptionsService.is("groupHideOpenParents")&&this.pickOneWarning("groupRemoveSingleChildren","groupHideOpenParents"),this.gridOptionsService.isRowModelType("serverSide")){const t=(n,s)=>`AG Grid: '${n}' is not supported on the Server-Side Row Model.`+(s?` Please use ${s} instead.`:"");this.gridOptionsService.exists("groupDefaultExpanded")&&console.warn(t("groupDefaultExpanded","isServerSideGroupOpenByDefault callback")),this.gridOptionsService.exists("groupIncludeFooter")&&this.gridOptionsService.is("suppressServerSideInfiniteScroll")&&console.warn(t("groupIncludeFooter")),this.gridOptionsService.exists("groupIncludeTotalFooter")&&console.warn(t("groupIncludeTotalFooter"))}this.gridOptionsService.is("enableRangeSelection")?Pe.__assertRegistered(We.RangeSelectionModule,"enableRangeSelection",this.gridOptionsService.getGridId()):(this.gridOptionsService.is("enableRangeHandle")||this.gridOptionsService.is("enableFillHandle"))&&console.warn("AG Grid: 'enableRangeHandle' or 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true");const e=(t,n)=>this.gridOptionsService.exists(t)&&Pe.__assertRegistered(n,t,this.gridOptionsService.getGridId());e("sideBar",We.SideBarModule),e("statusBar",We.StatusBarModule),e("enableCharts",We.GridChartsModule),e("getMainMenuItems",We.MenuModule),e("getContextMenuItems",We.MenuModule),e("allowContextMenuWithControlKey",We.MenuModule)}checkColumnDefProperties(){if(this.gridOptions.columnDefs==null)return;const e=Wp.ALL_PROPERTIES,t=(n,s)=>{const o=Object.getOwnPropertyNames(n);this.checkProperties(o,[...e,...n_],e,s,"https://www.ag-grid.com/javascript-data-grid/column-properties/"),n.children&&n.children.forEach(r=>t(r,"columnDefs.children"))};this.gridOptions.columnDefs.forEach(n=>t(n,"columnDefs")),this.gridOptions.defaultColDef&&t(this.gridOptions.defaultColDef,"defaultColDef")}checkColumnDefViolations(){var e;const t=(e=this.gridOptionsService.get("rowModelType"))!==null&&e!==void 0?e:"clientSide",s={infinite:["headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],viewport:["headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],serverSide:["headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],clientSide:[]}[t];if(!(s!=null&&s.length))return;const o=r=>{s.forEach(a=>{a in r&&r[a]&&console.warn(`AG Grid: Column property ${a} is not supported with the row model type ${t}.`)})};this.gridOptions.columnDefs!=null&&this.gridOptions.columnDefs.forEach(r=>o(r)),this.gridOptions.autoGroupColumnDef!=null&&o(this.gridOptions.autoGroupColumnDef),this.gridOptions.defaultColDef!=null&&o(this.gridOptions.defaultColDef)}checkGridOptionsProperties(){const e=Object.getOwnPropertyNames(this.gridOptions),t=[...$t.ALL_PROPERTIES,...dt.EVENT_CALLBACKS],n=[...t,"api","columnApi",...n_,...Object.keys(this.deprecatedProperties)];this.checkProperties(e,n,t,"gridOptions","https://www.ag-grid.com/javascript-data-grid/grid-options/")}checkProperties(e,t,n,s,o){const r=Bx(e,t,n);Qt(r,(a,l)=>{yt(()=>console.warn(`AG Grid: invalid ${s} property '${a}' did you mean any of these: ${l.slice(0,8).join(", ")}`),"invalidProperty"+s+a)}),Object.keys(r).length>0&&yt(()=>console.warn(`AG Grid: to see all the valid ${s} properties please check: ${o}`),"invalidProperties"+s+o)}checkForDeprecated(){const e=this.gridOptions;Object.entries(this.deprecatedProperties).forEach(([t,n])=>{var s;const o=e[t];o&&(vs(n.version,t,n.newProp,n.message),n.copyToNewProp&&n.newProp&&e[n.newProp]==null&&(e[n.newProp]=(s=n.newPropValue)!==null&&s!==void 0?s:o))}),e.serverSideStoreType&&(console.warn("AG Grid: since v29.0, `serverSideStoreType` has been replaced by `suppressServerSideInfiniteScroll`. Set to false to use Partial Store, and true to use Full Store."),e.suppressServerSideInfiniteScroll=e.serverSideStoreType!=="partial")}checkForViolations(){this.gridOptionsService.is("treeData")&&this.treeDataViolations()}treeDataViolations(){this.gridOptionsService.isRowModelType("clientSide")&&(this.gridOptionsService.exists("getDataPath")||console.warn("AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data.")),this.gridOptionsService.isRowModelType("serverSide")&&(this.gridOptionsService.exists("isServerSideGroup")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),this.gridOptionsService.exists("getServerSideGroupKey")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))}};zg([W("gridOptions")],Ic.prototype,"gridOptions",void 0);zg([W("gridOptionsService")],Ic.prototype,"gridOptionsService",void 0);zg([Re],Ic.prototype,"init",null);Ic=zg([Be("gridOptionsValidator")],Ic);function VC(i,e){const t=["groupRows","multipleColumns","custom","singleColumn"];return t.indexOf(e)<0?(console.warn(`AG Grid: '${e}' is not a valid groupDisplayType value - possible values are: '${t.join("', '")}'`),!1):e===i}function K1(i,e){const t=["auto","custom"];return t.indexOf(e)<0?(console.warn(`AG Grid: '${e}' is not a valid treeDataDisplayType value - possible values are: '${t.join("', '")}'`),!1):e===i}var zi=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Y1=function(i,e){return function(t,n){e(t,n,i)}},q1=function(i,e){var t={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(i);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(i,n[s])&&(t[n[s]]=i[n[s]]);return t};let Oi=class extends be{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gridOptionsService.is("suppressColumnVirtualisation");const e=this.gridOptionsService.is("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.usingTreeData=this.gridOptionsService.isTreeData(),this.addManagedPropertyListener("groupDisplayType",()=>this.onAutoGroupColumnDefChanged()),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.onAutoGroupColumnDefChanged()),this.addManagedPropertyListener("defaultColDef",t=>this.onSharedColDefChanged(t.source)),this.addManagedPropertyListener("columnTypes",t=>this.onSharedColDefChanged(t.source))}onAutoGroupColumnDefChanged(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))}onSharedColDefChanged(e="api"){this.forceRecreateAutoGroups=!0,this.createColumnsFromColumnDefs(!0,e)}setColumnDefs(e,t="api"){const n=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(n,t)}recreateColumnDefs(e="api"){this.onSharedColDefChanged(e)}destroyOldColumns(e,t){const n={};if(!e)return;this.columnUtils.depthFirstOriginalTreeSearch(null,e,o=>{n[o.getInstanceId()]=o}),t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,o=>{n[o.getInstanceId()]=null});const s=Object.values(n).filter(o=>o!=null);this.destroyBeans(s)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,t="api"){const n=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const s=this.primaryColumns,o=this.primaryColumnTree,r=this.columnFactory.createColumnTree(this.columnDefs,!0,o);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(c=>this.primaryColumnsMap[c.getId()]=c),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0;const a=this.gridColsArePrimary===void 0;(this.gridColsArePrimary||a)&&(this.updateGridColumns(),e&&!this.gridOptionsService.is("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),n&&n(),this.dispatchNewColumnsLoaded()}dispatchNewColumnsLoaded(){const e={type:N.EVENT_NEW_COLUMNS_LOADED};this.eventService.dispatchEvent(e)}dispatchEverythingChanged(e="api"){const t={type:N.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)}orderGridColumnsLikePrimary(){const e=this.primaryColumns;e&&(this.gridColumns.sort((t,n)=>{const s=e.indexOf(t),o=e.indexOf(n),r=s>=0,a=o>=0;if(r&&a)return s-o;if(r)return 1;if(a)return-1;const l=this.gridColumns.indexOf(t),c=this.gridColumns.indexOf(n);return l-c}),this.gridColumns=this.placeLockedColumns(this.gridColumns))}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gridOptionsService.is("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}getDisplayedColumnsStartingAt(e){let t=e;const n=[];for(;t!=null;)n.push(t),t=this.getDisplayedColAfter(t);return n}checkViewportColumns(){if(this.displayedColumnsCenter==null||!this.extractViewport())return;const t={type:N.EVENT_VIRTUAL_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}setViewportPosition(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns())}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return e&&this.gridOptionsService.isTreeData()?(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1):!0}setPivotMode(e,t="api"){if(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))return;this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);const n={type:N.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(n)}getSecondaryPivotColumn(e,t){if($e(this.secondaryColumns))return null;const n=this.getPrimaryColumn(t);let s=null;return this.secondaryColumns.forEach(o=>{const r=o.getColDef().pivotKeys,a=o.getColDef().pivotValueColumn;Ur(r,e)&&a===n&&(s=o)}),s}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let t,n;this.gridOptionsService.is("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,n=this.displayedColumnsRight?Ot(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?Ot(this.displayedColumnsLeft):null,n=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===n,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));return}const{columns:t,skipHeader:n,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;this.animationFrameService.flushAllFrames();const a=[];let l=-1;const c=n??this.gridOptionsService.is("skipHeaderOnAutoSize"),u=s??c;for(;l!==0;)l=0,this.actionOnGridColumns(t,d=>{if(a.indexOf(d)>=0)return!1;const h=this.autoWidthCalculator.getPreferredWidthForColumn(d,c);if(h>0){const f=this.normaliseColumnWidth(d,h);d.setActualWidth(f,r),a.push(d),l++}return!0},r);u||this.autoSizeColumnGroupsByColumns(t,r,o),this.dispatchColumnResizedEvent(a,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,t,n,s=null){if(e&&e.length){const o={type:N.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:s,finished:t,source:n};this.eventService.dispatchEvent(o)}}dispatchColumnChangedEvent(e,t,n){const s={type:e,columns:t,column:t&&t.length==1?t[0]:null,source:n};this.eventService.dispatchEvent(s)}dispatchColumnMovedEvent(e){const{movedColumns:t,source:n,toIndex:s,finished:o}=e,r={type:N.EVENT_COLUMN_MOVED,columns:t,column:t&&t.length===1?t[0]:null,toIndex:s,finished:o,source:n};this.eventService.dispatchEvent(r)}dispatchColumnPinnedEvent(e,t){if(!e.length)return;const n=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.getPinned()),o={type:N.EVENT_COLUMN_PINNED,pinned:s??null,columns:e,column:n,source:t};this.eventService.dispatchEvent(o)}dispatchColumnVisibleEvent(e,t){if(!e.length)return;const n=e.length===1?e[0]:null,s=this.getCommonValue(e,r=>r.isVisible()),o={type:N.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:n,source:t};this.eventService.dispatchEvent(o)}autoSizeColumn(e,t,n="api"){e&&this.autoSizeColumns({columns:[e],skipHeader:t,skipHeaderGroups:!0,source:n})}autoSizeColumnGroupsByColumns(e,t,n){const s=new Set;this.getGridColumns(e).forEach(l=>{let c=l.getParent();for(;c&&c!=n;)c.isPadding()||s.add(c),c=c.getParent()});let r;const a=[];for(const l of s){for(const c of this.ctrlsService.getHeaderRowContainerCtrls())if(r=c.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(t)}return a}autoSizeAllColumns(e,t="api"){if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,t));return}const n=this.getAllDisplayedColumns();this.autoSizeColumns({columns:n,skipHeader:e,source:t})}getColumnsFromTree(e){const t=[],n=s=>{for(let o=0;o<s.length;o++){const r=s[o];r instanceof qe?t.push(r):r instanceof It&&n(r.getChildren())}};return n(e),t}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,t,n,s){const o=[];let r=null;for(let a=0;a<t.length;a++){const l=t[a],c=t.length-a,u=Math.min(l.getColSpan(e),c),d=[l];if(u>1){const f=u-1;for(let g=1;g<=f;g++)d.push(t[a+g]);a+=f}let h;n?(h=!1,d.forEach(f=>{n(f)&&(h=!0)})):h=!0,h&&(o.length===0&&r&&(s&&s(l))&&o.push(r),o.push(l)),r=l}return o}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=s=>{const o=s.getLeft();return ye(o)&&o>this.viewportLeft},n=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,n,t)}getAriaColumnIndex(e){return this.getAllGridColumns().indexOf(e)+1}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,n=t+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200,r=t<s&&n<s,a=t>o&&n>o;return!r&&!a}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,t,n,s,o,r="api"){if(!e||Kn(e))return;let a=!1;if(e.forEach(c=>{const u=this.getPrimaryColumn(c);if(u){if(n){if(t.indexOf(u)>=0)return;t.push(u)}else{if(t.indexOf(u)<0)return;tn(t,u)}s(u),a=!0}}),!a)return;this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r);const l={type:o,columns:t,column:t.length===1?t[0]:null,source:r};this.eventService.dispatchEvent(l)}setRowGroupColumns(e,t="api"){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,N.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),t)}setRowGroupActive(e,t,n){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,n),e&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")&&this.setColumnVisible(t,!1,n),!e&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnVisible(t,!0,n))}addRowGroupColumn(e,t="api"){e&&this.addRowGroupColumns([e],t)}addRowGroupColumns(e,t="api"){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),N.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumns(e,t="api"){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),N.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}removeRowGroupColumn(e,t="api"){e&&this.removeRowGroupColumns([e],t)}addPivotColumns(e,t="api"){this.updatePrimaryColumnList(e,this.pivotColumns,!0,n=>n.setPivotActive(!0,t),N.EVENT_COLUMN_PIVOT_CHANGED,t)}setPivotColumns(e,t="api"){this.setPrimaryColumnList(e,this.pivotColumns,N.EVENT_COLUMN_PIVOT_CHANGED,(n,s)=>{s.setPivotActive(n,t)},t)}addPivotColumn(e,t="api"){this.addPivotColumns([e],t)}removePivotColumns(e,t="api"){this.updatePrimaryColumnList(e,this.pivotColumns,!1,n=>n.setPivotActive(!1,t),N.EVENT_COLUMN_PIVOT_CHANGED,t)}removePivotColumn(e,t="api"){this.removePivotColumns([e],t)}setPrimaryColumnList(e,t,n,s,o){t.length=0,ye(e)&&e.forEach(r=>{const a=this.getPrimaryColumn(r);a&&t.push(a)}),(this.primaryColumns||[]).forEach(r=>{const a=t.indexOf(r)>=0;s(a,r)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o),this.dispatchColumnChangedEvent(n,t,o)}setValueColumns(e,t="api"){this.setPrimaryColumnList(e,this.valueColumns,N.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),t)}setValueActive(e,t,n){if(e!==t.isValueActive()&&(t.setValueActive(e,n),e&&!t.getAggFunc())){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t="api"){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),N.EVENT_COLUMN_VALUE_CHANGED,t)}addValueColumn(e,t="api"){e&&this.addValueColumns([e],t)}removeValueColumn(e,t="api"){this.removeValueColumns([e],t)}removeValueColumns(e,t="api"){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),N.EVENT_COLUMN_VALUE_CHANGED,t)}normaliseColumnWidth(e,t){const n=e.getMinWidth();ye(n)&&t<n&&(t=n);const s=e.getMaxWidth();return ye(s)&&e.isGreaterThanMax(t)&&(t=s),t}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,t,n,s="api"){const o=[];e.forEach(r=>{const a=this.getPrimaryOrGridColumn(r.key);if(!a)return;if(o.push({width:r.newWidth,ratios:[1],columns:[a]}),this.gridOptionsService.get("colResizeDefault")==="shift"&&(t=!t),t){const c=this.getDisplayedColAfter(a);if(!c)return;const u=a.getActualWidth()-r.newWidth,d=c.getActualWidth()+u;o.push({width:d,ratios:[1],columns:[c]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:n,source:s})}checkMinAndMaxWidthsForSet(e){const{columns:t,width:n}=e;let s=0,o=0,r=!0;t.forEach(c=>{const u=c.getMinWidth();s+=u||0;const d=c.getMaxWidth();ye(d)&&d>0?o+=d:r=!1});const a=n>=s,l=!r||n<=o;return a&&l}resizeColumnSets(e){const{resizeSets:t,finished:n,source:s}=e;if(!(!t||t.every(d=>this.checkMinAndMaxWidthsForSet(d)))){if(n){const d=t&&t.length>0?t[0].columns:null;this.dispatchColumnResizedEvent(d,n,s)}return}const r=[],a=[];t.forEach(d=>{const{width:h,columns:f,ratios:g}=d,p={},v={};f.forEach(m=>a.push(m));let y=!0,C=0;for(;y;){if(C++,C>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}y=!1;const m=[];let w=0,E=h;f.forEach((O,A)=>{if(v[O.getId()])E-=p[O.getId()];else{m.push(O);const L=g[A];w+=L}});const R=1/w;m.forEach((O,A)=>{const D=A===m.length-1;let L;D?L=E:(L=Math.round(g[A]*h*R),E-=L);const S=O.getMinWidth(),x=O.getMaxWidth();ye(S)&&L<S?(L=S,v[O.getId()]=!0,y=!0):ye(x)&&x>0&&L>x&&(L=x,v[O.getId()]=!0,y=!0),p[O.getId()]=L})}f.forEach(m=>{const w=p[m.getId()];m.getActualWidth()!==w&&(m.setActualWidth(w,s),r.push(m))})});const l=r.length>0;let c=[];l&&(c=this.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());const u=a.concat(c);(l||n)&&this.dispatchColumnResizedEvent(u,n,s,c)}setColumnAggFunc(e,t,n="api"){if(!e)return;const s=this.getPrimaryColumn(e);s&&(s.setAggFunc(t),this.dispatchColumnChangedEvent(N.EVENT_COLUMN_VALUE_CHANGED,[s],n))}moveRowGroupColumn(e,t,n="api"){const s=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,s);const o={type:N.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:this.rowGroupColumns.length===1?this.rowGroupColumns[0]:null,source:n};this.eventService.dispatchEvent(o)}moveColumns(e,t,n="api",s=!0){if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}const o=this.getGridColumns(e);this.doesMovePassRules(o,t)&&(NC(this.gridColumns,o,t),this.updateDisplayedColumns(n),this.dispatchColumnMovedEvent({movedColumns:o,source:n,toIndex:t,finished:s}),this.columnAnimationService.finish())}doesMovePassRules(e,t){const n=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(n)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const n=this.gridColumns.slice();return NC(n,e,t),n}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(n=>this.gridColumns.indexOf(n)<0).length>0||e.sort((n,s)=>{const o=this.gridColumns.indexOf(n),r=this.gridColumns.indexOf(s);return o-r})}doesMovePassLockedPositions(e){let t=0,n=!0;const s=o=>o?o===!0||o==="left"?0:2:1;return e.forEach(o=>{const r=s(o.getColDef().lockPosition);r<t&&(n=!1),t=r}),n}doesMovePassMarryChildren(e){let t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,n=>{if(!(n instanceof It))return;const s=n,o=s.getColGroupDef();if(!(o&&o.marryChildren))return;const a=[];s.getLeafColumns().forEach(h=>{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=s.getLeafColumns().length-1;u>d&&(t=!1)}),t}moveColumn(e,t,n="api"){this.moveColumns([e],t,n)}moveColumnByIndex(e,t,n="api"){const s=this.gridColumns[e];this.moveColumn(s,t,n)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((t,n)=>this.gridColumns.indexOf(t)-this.gridColumns.indexOf(n)):this.lastPrimaryOrder&&e.sort((t,n)=>this.lastPrimaryOrder.indexOf(t)-this.lastPrimaryOrder.indexOf(n)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),n=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n;const o={type:N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(o)}}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getDisplayedColumns(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns.slice():null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns.slice():null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){return this.gridColumns}isEmpty(){return Kn(this.gridColumns)}isRowGroupEmpty(){return Kn(this.rowGroupColumns)}setColumnVisible(e,t,n="api"){this.setColumnsVisible([e],t,n)}setColumnsVisible(e,t=!1,n="api"){this.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},n)}setColumnPinned(e,t,n="api"){e&&this.setColumnsPinned([e],t,n)}setColumnsPinned(e,t,n="api"){if(this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null,this.actionOnGridColumns(e,o=>o.getPinned()!==s?(o.setPinned(s),!0):!1,n,()=>({type:N.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:n})),this.columnAnimationService.finish()}actionOnGridColumns(e,t,n,s){if(Kn(e))return;const o=[];if(e.forEach(r=>{const a=this.getGridColumn(r);if(!a)return;t(a)!==!1&&o.push(a)}),!!o.length&&(this.updateDisplayedColumns(n),ye(s)&&s)){const r=s();r.columns=o,r.column=o.length===1?o[0]:null,this.eventService.dispatchEvent(r)}}getDisplayedColBefore(e){const t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n>0?t[n-1]:null}getDisplayedColAfter(e){const t=this.getAllDisplayedColumns(),n=t.indexOf(e);return n<t.length-1?t[n+1]:null}getDisplayedGroupAfter(e){return this.getDisplayedGroupAtDirection(e,"After")}getDisplayedGroupBefore(e){return this.getDisplayedGroupAtDirection(e,"Before")}getDisplayedGroupAtDirection(e,t){const n=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?Ot(s):s[0],r=`getDisplayedCol${t}`;for(;;){const a=this[r](o);if(!a)return null;const l=this.getColumnGroupAtLevel(a,n);if(l!==e)return l}}getColumnGroupAtLevel(e,t){let n=e.getParent(),s,o;for(;s=n.getProvidedColumnGroup().getLevel(),o=n.getPaddingLevel(),!(s+o<=t);)n=n.getParent();return n}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,n=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,o=e.getSort()!=null?e.getSort():null,r=e.getSortIndex()!=null?e.getSortIndex():null,a=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:r,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:n,flex:a}}getColumnState(){if($e(this.primaryColumns)||!this.isAlive())return[];const t=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(t),t}orderColumnStateList(e){const t=sr(this.gridColumns.map((n,s)=>[n.getColId(),s]));e.sort((n,s)=>{const o=t.has(n.colId)?t.get(n.colId):-1,r=t.has(s.colId)?t.get(s.colId):-1;return o-r})}resetColumnState(e="api"){const t=this.getColumnsFromTree(this.primaryColumnTree),n=[];let s=1e3,o=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),t&&(r=r.concat(t)),r.forEach(a=>{const l=this.getColumnStateFromColDef(a);$e(l.rowGroupIndex)&&l.rowGroup&&(l.rowGroupIndex=s++),$e(l.pivotIndex)&&l.pivot&&(l.pivotIndex=o++),n.push(l)}),this.applyColumnState({state:n,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(p,v)=>p??v??null,n=e.getColDef(),s=t(n.sort,n.initialSort),o=t(n.sortIndex,n.initialSortIndex),r=t(n.hide,n.initialHide),a=t(n.pinned,n.initialPinned),l=t(n.width,n.initialWidth),c=t(n.flex,n.initialFlex);let u=t(n.rowGroupIndex,n.initialRowGroupIndex),d=t(n.rowGroup,n.initialRowGroup);u==null&&(d==null||d==!1)&&(u=null,d=null);let h=t(n.pivotIndex,n.initialPivotIndex),f=t(n.pivot,n.initialPivot);h==null&&(f==null||f==!1)&&(h=null,f=null);const g=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:a,width:l,flex:c,rowGroup:d,rowGroupIndex:u,pivot:f,pivotIndex:h,aggFunc:g}}applyColumnState(e,t){if(Kn(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const n=(r,a,l)=>{const c=this.compareColumnStatesAndDispatchEvents(t);this.autoGroupsNeedBuilding=!0;const u=a.slice(),d={},h={},f=[],g=[];let p=0;const v=this.rowGroupColumns.slice(),y=this.pivotColumns.slice();r.forEach(E=>{const R=E.colId||"";if(R.startsWith(Pc)){f.push(E),g.push(E);return}const A=l(R);A?(this.syncColumnWithStateItem(A,E,e.defaultState,d,h,!1,t),tn(u,A)):(g.push(E),p+=1)});const C=E=>this.syncColumnWithStateItem(E,null,e.defaultState,d,h,!1,t);u.forEach(C);const m=(E,R,O,A)=>{const D=E[O.getId()],L=E[A.getId()],S=D!=null,x=L!=null;if(S&&x)return D-L;if(S)return-1;if(x)return 1;const T=R.indexOf(O),H=R.indexOf(A),Y=T>=0,Q=H>=0;return Y&&Q?T-H:Y?-1:1};this.rowGroupColumns.sort(m.bind(this,d,v)),this.pivotColumns.sort(m.bind(this,h,y)),this.updateGridColumns();const w=this.groupAutoColumns?this.groupAutoColumns.slice():[];return f.forEach(E=>{const R=this.getAutoColumn(E.colId);tn(w,R),this.syncColumnWithStateItem(R,E,e.defaultState,null,null,!0,t)}),w.forEach(C),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(t),this.dispatchEverythingChanged(t),c(),{unmatchedAndAutoStates:g,unmatchedCount:p}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:o}=n(e.state||[],this.primaryColumns||[],r=>this.getPrimaryColumn(r));return(s.length>0||ye(e.defaultState))&&(o=n(s,this.secondaryColumns||[],r=>this.getSecondaryColumn(r)).unmatchedCount),this.columnAnimationService.finish(),o===0}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let t=[];const n={};e.state.forEach(o=>{if(!o.colId||n[o.colId])return;const r=this.gridColumnsMap[o.colId];r&&(t.push(r),n[o.colId]=!0)});let s=0;if(this.gridColumns.forEach(o=>{const r=o.getColId();if(n[r]!=null)return;r.startsWith(Pc)?Nd(t,o,s++):t.push(o)}),t=this.placeLockedColumns(t),!this.doesMovePassMarryChildren(t)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=t}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},n=this.getColumnState(),s={};return n.forEach(o=>{s[o.colId]=o}),()=>{const o=this.getPrimaryAndSecondaryAndAutoColumns(),r=(p,v,y,C)=>{const m=v.map(C),w=y.map(C);if(Ur(m,w))return;const R={type:p,columns:y,column:y.length===1?y[0]:null,source:e};this.eventService.dispatchEvent(R)},a=p=>{const v=[];return o.forEach(y=>{const C=s[y.getColId()];C&&p(C,y)&&v.push(y)}),v},l=p=>p.getColId();r(N.EVENT_COLUMN_ROW_GROUP_CHANGED,t.rowGroupColumns,this.rowGroupColumns,l),r(N.EVENT_COLUMN_PIVOT_CHANGED,t.pivotColumns,this.pivotColumns,l),a((p,v)=>{const y=p.aggFunc!=null,C=y!=v.isValueActive(),m=y&&p.aggFunc!=v.getAggFunc();return C||m}).length>0&&this.dispatchColumnChangedEvent(N.EVENT_COLUMN_VALUE_CHANGED,this.valueColumns,e);const d=(p,v)=>p.width!=v.getActualWidth();this.dispatchColumnResizedEvent(a(d),!0,e);const h=(p,v)=>p.pinned!=v.getPinned();this.dispatchColumnPinnedEvent(a(h),e);const f=(p,v)=>p.hide==v.isVisible();this.dispatchColumnVisibleEvent(a(f),e),a((p,v)=>p.sort!=v.getSort()||p.sortIndex!=v.getSortIndex()).length>0&&this.sortController.dispatchSortChangedEvents(e),this.normaliseColumnMovedEventForColumnState(n,e)}}getCommonValue(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let s=1;s<e.length;s++)if(n!==t(e[s]))return;return n}normaliseColumnMovedEventForColumnState(e,t){const n=this.getColumnState(),s={};n.forEach(c=>s[c.colId]=c);const o={};e.forEach(c=>{s[c.colId]&&(o[c.colId]=!0)});const r=e.filter(c=>o[c.colId]),a=n.filter(c=>o[c.colId]),l=[];a.forEach((c,u)=>{const d=r&&r[u];if(d&&d.colId!==c.colId){const h=this.getGridColumn(d.colId);h&&l.push(h)}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:t,finished:!0})}syncColumnWithStateItem(e,t,n,s,o,r,a){if(!e)return;const l=(E,R)=>{const O={value1:void 0,value2:void 0};let A=!1;return t&&(t[E]!==void 0&&(O.value1=t[E],A=!0),ye(R)&&t[R]!==void 0&&(O.value2=t[R],A=!0)),!A&&n&&(n[E]!==void 0&&(O.value1=n[E]),ye(R)&&n[R]!==void 0&&(O.value2=n[R])),O},c=l("hide").value1;c!==void 0&&e.setVisible(!c,a);const u=l("pinned").value1;u!==void 0&&e.setPinned(u);const d=this.columnUtils.calculateColMinWidth(e.getColDef()),h=l("flex").value1;if(h!==void 0&&e.setFlex(h),e.getFlex()<=0){const E=l("width").value1;E!=null&&d!=null&&E>=d&&e.setActualWidth(E,a)}const g=l("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,a):e.setSort(void 0,a));const p=l("sortIndex").value1;if(p!==void 0&&e.setSortIndex(p),r||!e.isPrimary())return;const v=l("aggFunc").value1;v!==void 0&&(typeof v=="string"?(e.setAggFunc(v),e.isValueActive()||(e.setValueActive(!0,a),this.valueColumns.push(e))):(ye(v)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,a),tn(this.valueColumns,e))));const{value1:y,value2:C}=l("rowGroup","rowGroupIndex");(y!==void 0||C!==void 0)&&(typeof C=="number"||y?(e.isRowGroupActive()||(e.setRowGroupActive(!0,a),this.rowGroupColumns.push(e)),s&&typeof C=="number"&&(s[e.getId()]=C)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,a),tn(this.rowGroupColumns,e)));const{value1:m,value2:w}=l("pivot","pivotIndex");(m!==void 0||w!==void 0)&&(typeof w=="number"||m?(e.isPivotActive()||(e.setPivotActive(!0,a),this.pivotColumns.push(e)),o&&typeof w=="number"&&(o[e.getId()]=w)):e.isPivotActive()&&(e.setPivotActive(!1,a),tn(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,t){const n=[];return e&&e.forEach(s=>{const o=t(s);o&&n.push(o)}),n}getColumnWithValidation(e){if(e==null)return null;const t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,t,n){if(!e)return null;if(typeof e=="string"&&n[e])return n[e];for(let s=0;s<t.length;s++)if(this.columnsMatch(t[s],e))return t[s];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupColumns.slice(0);const n=this.getPrimaryColumn(t);return n?[n]:null}getAutoColumn(e){return!this.groupAutoColumns||!ye(this.groupAutoColumns)||$e(this.groupAutoColumns)?null:this.groupAutoColumns.find(t=>this.columnsMatch(t,e))||null}columnsMatch(e,t){const n=e===t,s=e.getColDef()===t,o=e.getColId()==t;return n||s||o}getDisplayNameForColumn(e,t,n=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return n?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,n){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,n):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,n,s,o){const r=e.headerValueGetter;if(r){const a={colDef:e,column:t,columnGroup:n,providedColumnGroup:s,location:o,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return typeof r=="function"?r(a):typeof r=="string"?this.expressionService.evaluate(r,a):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return Gx(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gridOptionsService.is("suppressAggFuncInHeader"))return t;const n=e.getColDef().pivotValueColumn,s=ye(n);let o=null,r;if(s){const a=this.gridOptionsService.is("removePivotHeaderRowWhenSingleValueColumn")&&this.valueColumns.length===1,l=e.getColDef().pivotTotalColumnIds!==void 0;if(a&&!l)return t;o=n?n.getAggFunc():null,r=!0}else{const a=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();a&&l?(o=e.getAggFunc(),r=!0):r=!1}if(r){const a=typeof o=="string"?o:"func";return`${this.localeService.getLocaleTextFunc()(a,a)}(${t})`}return t}getColumnGroup(e,t){if(!e)return null;if(e instanceof Bt)return e;const n=this.getAllDisplayedTrees(),s=typeof t=="number";let o=null;return this.columnUtils.depthFirstAllColumnTreeSearch(n,r=>{if(r instanceof Bt){const a=r;let l;s?l=e===a.getGroupId()&&t===a.getPartId():l=e===a.getGroupId(),l&&(o=a)}}),o}isReady(){return this.ready}extractValueColumns(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(n,s)=>n.setValueActive(s,e),()=>{},()=>{},n=>{const s=n.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},n=>n.initialAggFunc!=null&&n.initialAggFunc!=""),this.valueColumns.forEach(n=>{const s=n.getColDef();s.aggFunc!=null&&s.aggFunc!=""?n.setAggFunc(s.aggFunc):n.getAggFunc()||n.setAggFunc(s.initialAggFunc)})}extractRowGroupColumns(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(n,s)=>n.setRowGroupActive(s,e),n=>n.rowGroupIndex,n=>n.initialRowGroupIndex,n=>n.rowGroup,n=>n.initialRowGroup)}extractColumns(e=[],t=[],n,s,o,r,a){const l=[],c=[];(this.primaryColumns||[]).forEach(h=>{const f=e.indexOf(h)<0,g=h.getColDef(),p=Eo(r(g)),v=Eo(a(g)),y=Cs(s(g)),C=Cs(o(g));let m;p!==void 0?m=p:y!==void 0?y===null?m=!1:m=y>=0:f?v!==void 0?m=v:C!==void 0?m=C!=null&&C>=0:m=!1:m=t.indexOf(h)>=0,m&&((f?y!=null||C!=null:y!=null)?l.push(h):c.push(h))});const u=h=>{const f=s(h.getColDef()),g=o(h.getColDef());return f??g};l.sort((h,f)=>{const g=u(h),p=u(f);return g===p?0:g<p?-1:1});const d=[].concat(l);return t.forEach(h=>{c.indexOf(h)>=0&&d.push(h)}),c.forEach(h=>{d.indexOf(h)<0&&d.push(h)}),t.forEach(h=>{d.indexOf(h)<0&&n(h,!1)}),d.forEach(h=>{t.indexOf(h)<0&&n(h,!0)}),d}extractPivotColumns(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(n,s)=>n.setPivotActive(s,e),n=>n.pivotIndex,n=>n.initialPivotIndex,n=>n.pivot,n=>n.initialPivot)}resetColumnGroupState(e="api"){const t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,n=>{if(n instanceof It){const s=n.getColGroupDef(),o={groupId:n.getGroupId(),open:s?s.openByDefault:void 0};t.push(o)}}),this.setColumnGroupState(t,e)}getColumnGroupState(){const e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,t=>{t instanceof It&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}setColumnGroupState(e,t="api"){this.columnAnimationService.start();const n=[];e.forEach(s=>{const o=s.groupId,r=s.open,a=this.getProvidedColumnGroup(o);a&&a.isExpanded()!==r&&(this.logger.log("columnGroupOpened("+a.getGroupId()+","+r+")"),a.setExpanded(r),n.push(a))}),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),n.forEach(s=>{const o={type:N.EVENT_COLUMN_GROUP_OPENED,columnGroup:s};this.eventService.dispatchEvent(o)}),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,n="api"){let s;e instanceof It?s=e.getId():s=e||"",this.setColumnGroupState([{groupId:s,open:t}],n)}getProvidedColumnGroup(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");let t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,n=>{n instanceof It&&n.getId()===e&&(t=n)}),t}calculateColumnsForDisplay(){let e;return this.pivotMode&&$e(this.secondaryColumns)?e=this.gridColumns.filter(t=>{const n=this.groupAutoColumns&&Ss(this.groupAutoColumns,t),s=this.valueColumns&&Ss(this.valueColumns,t);return n||s}):e=this.gridColumns.filter(t=>this.groupAutoColumns&&Ss(this.groupAutoColumns,t)||t.isVisible()),e}checkColSpanActiveInCols(e){let t=!1;return e.forEach(n=>{ye(n.getColDef().colSpan)&&(t=!0)}),t}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};const e=t=>{const n=t.getColDef(),s=n.showRowGroup;n&&ye(s)&&(this.groupDisplayColumns.push(t),typeof s=="string"?this.groupDisplayColumnsMap[s]=t:s===!0&&this.getRowGroupColumns().forEach(o=>{this.groupDisplayColumnsMap[o.getId()]=t}))};this.gridColumns.forEach(e)}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return ye(this.secondaryColumns)}setSecondaryColumns(e,t="api"){const n=e&&e.length>0;if(!(!n&&$e(this.secondaryColumns))){if(n){this.processSecondaryColumnDefinitions(e);const s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(o=>this.secondaryColumnsMap[o.getId()]=o),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}processSecondaryColumnDefinitions(e){const t=this.gridOptionsService.get("processPivotResultColDef")||this.gridOptionsService.get("processSecondaryColDef"),n=this.gridOptionsService.get("processPivotResultColGroupDef")||this.gridOptionsService.get("processSecondaryColGroupDef");if(!t&&!n)return;const s=o=>{o.forEach(r=>{if(ye(r.children)){const l=r;n&&n(l),s(l.children)}else t&&t(r)})};e&&s(e)}updateGridColumns(){const e=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;let t;if(this.secondaryColumns&&this.secondaryBalancedTree){const s=this.secondaryColumns.every(o=>this.gridColumnsMap[o.getColId()]!==void 0);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,s&&(t=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,t=this.lastPrimaryOrder);if(this.createGroupAutoColumnsIfNeeded()&&t){const s=sr(this.groupAutoColumns.map(o=>[o,!0]));t=t.filter(o=>!s.has(o)),t=[...this.groupAutoColumns,...t]}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(t),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(s=>this.gridColumnsMap[s.getId()]=s),this.setAutoHeightActive(),!Ur(e,this.gridBalancedTree)){const s={type:N.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(s)}}setAutoHeightActive(){if(this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,!(this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide")))){const t="AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.";yt(()=>console.warn(t),"autoHeightActive.wrongRowModel")}}orderGridColsLike(e){if($e(e))return;const t=sr(e.map((c,u)=>[c,u]));let n=!0;if(this.gridColumns.forEach(c=>{t.has(c)&&(n=!1)}),n)return;const s=sr(this.gridColumns.map(c=>[c,!0])),o=e.filter(c=>s.has(c)),r=sr(o.map(c=>[c,!0])),a=this.gridColumns.filter(c=>!r.has(c)),l=o.slice();a.forEach(c=>{let u=c.getOriginalParent();if(!u){l.push(c);return}const d=[];for(;!d.length&&u;)u.getLeafColumns().forEach(p=>{const v=l.indexOf(p)>=0,y=d.indexOf(p)<0;v&&y&&d.push(p)}),u=u.getOriginalParent();if(!d.length){l.push(c);return}const h=d.map(g=>l.indexOf(g)),f=Math.max(...h);Nd(l,c,f+1)}),this.gridColumns=l}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let t=(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)!==null&&e!==void 0?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")?t:t.filter(n=>n.isVisible()||n.isRowGroupActive())}placeLockedColumns(e){const t=[],n=[],s=[];return e.forEach(o=>{const r=o.getColDef().lockPosition;r==="right"?s.push(o):r==="left"||r===!0?t.push(o):n.push(o)}),[...t,...n,...s]}addAutoGroupToGridColumns(){if($e(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();const t={type:N.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(t=>t.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinDisplayedColumns(){this.gridOptionsService.is("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const t=this.primaryColumns.slice(0),n=this.gridOptionsService.is("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(n){let o=this.getWidthOfColsInList(s);s.forEach(r=>{o-=r.getActualWidth(),r.setLeft(o,e)})}else{let o=0;s.forEach(r=>{r.setLeft(o,e),o+=r.getActualWidth()})}Db(t,s)}),t.forEach(s=>{s.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(t=>{t instanceof Bt&&t.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,n=>{n instanceof qe&&t.push(n)})}extractViewportColumns(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,t){let n;switch(e){case"left":n=this.viewportRowLeft[t];break;case"right":n=this.viewportRowRight[t];break;default:n=this.viewportRowCenter[t];break}return $e(n)&&(n=[]),n}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(n=>e[n.getId()]=!0);const t=(n,s,o)=>{let r=!1;for(let a=0;a<n.length;a++){const l=n[a];let c=!1;if(l instanceof qe)c=e[l.getId()]===!0;else{const d=l.getDisplayedChildren();d&&(c=t(d,s,o+1))}c&&(r=!0,s[o]||(s[o]=[]),s[o].push(l))}return r};t(this.displayedTreeLeft,this.viewportRowLeft,0),t(this.displayedTreeRight,this.viewportRowRight,0),t(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){const e=s=>`${s.getId()}-${s.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.viewportColumns.map(e).join("#"),n=this.viewportColumnsHash!==t;return n&&(this.viewportColumnsHash=t,this.calculateHeaderRows()),n}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let n=-1;e.resizingCols&&e.resizingCols.forEach(d=>{const h=this.displayedColumnsCenter.indexOf(d);n<h&&(n=h)});const s=d=>{const h=this.displayedColumnsCenter.indexOf(d)>n;return d.getFlex()&&h},o=this.displayedColumnsCenter.filter(d=>!s(d)),r=this.displayedColumnsCenter.filter(d=>s(d)),a=[];if(!r.length)return[];const l=[];let c;e:for(;;){const d=r.reduce((h,f)=>h+f.getFlex(),0);c=this.flexViewportWidth-this.getWidthOfColsInList(o);for(let h=0;h<r.length;h++){const f=r[h],g=c*f.getFlex()/d;let p=0;const v=f.getMinWidth(),y=f.getMaxWidth();if(ye(v)&&g<v?p=v:ye(y)&&g>y&&(p=y),p){f.setActualWidth(p,t),tn(r,f),a.push(f),o.push(f);continue e}l[h]=Math.round(g)}break}let u=c;return r.forEach((d,h)=>{d.setActualWidth(Math.min(l[h],u),t),a.push(d),u-=l[h]}),e.skipSetLeft||this.setLeftValues(t),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(a,!0,t,r),r}sizeColumnsToFit(e,t="sizeColumnsToFit",n,s){var o,r,a,l,c;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,t,n,s));return}const u={};s&&((o=s==null?void 0:s.columnLimits)===null||o===void 0||o.forEach(C=>{var{key:m}=C,w=q1(C,["key"]);u[typeof m=="string"?m:m.getColId()]=w}));const d=this.getAllDisplayedColumns(),h=e===this.getWidthOfColsInList(d);if(e<=0||!d.length||h)return;const f=[],g=[];d.forEach(C=>{C.getColDef().suppressSizeToFit===!0?g.push(C):f.push(C)});const p=f.slice(0);let v=!1;const y=C=>{tn(f,C),g.push(C)};for(f.forEach(C=>C.resetActualWidth(t));!v;){v=!0;const C=e-this.getWidthOfColsInList(g);if(C<=0)f.forEach(m=>{var w,E;const R=(E=(w=u==null?void 0:u[m.getId()])===null||w===void 0?void 0:w.minWidth)!==null&&E!==void 0?E:s==null?void 0:s.defaultMinWidth;if(typeof R=="number"){m.setActualWidth(R);return}m.setMinimum(t)});else{const m=C/this.getWidthOfColsInList(f);let w=C;for(let E=f.length-1;E>=0;E--){const R=f[E],O=u==null?void 0:u[R.getId()],A=(r=O==null?void 0:O.minWidth)!==null&&r!==void 0?r:s==null?void 0:s.defaultMinWidth,D=(a=O==null?void 0:O.maxWidth)!==null&&a!==void 0?a:s==null?void 0:s.defaultMaxWidth,L=(l=R.getMinWidth())!==null&&l!==void 0?l:0,S=(c=R.getMaxWidth())!==null&&c!==void 0?c:Number.MAX_VALUE,x=typeof A=="number"&&A>L?A:R.getMinWidth(),T=typeof D=="number"&&D<S?D:R.getMaxWidth();let H=Math.round(R.getActualWidth()*m);ye(x)&&H<x?(H=x,y(R),v=!1):ye(T)&&H>T?(H=T,y(R),v=!1):E===0&&(H=w),R.setActualWidth(H,t,!0),w-=H}}}p.forEach(C=>{C.fireColumnWidthChangedEvent(t)}),this.setLeftValues(t),this.updateBodyWidths(),!n&&this.dispatchColumnResizedEvent(p,!0,t)}buildDisplayedTrees(e){const t=[],n=[],s=[];e.forEach(r=>{switch(r.getPinned()){case"left":t.push(r);break;case"right":n.push(r);break;default:s.push(r);break}});const o=new kx;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,o,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(n,this.gridBalancedTree,o,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,this.gridBalancedTree,o,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=t=>{this.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,e),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,e),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,t=>{t instanceof Bt&&t.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const t=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),n=this.pivotMode?this.gridOptionsService.is("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.usingTreeData)&&!n&&!t){const r=this.groupAutoColumns||[],a=this.autoGroupColService.createAutoGroupColumns(r,this.rowGroupColumns);if(!this.autoColsEqual(a,this.groupAutoColumns)||e)return this.groupAutoColumns=a,!0}else this.groupAutoColumns=null;return!1}isGroupSuppressAutoColumn(){const e=this.gridOptionsService.get("groupDisplayType");if(e?VC("custom",e):!1)return!0;const n=this.gridOptionsService.get("treeDataDisplayType");return n?K1("custom",n):!1}autoColsEqual(e,t){return Ur(e,t,(n,s)=>n.getColId()===s.getColId())}getWidthOfColsInList(e){return e.reduce((t,n)=>t+n.getActualWidth(),0)}getGridBalancedTree(){return this.gridBalancedTree}hasFloatingFilters(){return this.gridColumns?this.gridColumns.some(t=>t.getColDef().floatingFilter):!1}getFirstDisplayedColumn(){const e=this.gridOptionsService.is("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(let n=0;n<t.length;n++){const s=this[t[n]]();if(s.length)return e?Ot(s):s[0]}return null}setColumnHeaderHeight(e,t){if(e.setAutoHeaderHeight(t)){const s={type:N.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(s)}}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),t=this.getAllDisplayedColumns().filter(n=>n.isAutoHeaderHeight()).map(n=>n.getAutoHeaderHeight()||0);return Math.max(e,...t)}getHeaderHeight(){var e;return(e=this.gridOptionsService.getNum("headerHeight"))!==null&&e!==void 0?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return(e=this.gridOptionsService.getNum("floatingFiltersHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return(e=this.gridOptionsService.getNum("groupHeaderHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return(e=this.gridOptionsService.getNum("pivotHeaderHeight"))!==null&&e!==void 0?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return(e=this.gridOptionsService.getNum("pivotGroupHeaderHeight"))!==null&&e!==void 0?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e){const t=e.getUserProvidedColDef();if(!t)return!1;const n=this.columnFactory.mergeColDefs(t,e.getColId());return e.setColDef(n,t),!0}generateColumnStateForRowGroupAndPivotIndexes(e,t){let n={};const s=(o,r,a,l,c,u)=>{if(!r.length||!this.primaryColumns)return[];const d=Object.keys(o),h=new Set(d),f=new Set(d),g=new Set(r.map(R=>{const O=R.getColId();return f.delete(O),O}).concat(d)),p=[],v={};let y=0;for(let R=0;R<this.primaryColumns.length;R++){const O=this.primaryColumns[R].getColId();g.has(O)&&(p.push(O),v[O]=y++)}let C=1e3,m=!1,w=0;const E=R=>{const O=v[R];for(let A=w;A<O;A++){const D=p[A];f.has(D)&&(o[D][c]=C++,f.delete(D))}w=O};r.forEach(R=>{const O=R.getColId();if(h.has(O))E(O),o[O][c]=C++;else{const A=R.getColDef();(A[c]===null||A[c]===void 0&&A[u]==null)&&(m||(A[a]||A[a]===void 0&&A[l]?E(O):(f.forEach(S=>{o[S][c]=C+v[S]}),C+=p.length,m=!0)),n[O]||(n[O]={colId:O}),n[O][c]=C++)}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(n)}};zi([W("expressionService")],Oi.prototype,"expressionService",void 0);zi([W("columnFactory")],Oi.prototype,"columnFactory",void 0);zi([W("displayedGroupCreator")],Oi.prototype,"displayedGroupCreator",void 0);zi([W("ctrlsService")],Oi.prototype,"ctrlsService",void 0);zi([W("autoWidthCalculator")],Oi.prototype,"autoWidthCalculator",void 0);zi([W("columnUtils")],Oi.prototype,"columnUtils",void 0);zi([W("columnAnimationService")],Oi.prototype,"columnAnimationService",void 0);zi([W("autoGroupColService")],Oi.prototype,"autoGroupColService",void 0);zi([xt("aggFuncService")],Oi.prototype,"aggFuncService",void 0);zi([xt("valueCache")],Oi.prototype,"valueCache",void 0);zi([xt("animationFrameService")],Oi.prototype,"animationFrameService",void 0);zi([W("sortController")],Oi.prototype,"sortController",void 0);zi([W("columnDefFactory")],Oi.prototype,"columnDefFactory",void 0);zi([Re],Oi.prototype,"init",null);zi([Hi],Oi.prototype,"destroyColumns",null);zi([Y1(0,bn("loggerFactory"))],Oi.prototype,"setBeans",null);Oi=zi([Be("columnModel")],Oi);var X1=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let GC=class extends be{calculateColMinWidth(e){return e.minWidth!=null?e.minWidth:this.environment.getMinColWidth()}calculateColMaxWidth(e){return e.maxWidth!=null?e.maxWidth:Number.MAX_SAFE_INTEGER}calculateColInitialWidth(e){const t=this.calculateColMinWidth(e),n=this.calculateColMaxWidth(e);let s;const o=Cs(e.width),r=Cs(e.initialWidth);return o!=null?s=o:r!=null?s=r:s=200,Math.max(Math.min(s,n),t)}getOriginalPathForColumn(e,t){const n=[];let s=!1;const o=(r,a)=>{for(let l=0;l<r.length;l++){if(s)return;const c=r[l];c instanceof It?(o(c.getChildren(),a+1),n[a]=c):c===e&&(s=!0)}};return o(t,0),s?n:null}depthFirstOriginalTreeSearch(e,t,n){t&&t.forEach(s=>{s instanceof It&&this.depthFirstOriginalTreeSearch(s,s.getChildren(),n),n(s,e)})}depthFirstAllColumnTreeSearch(e,t){e&&e.forEach(n=>{n instanceof Bt&&this.depthFirstAllColumnTreeSearch(n.getChildren(),t),t(n)})}depthFirstDisplayedColumnTreeSearch(e,t){e&&e.forEach(n=>{n instanceof Bt&&this.depthFirstDisplayedColumnTreeSearch(n.getDisplayedChildren(),t),t(n)})}};GC=X1([Be("columnUtils")],GC);var Q1=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let HC=class extends be{createDisplayedGroups(e,t,n,s,o){const r=[];let a,l;const c=this.mapOldGroupsById(o);return e.forEach(u=>{const d=this.getOriginalPathForColumn(t,u),h=[],f=!l;for(let p=0;p<d.length;p++)if(f||d[p]!==l[p]){const v=this.createColumnGroup(d[p],n,c,s);h[p]=v,p==0?r.push(v):h[p-1].addChild(v)}else h[p]=a[p];h.length===0?r.push(u):Ot(h).addChild(u),a=h,l=d}),this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,t,n,s){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=Bt.createUniqueId(o,r);let l=n[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),ye(l)?l.reset():(l=new Bt(e,o,r,s),this.context.createBean(l)),l}mapOldGroupsById(e){const t={},n=s=>{s.forEach(o=>{if(o instanceof Bt){const r=o;t[o.getUniqueId()]=r,n(r.getChildren())}})};return e&&n(e),t}setupParentsIntoColumns(e,t){e.forEach(n=>{if(n.setParent(t),n instanceof Bt){const s=n;this.setupParentsIntoColumns(s.getChildren(),s)}})}getOriginalPathForColumn(e,t){const n=[];let s=!1;const o=(r,a)=>{for(let l=0;l<r.length;l++){if(s)return;const c=r[l];c instanceof It?(o(c.getChildren(),a+1),n[a]=c):c===t&&(s=!0)}};return o(e,0),s?n:(console.warn("AG Grid: could not get path"),null)}};HC=Q1([Be("displayedGroupCreator")],HC);var Z1=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let BC=class extends be{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(t=>this.addComponent(t))}addComponent(e){const n=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[n]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};BC=Z1([Be("agStackComponentsRegistry")],BC);function Uo(i,e,t){t==null||t==""?Mb(i,e):Is(i,e,t)}function Is(i,e,t){i.setAttribute(Wx(e),t.toString())}function Mb(i,e){i.removeAttribute(Wx(e))}function Wx(i){return`aria-${i}`}function Gi(i,e){e?i.setAttribute("role",e):i.removeAttribute("role")}function Ux(i){let e;return i==="asc"?e="ascending":i==="desc"?e="descending":i==="mixed"?e="other":e="none",e}function jx(i){return parseInt(i.getAttribute("aria-level"),10)}function $x(i){return parseInt(i.getAttribute("aria-posinset"),10)}function J1(i){return i.getAttribute("aria-describedby")||""}function pa(i,e){Uo(i,"label",e)}function Kg(i,e){Uo(i,"labelledby",e)}function zx(i,e){Uo(i,"description",e)}function Kx(i,e){Uo(i,"describedby",e)}function Yx(i,e){Uo(i,"live",e)}function qx(i,e){Uo(i,"level",e)}function Lb(i,e){Uo(i,"disabled",e)}function Yg(i,e){Uo(i,"hidden",e)}function Ks(i,e){Is(i,"expanded",e)}function Xx(i){Mb(i,"expanded")}function Fb(i,e){Is(i,"setsize",e)}function Nb(i,e){Is(i,"posinset",e)}function Qx(i,e){Is(i,"multiselectable",e)}function Zx(i,e){Is(i,"rowcount",e)}function kb(i,e){Is(i,"rowindex",e)}function Jx(i,e){Is(i,"colcount",e)}function Vb(i,e){Is(i,"colindex",e)}function eA(i,e){Is(i,"colspan",e)}function tA(i,e){Is(i,"sort",e)}function iA(i){Mb(i,"sort")}function Mc(i,e){Uo(i,"selected",e)}function nA(i,e){Is(i,"checked",e===void 0?"mixed":e)}function ek(i,e){Uo(i,"controls",e.id),Kg(e,i.id)}function qg(i,e){return e===void 0?i("ariaIndeterminate","indeterminate"):e===!0?i("ariaChecked","checked"):i("ariaUnchecked","unchecked")}var tk=Object.freeze({__proto__:null,setAriaRole:Gi,getAriaSortState:Ux,getAriaLevel:jx,getAriaPosInSet:$x,getAriaDescribedBy:J1,setAriaLabel:pa,setAriaLabelledBy:Kg,setAriaDescription:zx,setAriaDescribedBy:Kx,setAriaLive:Yx,setAriaLevel:qx,setAriaDisabled:Lb,setAriaHidden:Yg,setAriaExpanded:Ks,removeAriaExpanded:Xx,setAriaSetSize:Fb,setAriaPosInSet:Nb,setAriaMultiSelectable:Qx,setAriaRowCount:Zx,setAriaRowIndex:kb,setAriaColCount:Jx,setAriaColIndex:Vb,setAriaColSpan:eA,setAriaSort:tA,removeAriaSort:iA,setAriaSelected:Mc,setAriaChecked:nA,setAriaControls:ek,getAriaCheckboxStateName:qg});let _v,If,Rv,Tv,xv,Av,WC,UC;function xs(){return _v===void 0&&(_v=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_v}function Gb(){if(If===void 0)if(xs()){const i=navigator.userAgent.match(/version\/(\d+)/i);i&&(If=i[1]!=null?parseFloat(i[1]):0)}else If=0;return If}function Xg(){if(Rv===void 0){const i=window;Rv=!!i.chrome&&(!!i.chrome.webstore||!!i.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Rv}function Hb(){return Tv===void 0&&(Tv=/(firefox)/i.test(navigator.userAgent)),Tv}function Bb(){return xv===void 0&&(xv=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),xv}function ga(){return Av===void 0&&(Av=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),Av}function Qg(){return!xs()||Gb()>=15}function Up(i){if(!i)return null;const e=i.tabIndex,t=i.getAttribute("tabIndex");return e===-1&&(t===null||t===""&&!Hb())?null:e.toString()}function sA(){if(!document.body)return-1;let i=1e6;const e=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,t=document.createElement("div");for(document.body.appendChild(t);;){const n=i*2;if(t.style.height=n+"px",n>e||t.clientHeight!==n)break;i=n}return document.body.removeChild(t),i}function oA(){var i,e,t;return(e=(i=document.body)===null||i===void 0?void 0:i.clientWidth)!==null&&e!==void 0?e:window.innerHeight||((t=document.documentElement)===null||t===void 0?void 0:t.clientWidth)||-1}function rA(){var i,e,t;return(e=(i=document.body)===null||i===void 0?void 0:i.clientHeight)!==null&&e!==void 0?e:window.innerHeight||((t=document.documentElement)===null||t===void 0?void 0:t.clientHeight)||-1}function aA(){return UC==null&&lA(),UC}function lA(){const i=document.body,e=document.createElement("div");e.style.width=e.style.height="100px",e.style.opacity="0",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",e.style.position="absolute",i.appendChild(e);let t=e.offsetWidth-e.clientWidth;t===0&&e.clientWidth===0&&(t=null),e.parentNode&&e.parentNode.removeChild(e),t!=null&&(UC=t,WC=t===0)}function wc(){return WC==null&&lA(),WC}var ik=Object.freeze({__proto__:null,isBrowserSafari:xs,getSafariVersion:Gb,isBrowserChrome:Xg,isBrowserFirefox:Hb,isMacOsUserAgent:Bb,isIOSUserAgent:ga,browserSupportsPreventScroll:Qg,getTabIndex:Up,getMaxDivHeight:sA,getBodyWidth:oA,getBodyHeight:rA,getScrollbarWidth:aA,isInvisibleScrollbar:wc});function Sc(i,e){return i.toString().padStart(e,"0")}function cA(i,e){const t=[];for(let n=i;n<=e;n++)t.push(n);return t}function nk(i){return typeof i=="string"&&(i=parseInt(i,10)),typeof i=="number"?Math.floor(i):null}function sk(i,e){let t="";for(let n=0;n<e;n++)t+=String.fromCharCode(i&255),i>>>=8;return t}function ok(i,e,t){return typeof i!="number"?"":Wb(Math.round(i*100)/100,e,t)}function Wb(i,e,t){return typeof i!="number"?"":i.toString().replace(".",t).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${e}`)}function rk(i){return i==null?null:i.reduce((e,t)=>e+t,0)}function ak(i,e){return i>=0?i:e}function lk(i,e){const t=parseInt(i,10);return!isNaN(t)&&isFinite(t)&&t>0?t:e}var ck=Object.freeze({__proto__:null,padStartWidthZeros:Sc,createArrayOfNumbers:cA,cleanNumber:nk,decToHex:sk,formatNumberTwoDecimalPlacesAndCommas:ok,formatNumberCommas:Wb,sum:rk,zeroOrGreater:ak,oneOrGreater:lk});function Es(i,e=!0,t="-"){if(!i)return null;let n=[i.getFullYear(),i.getMonth()+1,i.getDate()].map(s=>Sc(s,2)).join(t);return e&&(n+=" "+[i.getHours(),i.getMinutes(),i.getSeconds()].map(s=>Sc(s,2)).join(":")),n}const Dv=i=>{if(i>3&&i<21)return"th";switch(i%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function pp(i,e="YYYY-MM-DD"){const t=Sc(i.getFullYear(),4),n=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:()=>t.slice(t.length-4,t.length),YY:()=>t.slice(t.length-2,t.length),Y:()=>`${i.getFullYear()}`,MMMM:()=>n[i.getMonth()],MMM:()=>n[i.getMonth()].slice(0,3),MM:()=>Sc(i.getMonth()+1,2),Mo:()=>`${i.getMonth()+1}${Dv(i.getMonth()+1)}`,M:()=>`${i.getMonth()+1}`,Do:()=>`${i.getDate()}${Dv(i.getDate())}`,DD:()=>Sc(i.getDate(),2),D:()=>`${i.getDate()}`,dddd:()=>s[i.getDay()],ddd:()=>s[i.getDay()].slice(0,3),dd:()=>s[i.getDay()].slice(0,2),do:()=>`${i.getDay()}${Dv(i.getDay())}`,d:()=>`${i.getDay()}`},r=new RegExp(Object.keys(o).join("|"),"g");return e.replace(r,a=>a in o?o[a]():a)}function ro(i){if(!i)return null;const[e,t]=i.split(" ");if(!e)return null;const n=e.split("-").map(d=>parseInt(d,10));if(n.filter(d=>!isNaN(d)).length!==3)return null;const[s,o,r]=n,a=new Date(s,o-1,r);if(a.getFullYear()!==s||a.getMonth()!==o-1||a.getDate()!==r)return null;if(!t||t==="00:00:00")return a;const[l,c,u]=t.split(":").map(d=>parseInt(d,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),u>=0&&u<60&&a.setSeconds(u),a}var uk=Object.freeze({__proto__:null,serialiseDate:Es,dateToFormattedString:pp,parseDateTimeFromString:ro});let Mf;function dk(i,e,t){const n=i.parentElement;let s=n&&n.firstChild;for(;s;)e&&s.classList.toggle(e,s===i),t&&s.classList.toggle(t,s!==i),s=s.nextSibling}const uA="[tabindex], input, select, button, textarea, [href]",Ub=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled:not(.ag-button), .ag-disabled *.mjs";function jb(i){const e=Element.prototype.matches||Element.prototype.msMatchesSelector,t="input, select, button, textarea",n=e.call(i,t),s=e.call(i,Ub),o=Er(i);return n&&!s&&o}function mt(i,e,t={}){const{skipAriaHidden:n}=t;i.classList.toggle("ag-hidden",!e),n||Yg(i,!e)}function dA(i,e,t={}){const{skipAriaHidden:n}=t;i.classList.toggle("ag-invisible",!e),n||Yg(i,!e)}function Lc(i,e){const t="disabled",n=e?s=>s.setAttribute(t,""):s=>s.removeAttribute(t);n(i),Qb(i.querySelectorAll("input"),s=>n(s))}function ol(i,e,t){let n=0;for(;i;){if(i.classList.contains(e))return!0;if(i=i.parentElement,typeof t=="number"){if(++n>t)break}else if(i===t)break}return!1}function ma(i){const{height:e,width:t,borderTopWidth:n,borderRightWidth:s,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:f,marginLeft:g,boxSizing:p}=window.getComputedStyle(i);return{height:parseFloat(e),width:parseFloat(t),borderTopWidth:parseFloat(n),borderRightWidth:parseFloat(s),borderBottomWidth:parseFloat(o),borderLeftWidth:parseFloat(r),paddingTop:parseFloat(a),paddingRight:parseFloat(l),paddingBottom:parseFloat(c),paddingLeft:parseFloat(u),marginTop:parseFloat(d),marginRight:parseFloat(h),marginBottom:parseFloat(f),marginLeft:parseFloat(g),boxSizing:p}}function Eh(i){const e=ma(i);return e.boxSizing==="border-box"?e.height-e.paddingTop-e.paddingBottom:e.height}function Zg(i){const e=ma(i);return e.boxSizing==="border-box"?e.width-e.paddingLeft-e.paddingRight:e.width}function $b(i){const e=ma(i),t=e.marginBottom+e.marginTop;return Math.ceil(i.offsetHeight+t)}function Jg(i){const e=ma(i),t=e.marginLeft+e.marginRight;return Math.ceil(i.offsetWidth+t)}function zb(i){const e=i.getBoundingClientRect(),{borderTopWidth:t,borderLeftWidth:n,borderRightWidth:s,borderBottomWidth:o}=ma(i);return{top:e.top+(t||0),left:e.left+(n||0),right:e.right+(s||0),bottom:e.bottom+(o||0)}}function Vd(){if(typeof Mf=="boolean")return Mf;const i=document.createElement("div");return i.style.direction="rtl",i.style.width="1px",i.style.height="1px",i.style.position="fixed",i.style.top="0px",i.style.overflow="hidden",i.dir="rtl",i.innerHTML=`<div style="width: 2px">
<span style="display: inline-block; width: 1px"></span>
<span style="display: inline-block; width: 1px"></span>
</div>`,document.body.appendChild(i),i.scrollLeft=1,Mf=Math.floor(i.scrollLeft)===0,document.body.removeChild(i),Mf}function Gd(i,e){let t=i.scrollLeft;return e&&(t=Math.abs(t),Xg()&&!Vd()&&(t=i.scrollWidth-i.clientWidth-t)),t}function Hd(i,e,t){t&&(Vd()?e*=-1:(xs()||Xg())&&(e=i.scrollWidth-i.clientWidth-e)),i.scrollLeft=e}function Zn(i){for(;i&&i.firstChild;)i.removeChild(i.firstChild)}function hk(i,e){or(i.querySelector(e))}function or(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function Er(i){return i.offsetParent!==null}function Ui(i){const e=document.createElement("div");return e.innerHTML=(i||"").trim(),e.firstChild}function fk(i,e){i.lastChild?i.insertAdjacentHTML("afterbegin",e):i.innerHTML=e}function pk(i,e){return i.attributes&&i.attributes[e]?i.attributes[e].value:null}function jC(i){return i&&i.clientHeight?i.clientHeight:0}function $C(i){return i&&i.clientWidth?i.clientWidth:0}function Kb(i,e,t){if(t&&t.nextSibling===e)return;const n=document.activeElement,s=e.contains(n);t?t.nextSibling?i.insertBefore(e,t.nextSibling):i.appendChild(e):i.firstChild&&i.firstChild!==e&&i.insertAdjacentElement("afterbegin",e),s&&n&&Qg()&&n.focus({preventScroll:!0})}function Yb(i,e){for(let t=0;t<e.length;t++){const n=e[t],s=i.children[t];s!==n&&i.insertBefore(n,s)}}function hA(i,e,t){t?t.insertAdjacentElement("afterend",e):i.firstChild?i.insertAdjacentElement("afterbegin",e):i.appendChild(e)}function gk(i,e){ye(i.firstChild)?i.insertBefore(e,i.firstChild):i.appendChild(e)}function qb(i,e){if(e)for(const[t,n]of Object.entries(e)){if(!t||!t.length||n==null)continue;const s=Hx(t),o=n.toString(),r=o.replace(/\s*!important/g,""),a=r.length!=o.length?"important":void 0;i.style.setProperty(s,r,a)}}function fA(i){return i.clientWidth<i.scrollWidth}function pA(i){return i.clientHeight<i.scrollHeight}function _h(i,e){e==="flex"?(i.style.removeProperty("width"),i.style.removeProperty("minWidth"),i.style.removeProperty("maxWidth"),i.style.flex="1 1 auto"):_s(i,e)}function _s(i,e){e=Xb(e),i.style.width=e.toString(),i.style.maxWidth=e.toString(),i.style.minWidth=e.toString()}function mk(i,e){e==="flex"?(i.style.removeProperty("height"),i.style.removeProperty("minHeight"),i.style.removeProperty("maxHeight"),i.style.flex="1 1 auto"):rl(i,e)}function rl(i,e){e=Xb(e),i.style.height=e.toString(),i.style.maxHeight=e.toString(),i.style.minHeight=e.toString()}function Xb(i){return typeof i=="number"?`${i}px`:i}function Rh(i){return i instanceof Node||i instanceof HTMLElement}function gA(i){if(i==null)return[];const e=[];return Qb(i,t=>e.push(t)),e}function mA(i,e){if(i)for(let t=0;t<i.length;t++){const n=i[t];e(n.name,n.value)}}function Zr(i,e,t){t==null?i.removeAttribute(e):i.setAttribute(e,t.toString())}function Qb(i,e){if(i!=null)for(let t=0;t<i.length;t++)e(i[t])}var vk=Object.freeze({__proto__:null,radioCssClass:dk,FOCUSABLE_SELECTOR:uA,FOCUSABLE_EXCLUDE:Ub,isFocusableFormField:jb,setDisplayed:mt,setVisible:dA,setDisabled:Lc,isElementChildOfClass:ol,getElementSize:ma,getInnerHeight:Eh,getInnerWidth:Zg,getAbsoluteHeight:$b,getAbsoluteWidth:Jg,getElementRectWithOffset:zb,isRtlNegativeScroll:Vd,getScrollLeft:Gd,setScrollLeft:Hd,clearElement:Zn,removeElement:hk,removeFromParent:or,isVisible:Er,loadTemplate:Ui,appendHtml:fk,getElementAttribute:pk,offsetHeight:jC,offsetWidth:$C,ensureDomOrder:Kb,setDomChildOrder:Yb,insertWithDomOrder:hA,prependDC:gk,addStylesToElement:qb,isHorizontalScrollShowing:fA,isVerticalScrollShowing:pA,setElementWidth:_h,setFixedWidth:_s,setElementHeight:mk,setFixedHeight:rl,formatSize:Xb,isNodeOrElement:Rh,copyNodeList:gA,iterateNamedNodeMap:mA,addOrRemoveAttribute:Zr,nodeListForEach:Qb});const vA={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"};function ms(i,e,t){const n=gi(i,e,t);if(n){const{className:o}=n;if(typeof o=="string"&&o.indexOf("ag-icon")>-1||typeof o=="object"&&o["ag-icon"])return n}const s=document.createElement("span");return s.appendChild(n),s}function gi(i,e,t,n){let s=null;const o=t&&t.getColDef().icons;if(o&&(s=o[i]),e&&!s){const r=e.get("icons");r&&(s=r[i])}if(s){let r;if(typeof s=="function")r=s();else if(typeof s=="string")r=s;else throw new Error("icon from grid options needs to be a string or a function");if(typeof r=="string")return Ui(r);if(Rh(r))return r;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{const r=document.createElement("span");let a=vA[i];return a||(n?a=i:(console.warn(`AG Grid: Did not find icon ${i}`),a="")),r.setAttribute("class",`ag-icon ag-icon-${a}`),r.setAttribute("unselectable","on"),Gi(r,"presentation"),r}}var Ck=Object.freeze({__proto__:null,iconNameClassMap:vA,createIcon:ms,createIconNoSpan:gi});class ge{}ge.BACKSPACE="Backspace";ge.TAB="Tab";ge.ENTER="Enter";ge.ESCAPE="Escape";ge.SPACE=" ";ge.LEFT="ArrowLeft";ge.UP="ArrowUp";ge.RIGHT="ArrowRight";ge.DOWN="ArrowDown";ge.DELETE="Delete";ge.F2="F2";ge.PAGE_UP="PageUp";ge.PAGE_DOWN="PageDown";ge.PAGE_HOME="Home";ge.PAGE_END="End";ge.A="KeyA";ge.C="KeyC";ge.D="KeyD";ge.V="KeyV";ge.X="KeyX";ge.Y="KeyY";ge.Z="KeyZ";const yk=65,bk=67,wk=86,Sk=68,Ek=90,_k=89;function Zb(i){return i.altKey||i.ctrlKey||i.metaKey?!1:i.key.length===1}function jp(i,e,t,n,s){const o=n?n.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r={event:e,editing:s,column:n,api:i.api,node:t,data:t.data,colDef:n.getColDef(),context:i.context,columnApi:i.columnApi};return!!(o&&o(r))}function CA(i,e,t,n){const s=n.getDefinition(),o=s&&s.suppressHeaderKeyboardEvent;if(!ye(o))return!1;const r={api:i.api,columnApi:i.columnApi,context:i.context,colDef:s,column:n,headerRowIndex:t,event:e};return!!o(r)}function yA(i){const{keyCode:e}=i;let t;switch(e){case yk:t=ge.A;break;case bk:t=ge.C;break;case wk:t=ge.V;break;case Sk:t=ge.D;break;case Ek:t=ge.Z;break;case _k:t=ge.Y;break;default:t=i.code}return t}function bA(i,e=!1){return i===ge.DELETE?!0:!e&&i===ge.BACKSPACE?Bb():!1}var Rk=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Zb,isUserSuppressingKeyboardEvent:jp,isUserSuppressingHeaderKeyboardEvent:CA,normaliseQwertyAzerty:yA,isDeleteKey:bA});function Jb(i,e,t){if(t===0)return!1;const n=Math.abs(i.clientX-e.clientX),s=Math.abs(i.clientY-e.clientY);return Math.max(n,s)<=t}var Tk=Object.freeze({__proto__:null,areEventsNear:Jb});function xk(i,e){if(!i)return!1;const t=(r,a)=>{const l=e[r.id],c=e[a.id],u=l!==void 0,d=c!==void 0,h=u&&d,f=!u&&!d;return h?l-c:f?r.__objectId-a.__objectId:u?1:-1};let n,s,o=!1;for(let r=0;r<i.length-1;r++)if(n=i[r],s=i[r+1],t(n,s)>0){o=!0;break}return o?(i.sort(t),!0):!1}function Ak(i,e){const t=[];n(i);function n(s){s&&s.forEach(o=>{if(o.group||o.hasChildren()){t.push(o.key);const r=t.join("|");e(o,r),n(o.childrenAfterGroup),t.pop()}})}}var Dk=Object.freeze({__proto__:null,sortRowNodesByOrder:xk,traverseNodesWithKey:Ak});function ew(i){const e=new Set;return i.forEach(t=>e.add(t)),e}var Ok=Object.freeze({__proto__:null,convertToSet:ew});const Pk=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},tk),M1),ik),uk),vk),F1),S1),z1),h1),Ck),Rk),j1),Tk),ck),y1),Dk),Ok),B1),ze=Pk;class Fc{constructor(e=0,t=1){this.nextValue=e,this.step=t}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}}var cc;(function(i){i[i.IN_PROGRESS=0]="IN_PROGRESS",i[i.RESOLVED=1]="RESOLVED"})(cc||(cc={}));class vn{constructor(e){this.status=cc.IN_PROGRESS,this.resolution=null,this.waiters=[],e(t=>this.onDone(t),t=>this.onReject(t))}static all(e){return new vn(t=>{let n=e.length;const s=new Array(n);e.forEach((o,r)=>{o.then(a=>{s[r]=a,n--,n===0&&t(s)})})})}static resolve(e=null){return new vn(t=>t(e))}then(e){return new vn(t=>{this.status===cc.RESOLVED?t(e(this.resolution)):this.waiters.push(n=>t(e(n)))})}resolveNow(e,t){return this.status===cc.RESOLVED?t(this.resolution):e}onDone(e){this.status=cc.RESOLVED,this.resolution=e,this.waiters.forEach(t=>t(e))}onReject(e){console.warn("TBI")}}var tw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Us;(function(i){i[i.NOTHING=0]="NOTHING",i[i.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",i[i.SHOWING=2]="SHOWING"})(Us||(Us={}));class fr extends be{constructor(e){super(),this.DEFAULT_SHOW_TOOLTIP_DELAY=2e3,this.DEFAULT_HIDE_TOOLTIP_DELAY=1e4,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.state=Us.NOTHING,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1,this.parentComp=e}postConstruct(){this.tooltipShowDelay=this.getTooltipDelay("show")||this.DEFAULT_SHOW_TOOLTIP_DELAY,this.tooltipHideDelay=this.getTooltipDelay("hide")||this.DEFAULT_HIDE_TOOLTIP_DELAY,this.tooltipMouseTrack=this.gridOptionsService.is("tooltipMouseTrack");const e=this.parentComp.getGui();this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this)),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this))}destroy(){this.setToDoNothing(),super.destroy()}onMouseEnter(e){if(ga()||this.state!=Us.NOTHING)return;const t=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.lastMouseEvent=e,this.state=Us.WAITING_TO_SHOW}onMouseLeave(){this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}setToDoNothing(){this.state===Us.SHOWING&&this.hideTooltip(),this.clearTimeouts(),this.state=Us.NOTHING}onMouseMove(e){this.lastMouseEvent=e,this.tooltipMouseTrack&&this.state===Us.SHOWING&&this.tooltipComp&&this.positionTooltipUnderLastMouseEvent()}onMouseDown(){this.setToDoNothing()}getTooltipDelay(e){const t=this.gridOptionsService.getNum("tooltipShowDelay"),n=this.gridOptionsService.getNum("tooltipHideDelay"),s=e==="show"?t:n,o=Vx(e);return ye(s)?(s<0&&yt(()=>console.warn(`AG Grid: tooltip${o}Delay should not be lower than 0`),`tooltip${o}DelayWarn`),Math.max(200,s)):null}hideTooltip(){this.tooltipComp&&(this.destroyTooltipComp(),fr.lastTooltipHideTime=new Date().getTime()),this.state=Us.NOTHING}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp;window.setTimeout(()=>{e(),this.getContext().destroyBean(t)},this.FADE_OUT_TOOLTIP_TIMEOUT),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}isLastTooltipHiddenRecently(){const e=new Date().getTime(),t=fr.lastTooltipHideTime;return e-t<this.SHOW_QUICK_TOOLTIP_DIFF}showTooltip(){const e=Object.assign({},this.parentComp.getTooltipParams());if(!ye(e.value)){this.setToDoNothing();return}this.state=Us.SHOWING,this.tooltipInstanceCount++;const t=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.userComponentFactory.getTooltipCompDetails(e).newAgStackInstance().then(t)}newTooltipComponentCallback(e,t){if(this.state!==Us.SHOWING||this.tooltipInstanceCount!==e){this.getContext().destroyBean(t);return}const s=t.getGui();this.tooltipComp=t,s.classList.contains("ag-tooltip")||s.classList.add("ag-tooltip-custom");const o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({eChild:s,ariaLabel:o("ariaLabelTooltip","Tooltip")});r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltipUnderLastMouseEvent(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.tooltipHideDelay)}positionTooltipUnderLastMouseEvent(){this.popupService.positionPopupUnderMouseEvent({type:"tooltip",mouseEvent:this.lastMouseEvent,ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack})}clearTimeouts(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0),this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}}tw([W("popupService")],fr.prototype,"popupService",void 0);tw([W("userComponentFactory")],fr.prototype,"userComponentFactory",void 0);tw([Re],fr.prototype,"postConstruct",null);class Ik{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}}var iw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const Mk=new Fc;class Qe extends be{constructor(e){super(),this.displayed=!0,this.visible=!0,this.compId=Mk.next(),this.cssClassManager=new Ik(()=>this.eGui),e&&this.setTemplate(e)}preConstructOnComponent(){this.usingBrowserTooltips=this.gridOptionsService.is("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(e){const t=()=>{this.usingBrowserTooltips?this.getGui().removeAttribute("title"):this.tooltipFeature=this.destroyBean(this.tooltipFeature)},n=()=>{this.usingBrowserTooltips?this.getGui().setAttribute("title",this.tooltipText):this.tooltipFeature=this.createBean(new fr(this))};this.tooltipText!=e&&(this.tooltipText&&t(),e!=null&&(this.tooltipText=e,this.tooltipText&&n()))}createChildComponentsFromTags(e,t){gA(e.childNodes).forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,r=>{r.getGui()&&this.copyAttributesFromNode(s,r.getGui())},t);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const r=Array.prototype.slice.call(s.children);o.addItems(r)}this.swapComponentForNode(o,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)})}createComponentFromElement(e,t,n){const s=e.nodeName,o=n?n[e.getAttribute("ref")]:void 0,r=this.agStackComponentsRegistry.getComponentClass(s);if(r){Qe.elementGettingCreated=e;const a=new r(o);return a.setParentComponent(this),this.createBean(a,null,t),a}return null}copyAttributesFromNode(e,t){mA(e.attributes,(n,s)=>t.setAttribute(n,s))}swapComponentForNode(e,t,n){const s=e.getGui();t.replaceChild(s,n),t.insertBefore(document.createComment(n.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,n)}swapInComponentForQuerySelectors(e,t){const n=this;this.iterateOverQuerySelectors(s=>{n[s.attributeName]===t&&(n[s.attributeName]=e)})}iterateOverQuerySelectors(e){let t=Object.getPrototypeOf(this);for(;t!=null;){const n=t.__agComponentMetaData,s=Wg(t.constructor);n&&n[s]&&n[s].querySelectors&&n[s].querySelectors.forEach(o=>e(o)),t=Object.getPrototypeOf(t)}}activateTabIndex(e){const t=this.gridOptionsService.getNum("tabIndex")||0;e||(e=[]),e.length||e.push(this.getGui()),e.forEach(n=>n.setAttribute("tabindex",t.toString()))}setTemplate(e,t){const n=Ui(e);this.setTemplateFromElement(n,t)}setTemplateFromElement(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const e=this;this.iterateOverQuerySelectors(t=>{const n=o=>e[t.attributeName]=o;if(t.refSelector&&this.getAttribute("ref")===t.refSelector)n(this.eGui);else{const o=this.eGui.querySelector(t.querySelector);o&&n(o.__agComponent||o)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}queryForHtmlInputElement(e){return this.eGui.querySelector(e)}appendChild(e,t){if(e!=null)if(t||(t=this.eGui),Rh(e))t.appendChild(e);else{const n=e;t.appendChild(n.getGui())}}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:n}=t;dA(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:n}=t;mt(this.eGui,e,{skipAriaHidden:n});const s={type:Qe.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(s)}}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);const e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}getAttribute(e){const{eGui:t}=this;return t?t.getAttribute(e):null}getRefElement(e){return this.queryForHtmlElement(`[ref="${e}"]`)}}Qe.EVENT_DISPLAYED_CHANGED="displayedChanged";iw([W("agStackComponentsRegistry")],Qe.prototype,"agStackComponentsRegistry",void 0);iw([Tx],Qe.prototype,"preConstructOnComponent",null);iw([Tx],Qe.prototype,"createChildComponentsPreConstruct",null);function Ae(i){return Lk.bind(this,`[ref=${i}]`,i)}function Lk(i,e,t,n,s){if(i===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof s=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}Fk(t,"querySelectors",{attributeName:n,querySelector:i,refSelector:e})}function Fk(i,e,t){const n=Nk(i,Wg(i.constructor));n[e]||(n[e]=[]),n[e].push(t)}function Nk(i,e){return i.__agComponentMetaData||(i.__agComponentMetaData={}),i.__agComponentMetaData[e]||(i.__agComponentMetaData[e]={}),i.__agComponentMetaData[e]}var wA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class nw extends Qe{constructor(){super(`
<div class="ag-floating-filter-input" role="presentation">
<ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>
</div>`)}destroy(){super.destroy()}init(e){this.params=e;const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),n=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${n("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){if(!e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}}wA([Ae("eFloatingFilterText")],nw.prototype,"eFloatingFilterText",void 0);wA([W("columnModel")],nw.prototype,"columnModel",void 0);class SA{constructor(e,t,n,s){this.alive=!0,this.context=e,this.eParent=s,t.getDateCompDetails(n).newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}this.dateComp=a,a&&(s.appendChild(a.getGui()),a.afterGuiAttached&&a.afterGuiAttached(),this.tempValue&&a.setDate(this.tempValue),this.disabled!=null&&this.setDateCompDisabled(this.disabled))})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){mt(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(e)}setDateCompDisabled(e){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(e)}}class EA{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{if(typeof e=="string")return;const t=[["displayKey"],["displayName"],["predicate","test"]],n=s=>s.some(o=>e[o]!=null)?!0:(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${s}'`),!1);if(!t.every(n)){this.filterOptions=this.filterOptions.filter(s=>s===e)||[];return}this.customFilterOptions[e.displayKey]=e})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const t=this.filterOptions[0];typeof t=="string"?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}}const _A={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose One",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};var RA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class is extends be{constructor(e,t={}){super(),this.eFocusableElement=e,this.callbacks=t,this.callbacks=Object.assign({shouldStopEventPropagation:()=>!1,onTabKeyDown:n=>{if(n.defaultPrevented)return;const s=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,n.shiftKey);s&&(s.focus(),n.preventDefault())}},t)}postConstruct(){this.eFocusableElement.classList.add(is.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(e){this.addManagedListener(e,"keydown",t=>{if(!(t.defaultPrevented||Ao(t))){if(this.callbacks.shouldStopEventPropagation(t)){hr(t);return}t.key===ge.TAB?this.callbacks.onTabKeyDown(t):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(t)}})}}is.FOCUS_MANAGED_CLASS="ag-focus-managed";RA([W("focusService")],is.prototype,"focusService",void 0);RA([Re],is.prototype,"postConstruct",null);var sw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const TA="ag-resizer-wrapper",kk=`<div class="${TA}">
<div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>
<div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>
<div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>
<div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>
<div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>
<div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>
<div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>
<div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>
</div>`;class Th extends be{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,n=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(n,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:n,width:s,minHeight:o,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,u=0;const d=!!this.element.offsetParent;if(d){const h=this.findBoundaryElement(),f=window.getComputedStyle(h);if(f.minWidth!=null){const g=h.offsetWidth-this.element.offsetWidth;u=parseInt(f.minWidth,10)-g}if(f.minHeight!=null){const g=h.offsetHeight-this.element.offsetHeight;c=parseInt(f.minHeight,10)-g}}if(this.minHeight=o||c,this.minWidth=n||u,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),e)this.center();else if(a||l)this.offsetElement(a,l);else if(d&&t){let h=this.boundaryEl,f=!0;if(h||(h=this.findBoundaryElement(),f=!1),h){const g=parseFloat(h.style.top),p=parseFloat(h.style.left);f?this.offsetElement(isNaN(p)?0:p,isNaN(g)?0:g):this.setPosition(p,g)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(n),this.moveElementDragListener=n):(this.dragService.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const s=!!e[t],o=this.getResizerElement(t),r={dragStartPixels:0,eElement:o,onDragStart:a=>this.onResizeStart(a,t),onDragging:this.onResize.bind(this),onDragStop:a=>this.onResizeEnd(a,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(r),this.resizeListeners.push(r),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,n=this.element;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)rl(n,e),e=$b(n),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(n.style.maxHeight="unset",n.style.minHeight="unset"):t?rl(n,e):(n.style.height=`${e}px`,n.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:n}=this.offsetParent;if(!n)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,a=e?0:o.top;let l=0;if(t){const u=this.element.parentElement;if(u){const{bottom:d}=u.getBoundingClientRect();l=d-s.bottom}}return n+a-r-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:n}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_s(t,e),e=Jg(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,r=n?this.position.x:this.element.getBoundingClientRect().left;o&&e+r>o&&(e=o-r)}this.getWidth()!==e&&(s?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?_s(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:n}=this.config,s=n?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const n=this.getAvailableHeight();this.element.style.setProperty("max-height",`${n}px`)};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:n,isTop:s,anywhereWithin:o,topBuffer:r}=e,a=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,c=this.shouldSkipX(t,!!n,!!o,a)?0:a,u=this.shouldSkipY(t,!!s,r,l)?0:l;return{movementX:c,movementY:u}}shouldSkipX(e,t,n,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:o.left;let c=l<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=a.right;return c?!0:(t?c=s<0&&e.clientX>l+r.left||s>0&&e.clientX<l+r.left:n?c=s<0&&e.clientX>a.right||s>0&&e.clientX<l+r.left:c=s<0&&e.clientX>a.right||s>0&&e.clientX<a.right,c)}shouldSkipY(e,t,n=0,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),a=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:o.top;let c=l<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=a.bottom;return c?!0:(t?c=s<0&&e.clientY>l+r.top+n||s>0&&e.clientY<l+r.top:c=s<0&&e.clientY>a.bottom||s>0&&e.clientY<a.bottom,c)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")},left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const n=new DOMParser().parseFromString(kk,"text/html").body;e.appendChild(n.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${TA}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:n,forcePopupParentAsOffsetParent:s}=this.config;!n&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(n=>!n.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,n=0;for(let s=0;s<e.length;s++){const o=e[s],r=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let a=this.minHeight||0,l=this.minWidth||0;if(r){const c=window.getComputedStyle(o);c.minHeight&&(a=parseInt(c.minHeight,10)),c.minWidth&&(l=parseInt(c.minWidth,10))}else a=o.offsetHeight,l=o.offsetWidth;t+=a,n+=l}return{height:t,width:n}}applySizeToSiblings(e){let t=null;const n=this.getSiblings();if(n){for(let s=0;s<n.length;s++){const o=n[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=n[s+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:n}=this.config,{isTop:s,isRight:o,isBottom:r,isLeft:a}=this.currentResizer,l=o||a,c=r||s,{movementX:u,movementY:d}=this.calculateMouseMovement({e,isLeft:a,isTop:s}),h=this.position.x,f=this.position.y;let g=0,p=0;if(l&&u){const v=a?-1:1,y=this.getWidth(),C=y+u*v;let m=!1;a&&(g=y-C,(h+g<=0||C<=this.minWidth)&&(m=!0,g=0)),m||this.setWidth(C)}if(c&&d){const v=s?-1:1,y=this.getHeight(),C=y+d*v;let m=!1;s?(p=y-C,(f+p<=0||C<=this.minHeight)&&(m=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&y<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(m=!0),m||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||n)&&g||p)&&this.offsetElement(h+g,f+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;const n={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(n)}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:n}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,n+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}}sw([W("popupService")],Th.prototype,"popupService",void 0);sw([W("resizeObserverService")],Th.prototype,"resizeObserverService",void 0);sw([W("dragService")],Th.prototype,"dragService",void 0);var ow=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class to extends Qe{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null}postConstruct(){this.resetTemplate(),this.createManagedBean(new is(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Th(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const n=`
<form class="ag-filter-wrapper">
<div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">
${this.createBodyTemplate()}
</div>
</form>`;this.setTemplate(n,e),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.providedFilterParams=e,this.applyActive=to.isUseApplyButton(e),this.createButtonPanel()}createButtonPanel(){const{buttons:e}=this.providedFilterParams;if(!e||e.length<1||this.isReadOnly())return;const t=document.createElement("div");t.classList.add("ag-filter-apply-panel");const n=s=>{let o,r;switch(s){case"apply":o=this.translate("applyFilter"),r=c=>this.onBtApply(!1,!1,c);break;case"clear":o=this.translate("clearFilter"),r=()=>this.onBtClear();break;case"reset":o=this.translate("resetFilter"),r=()=>this.onBtReset();break;case"cancel":o=this.translate("cancelFilter"),r=c=>{this.onBtCancel(c)};break;default:console.warn("AG Grid: Unknown button type specified");return}const l=Ui(`<button
type="${s==="apply"?"submit":"button"}"
ref="${s}FilterButton"
class="ag-button ag-standard-button ag-filter-apply-panel-button"
>${o}
</button>`);t.appendChild(l),this.addManagedListener(l,"click",r)};ew(e).forEach(s=>n(s)),this.getGui().appendChild(t)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const e=to.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),t=xo(this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.providedFilterParams.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const n=()=>{this.onUiChanged(!1,"prevent"),t==null||t()};e!=null?this.setModelIntoUi(e).then(n):this.resetUiToDefaults().then(n)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const n=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(n,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,n){n&&n.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t});const{closeOnApply:s}=this.providedFilterParams;s&&this.applyActive&&!e&&!t&&this.close(n)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,n=t&&t.key;let s;(n==="Enter"||n==="Space")&&(s={keyboardEvent:t}),this.hidePopup(s),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const n=this.isModelValid(this.getModelFromUi());Lc(this.getRefElement("applyFilterButton"),!n)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){if(!this.positionableFeature||e==="toolPanel")return;const t=e==="floatingFilter",{positionableFeature:n,gridOptionsService:s}=this;t?(n.restoreLastSize(),n.setResizable(s.is("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}static getDebounceMs(e,t){return to.isUseApplyButton(e)?(e.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):e.debounceMs!=null?e.debounceMs:t}static isUseApplyButton(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),super.destroy()}translate(e){return this.localeService.getLocaleTextFunc()(e,_A[e])}getCellValue(e){const{api:t,colDef:n,column:s,columnApi:o,context:r}=this.providedFilterParams;return this.providedFilterParams.valueGetter({api:t,colDef:n,column:s,columnApi:o,context:r,data:e.data,getValue:a=>e.data[a],node:e})}getPositionableElement(){return this.eFilterBody}}ow([W("rowModel")],to.prototype,"rowModel",void 0);ow([Ae("eFilterBody")],to.prototype,"eFilterBody",void 0);ow([Re],to.prototype,"postConstruct",null);var Vk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class rw extends Qe{constructor(e,t){super(t),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:s}=this.config;e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){Zn(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(mt(this.eLabel,!1),Gi(this.eLabel,"presentation")):(mt(this.eLabel,!0),Gi(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.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:(_h(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return Lc(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}}Vk([Re],rw.prototype,"postConstruct",null);class Lo extends rw{constructor(e,t,n){super(e,t),this.className=n}postConstruct(){super.postConstruct(),this.className&&this.addCssClass(this.className)}onValueChange(e){return this.addManagedListener(this,Lo.EVENT_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _s(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.dispatchEvent({type:Lo.EVENT_CHANGED}),this)}}Lo.EVENT_CHANGED="valueChange";var em=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class xh extends Lo{constructor(e,t,n,s){super(e,`<div class="ag-picker-field" role="presentation">
<div ref="eLabel"></div>
<div ref="eWrapper"
class="ag-wrapper ag-picker-field-wrapper"
tabIndex="-1"
aria-expanded="false"
${s?`role="${s}"`:""}
>
<div ref="eDisplayField" class="ag-picker-field-display"></div>
<div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>
</div>
</div>`,t),this.pickerIcon=n,this.isPickerDisplayed=!1,this.isDestroyingPicker=!1,this.skipClick=!1}postConstruct(){super.postConstruct();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e),Kx(this.eWrapper,e);const t=()=>{if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.pickerComponent=this.showPicker())},n=this.getGui();if(this.addManagedListener(n,"mousedown",s=>{!this.skipClick&&this.pickerComponent&&this.pickerComponent.isAlive()&&Er(this.pickerComponent.getGui())&&n.contains(s.target)&&(this.skipClick=!0)}),this.addManagedListener(n,"keydown",s=>{switch(s.key){case ge.UP:case ge.DOWN:case ge.ENTER:case ge.SPACE:t();case ge.ESCAPE:this.isPickerDisplayed&&s.preventDefault();break}}),this.addManagedListener(this.eWrapper,"click",t),this.addManagedListener(this.eLabel,"click",t),this.pickerIcon){const s=gi(this.pickerIcon,this.gridOptionsService);s&&this.eIcon.appendChild(s)}}refreshLabel(){ye(this.getLabel())?Kg(this.eWrapper,this.getLabelId()):this.eWrapper.removeAttribute("aria-labelledby"),super.refreshLabel()}setAriaLabel(e){return pa(this.eWrapper,e),this}setInputWidth(e){return _h(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}}em([Ae("eLabel")],xh.prototype,"eLabel",void 0);em([Ae("eWrapper")],xh.prototype,"eWrapper",void 0);em([Ae("eDisplayField")],xh.prototype,"eDisplayField",void 0);em([Ae("eIcon")],xh.prototype,"eIcon",void 0);var Gk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ar extends Qe{constructor(e="default"){super(`<div class="ag-list ag-${e}-list" role="listbox"></div>`),this.cssIdentifier=e,this.options=[],this.itemEls=[]}init(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))}handleKeyDown(e){const t=e.key;switch(t){case ge.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case ge.DOWN:case ge.UP:const n=t===ge.DOWN;let s;if(e.preventDefault(),!this.highlightedEl)s=this.itemEls[n?0:this.itemEls.length-1];else{let r=this.itemEls.indexOf(this.highlightedEl)+(n?1:-1);r=Math.min(Math.max(r,0),this.itemEls.length-1),s=this.itemEls[r]}this.highlightItem(s);break}}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:n}=e,s=Mo(n||t);return this.options.push({value:t,text:s}),this.renderOption(t,s),this.updateIndices(),this}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,n)=>{Nb(t,n+1),Fb(t,e.length)})}renderOption(e,t){const n=document.createElement("div");Gi(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`),n.innerHTML=`<span>${t}</span>`,n.tabIndex=-1,this.itemEls.push(n),this.addManagedListener(n,"mouseover",()=>this.highlightItem(n)),this.addManagedListener(n,"mouseleave",()=>this.clearHighlighted()),this.addManagedListener(n,"click",()=>this.setValue(e)),this.getGui().appendChild(n)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(),this;const n=this.options.findIndex(s=>s.value===e);if(n!==-1){const s=this.options[n];this.value=s.value,this.displayValue=s.text!=null?s.text:s.value,this.highlightItem(this.itemEls[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.itemEls[e])}reset(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()}highlightItem(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(ar.ACTIVE_CLASS),Mc(this.highlightedEl,!0),this.highlightedEl.focus())}clearHighlighted(){!this.highlightedEl||!this.highlightedEl.offsetParent||(this.highlightedEl.classList.remove(ar.ACTIVE_CLASS),Mc(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:Lo.EVENT_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:ar.EVENT_ITEM_SELECTED})}}ar.EVENT_ITEM_SELECTED="selectedItem";ar.ACTIVE_CLASS="ag-active-item";Gk([Re],ar.prototype,"init",null);var xA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class va extends xh{constructor(e){super(e,"ag-select","smallDown","listbox")}init(){this.listComponent=this.createBean(new ar("select")),this.listComponent.setParentComponent(this),this.eWrapper.tabIndex=0,this.listComponent.addManagedListener(this.listComponent,ar.EVENT_ITEM_SELECTED,()=>{this.hideList&&this.hideList(),this.dispatchEvent({type:va.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,Lo.EVENT_CHANGED,()=>{this.setValue(this.listComponent.getValue(),!1,!0),this.hideList&&this.hideList()})}showPicker(){const e=this.listComponent.getGui(),t=this.gridOptionsService.getDocument(),n=this.addManagedListener(t.body,"wheel",a=>{!e.contains(a.target)&&this.hideList&&this.hideList()}),s=this.addManagedListener(e,"focusout",a=>{!e.contains(a.relatedTarget)&&this.hideList&&this.hideList()}),o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,closedCallback:()=>{this.hideList=null,this.isPickerDisplayed=!1,s(),n(),this.isAlive()&&(Ks(this.eWrapper,!1),this.getFocusableElement().focus())},ariaLabel:o("ariaLabelSelectField","Select Field")});return r&&(this.hideList=r.hideFunc),this.isPickerDisplayed=!0,_h(e,Jg(this.eWrapper)),Ks(this.eWrapper,!0),e.style.maxHeight=Eh(this.popupService.getPopupParent())+"px",e.style.position="absolute",this.popupService.positionPopupByComponent({type:"ag-list",eventSource:this.eWrapper,ePopup:e,position:"under",keepWithinBounds:!0}),this.listComponent.refreshHighlighted(),this.listComponent}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}setValue(e,t,n){return this.value===e?this:(n||this.listComponent.setValue(e,!0),this.listComponent.getValue()===this.getValue()?this:(this.eDisplayField.innerHTML=this.listComponent.getDisplayValue(),super.setValue(e,t)))}destroy(){this.hideList&&this.hideList(),this.destroyBean(this.listComponent),super.destroy()}}va.EVENT_ITEM_SELECTED="selectedItem";xA([W("popupService")],va.prototype,"popupService",void 0);xA([Re],va.prototype,"init",null);var aw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Ys extends Lo{constructor(e,t,n="text",s="input"){super(e,`
<div role="presentation">
<div ref="eLabel" class="ag-input-field-label"></div>
<div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">
<${s} ref="eInput" class="ag-input-field-input"></${s}>
</div>
</div>`,t),this.inputType=n,this.displayFieldTag=s}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{width:e,value:t}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),this.addInputListeners(),this.activateTabIndex([this.eInput])}refreshLabel(){ye(this.getLabel())?Kg(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),super.refreshLabel()}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return _h(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 Zr(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return pa(this.eInput,e),this}setDisabled(e){return Lc(this.eInput,e),super.setDisabled(e)}}aw([Ae("eLabel")],Ys.prototype,"eLabel",void 0);aw([Ae("eWrapper")],Ys.prototype,"eWrapper",void 0);aw([Ae("eInput")],Ys.prototype,"eInput",void 0);class sa extends Ys{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(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){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,t,n){this.dispatchEvent({type:sa.EVENT_CHANGED,selected:e,previousValue:t,event:n});const s=this.getInputElement(),o={type:N.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:t};this.eventService.dispatchEvent(o)}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){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)}}class AA extends sa{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.addManagedListener(this.eventService,N.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}}class lw{constructor(e,t){this.localeService=e,this.optionsFactory=t}getModelAsString(e){if(!e)return null;const t=e.operator!=null,n=this.localeService.getLocaleTextFunc();if(t){const s=e;let{conditions:o}=s;if(!o){const{condition1:l,condition2:c}=s;o=[l,c]}const r=o.map(l=>this.getModelAsString(l)),a=s.operator==="AND"?"andCondition":"orCondition";return r.join(` ${n(a,_A[a])} `)}else{if(e.type===at.BLANK||e.type===at.NOT_BLANK)return n(e.type,e.type);{const s=e,o=this.optionsFactory.getCustomOption(s.type),{displayKey:r,displayName:a,numberOfInputs:l}=o||{};return r&&a&&l===0?(n(r,a),a):this.conditionToString(s,o)}}}}class at extends to{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(e){const t=this.optionsFactory.getCustomOption(e);if(t){const{numberOfInputs:s}=t;return s??1}const n=[at.EMPTY,at.NOT_BLANK,at.BLANK];return e&&n.indexOf(e)>=0?0:e===at.IN_RANGE?2:1}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{n===0?t.setValue(e,!0):t.setValue(this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"}areModelsEqual(e,t){if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;const n=!e.operator,s=!t.operator;if(!n&&s||n&&!s)return!1;let r;if(n){const a=e,l=t;r=this.areSimpleModelsEqual(a,l)}else{const a=e,l=t;r=a.operator===l.operator&&Ur(a.conditions,l.conditions,(c,u)=>this.areSimpleModelsEqual(c,u))}return r}setModelIntoUi(e){if(e.operator){let n=e;n.conditions||(n.conditions=[n.condition1,n.condition2]);const s=this.validateAndUpdateConditions(n.conditions),o=this.getNumConditions();if(s<o)this.removeConditionsAndOperators(s);else if(s>o)for(let a=o;a<s;a++)this.createJoinOperatorPanel(),this.createOption();const r=n.operator==="OR";this.eJoinOperatorsAnd.forEach(a=>a.setValue(!r,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(r,!0)),n.conditions.forEach((a,l)=>{this.eTypes[l].setValue(a.type,!0),this.setConditionIntoUi(a,l)})}else{const n=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(n.type,!0),this.setConditionIntoUi(n,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),vn.resolve()}validateAndUpdateConditions(e){let t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),yt(()=>console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),"simpleFilterSetModelMaxNumConditions"),t=this.maxNumConditions),t}doesFilterPass(e){var t;const n=this.getModel();if(n==null)return!0;const{operator:s}=n,o=[];if(s){const a=n;o.push(...(t=a.conditions)!==null&&t!==void 0?t:[])}else o.push(n);return o[s&&s==="OR"?"some":"every"](a=>this.individualConditionPasses(e,a))}setParams(e){super.setParams(e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new EA,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators()}setNumConditions(e){var t,n;e.suppressAndOrCondition!=null&&yt(()=>console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),"simpleFilterSuppressAndOrCondition"),e.alwaysShowBothConditions!=null&&yt(()=>console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),"simpleFilterAlwaysShowBothConditions"),this.maxNumConditions=(t=e.maxNumConditions)!==null&&t!==void 0?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(yt(()=>console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.'),"simpleFilterMaxNumConditions"),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(n=e.numAlwaysVisibleConditions)!==null&&n!==void 0?n:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(yt(()=>console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),"simpleFilterNumAlwaysVisibleConditions"),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(yt(()=>console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),"simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions"),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const e=this.createManagedBean(new va);this.eTypes.push(e),e.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(e.getGui());const t=this.createValueElement();this.eConditionBodies.push(t),this.eFilterBody.appendChild(t),this.putOptionsIntoDropdown(e),this.resetType(e);const n=this.getNumConditions()-1;this.forEachPositionInput(n,s=>this.resetInput(s)),this.addChangedListeners(e,n)}createJoinOperatorPanel(){const e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");const t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),n=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);const s=this.eJoinOperatorPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(t,s,o),this.resetJoinOperatorOr(n,s,o),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){const s=this.createManagedBean(new AA);return e.push(s),s.addCssClass("ag-filter-condition-operator"),s.addCssClass(`ag-filter-condition-operator-${n}`),t.appendChild(s.getGui()),s}getDefaultJoinOperator(e){return e==="AND"||e==="OR"?e:"AND"}createFilterListOptions(){const e=this.optionsFactory.getFilterOptions();this.filterListOptions=e.map(t=>typeof t=="string"?this.createBoilerplateListOption(t):this.createCustomListOption(t))}putOptionsIntoDropdown(e){this.filterListOptions.forEach(t=>{e.addOption(t)}),e.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.localeService.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){var e;let t=-1,n=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?t=s:n=!1;if(this.shouldAddNewConditionAtEnd(n))this.createJoinOperatorPanel(),this.createOption();else{const s=(e=this.lastUiCompletePosition)!==null&&e!==void 0?e:this.getNumConditions()-2;if(t<s){this.removeConditionsAndOperators(s+1);const o=t+1,r=s-o;r>0&&this.removeConditionsAndOperators(o,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((s,o)=>{const r=this.isConditionDisabled(o,e);s.setDisabled(r||this.filterListOptions.length<=1),o===1&&(Lc(this.eJoinOperatorPanels[0],r),this.eJoinOperatorsAnd[0].setDisabled(r),this.eJoinOperatorsOr[0].setDisabled(r))}),this.eConditionBodies.forEach((s,o)=>{mt(s,this.isConditionBodyVisible(o))});const n=(t??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach((s,o)=>{s.setValue(!n,!0)}),this.eJoinOperatorsOr.forEach((s,o)=>{s.setValue(n,!0)}),this.forEachInput((s,o,r,a)=>{this.setElementDisplayed(s,o<a),this.setElementDisabled(s,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);const n=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,n,t),this.removeComponents(this.eJoinOperatorsAnd,n,t),this.removeComponents(this.eJoinOperatorsOr,n,t)}removeElements(e,t,n){this.removeItems(e,t,n).forEach(o=>or(o))}removeComponents(e,t,n){this.removeItems(e,t,n).forEach(o=>{or(o.getGui()),this.destroyBean(o)})}removeItems(e,t,n){return n==null?e.splice(t):e.splice(t,n)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e||!e.suppressFocus&&!this.isReadOnly()){const t=this.getInputs(0)[0];if(!t)return;t instanceof Ys&&t.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const e=this.getModel();(!this.areModelsEqual(e,this.getModelFromUi())||this.hasInvalidInputs())&&this.resetUiToActiveModel(e);let t=-1,n=-1,s=!1;const o=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))t===-1&&(t=a,n=a);else{const l=a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1),c=a<t;(l||c)&&(this.removeConditionsAndOperators(a,1),s=!0,c&&n--)}let r=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),r=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),r=!0),r&&this.updateConditionStatusesAndValues(n,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getPlaceholderText(e,t){let n=this.translate(e);if(Ug(this.filterPlaceholder)){const s=this.filterPlaceholder,o=this.eTypes[t].getValue(),r=this.translate(o);n=s({filterOptionKey:o,filterOption:r,placeholder:n})}else typeof this.filterPlaceholder=="string"&&(n=this.filterPlaceholder);return n}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc();this.forEachInput((t,n,s,o)=>{if(!(t instanceof Ys))return;const r=n===0&&o>1?"inRangeStart":n===0?"filterOoo":"inRangeEnd",a=n===0&&o>1?e("ariaFilterFromValue","Filter from value"):n===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(r,s)),t.setInputAriaLabel(a)})}setElementValue(e,t){e instanceof Ys&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){e instanceof Qe&&mt(e.getGui(),t)}setElementDisabled(e,t){e instanceof Qe&&Lc(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ys&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){const n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){const s=this.getNumberOfInputs(t),o=this.getInputs(e);for(let r=0;r<o.length;r++){const a=o[r];a!=null&&n(a,r,e,s)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return this.getNumberOfInputs(t)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)===at.EMPTY||this.getValues(e).some(n=>n==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinOperatorsAnd.forEach((t,n)=>this.resetJoinOperatorAnd(t,n,this.joinOperatorId+n)),this.eJoinOperatorsOr.forEach((t,n)=>this.resetJoinOperatorOr(t,n,this.joinOperatorId+n)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,e||this.onUiChanged(),vn.resolve()}resetType(e){const n=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.isDefaultOperator("AND"),this.translate("andCondition"),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.isDefaultOperator("OR"),this.translate("orCondition"),n)}resetJoinOperator(e,t,n,s,o){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),t)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t)),this.eJoinOperatorsOr.forEach((e,t)=>this.updateJoinOperatorDisabled(e,t))}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const n=this.mapValuesFromModel(e);this.forEachInput((s,o,r,a)=>{r===t&&this.setElementValue(s,n[o]!=null?n[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,n,s,o)=>{this.setElementValue(t,n===0&&s===0?e:null)})}isDefaultOperator(e){return e===this.defaultJoinOperator}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,n=>{this.attachElementOnChange(n,this.listener)}))}individualConditionPasses(e,t){const n=this.getCellValue(e.node),s=this.mapValuesFromModel(t),o=this.optionsFactory.getCustomOption(t.type),r=this.evaluateCustomFilter(o,s,n);return r??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,n,t,e))}evaluateCustomFilter(e,t,n){if(e==null)return;const{predicate:s}=e;if(s!=null&&!t.some(o=>o==null))return s(t,n)}isBlank(e){return e==null||typeof e=="string"&&e.trim().length===0}hasInvalidInputs(){return!1}}at.EMPTY="empty";at.BLANK="blank";at.NOT_BLANK="notBlank";at.EQUALS="equals";at.NOT_EQUAL="notEqual";at.LESS_THAN="lessThan";at.LESS_THAN_OR_EQUAL="lessThanOrEqual";at.GREATER_THAN="greaterThan";at.GREATER_THAN_OR_EQUAL="greaterThanOrEqual";at.IN_RANGE="inRange";at.CONTAINS="contains";at.NOT_CONTAINS="notContains";at.STARTS_WITH="startsWith";at.ENDS_WITH="endsWith";class gt extends at{setParams(e){super.setParams(e),this.scalarFilterParams=e}evaluateNullValue(e){switch(e){case gt.EQUALS:case gt.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case gt.GREATER_THAN:case gt.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case gt.LESS_THAN:case gt.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case gt.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case gt.BLANK:return!0;case gt.NOT_BLANK:return!1}return!1}evaluateNonNullValue(e,t,n){const s=this.comparator(),o=e[0]!=null?s(e[0],t):0;switch(n.type){case gt.EQUALS:return o===0;case gt.NOT_EQUAL:return o!==0;case gt.GREATER_THAN:return o>0;case gt.GREATER_THAN_OR_EQUAL:return o>=0;case gt.LESS_THAN:return o<0;case gt.LESS_THAN_OR_EQUAL:return o<=0;case gt.IN_RANGE:{const r=s(e[1],t);return this.scalarFilterParams.inRangeInclusive?o>=0&&r<=0:o>0&&r<0}case gt.BLANK:return this.isBlank(t);case gt.NOT_BLANK:return!this.isBlank(t);default:return console.warn('AG Grid: Unexpected type of filter "'+n.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}}var Hk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const s_=1e3,o_=1/0;class DA extends lw{constructor(e,t,n){super(t,n),this.dateFilterParams=e}conditionToString(e,t){const{type:n}=e,{numberOfInputs:s}=t||{},o=n==at.IN_RANGE||s===2,r=ro(e.dateFrom),a=ro(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(o){const c=r!==null?pp(r,l):"null",u=a!==null?pp(a,l):"null";return`${c}-${u}`}return r!=null?pp(r,l):`${n}`}}class iu extends gt{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=s_,this.maxValidYear=o_}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}mapValuesFromModel(e){const{dateFrom:t,dateTo:n,type:s}=e||{};return[t&&ro(t)||null,n&&ro(n)||null].slice(0,this.getNumberOfInputs(s))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(e,t){const n=t;return t==null||n<e?-1:n>e?1:0}setParams(e){this.dateFilterParams=e,super.setParams(e);const t=(n,s)=>{if(e[n]!=null)if(isNaN(e[n]))console.warn(`AG Grid: DateFilter ${n} is not a number`);else return e[n]==null?s:Number(e[n]);return s};this.minValidYear=t("minValidYear",s_),this.maxValidYear=t("maxValidYear",o_),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.filterModelFormatter=new DA(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(e){const t=new SA(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},e);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}getDefaultFilterOptions(){return iu.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,n,s){const o=document.createElement("div");o.classList.add(`ag-filter-${s}`),o.classList.add(`ag-filter-date-${s}`),t.push(o),e.appendChild(o),n.push(this.createDateCompWrapper(o))}removeValueElements(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){this.removeItems(e,t,n).forEach(o=>o.destroy())}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;const t=s=>s!=null&&s.getUTCFullYear()>=this.minValidYear&&s.getUTCFullYear()<=this.maxValidYear;let n=!0;return this.forEachInput((s,o,r,a)=>{r!==e||!n||o>=a||(n=n&&t(s.getDate()))}),n}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}getFilterType(){return"date"}createCondition(e){const t=this.getConditionType(e),n={},s=this.getValues(e);return s.length>0&&(n.dateFrom=Es(s[0])),s.length>1&&(n.dateTo=Es(s[1])),Object.assign({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},n)}resetPlaceholder(){const e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),n=e("ariaFilterValue","Filter Value");this.forEachInput(s=>{s.setInputPlaceholder(t),s.setInputAriaLabel(n)})}getInputs(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{s<r&&t.push(n.getDate())}),t}getModelAsString(e){var t;return(t=this.filterModelFormatter.getModelAsString(e))!==null&&t!==void 0?t:""}}iu.DEFAULT_FILTER_OPTIONS=[gt.EQUALS,gt.GREATER_THAN,gt.LESS_THAN,gt.NOT_EQUAL,gt.IN_RANGE,gt.BLANK,gt.NOT_BLANK];Hk([W("userComponentFactory")],iu.prototype,"userComponentFactory",void 0);class OA extends Qe{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e==null?void 0:e.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.getDefaultOption();return}const t=e.operator;let n;t?n=e.conditions[0]:n=e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const n=e;return this.isTypeEditable(n.type)}init(e){this.optionsFactory=new EA,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),this.lastType=this.optionsFactory.getDefaultOption(),this.readOnly=!!e.filterParams.readOnly;const t=this.isTypeEditable(this.lastType);this.setEditable(t)}doesFilterHaveSingleInput(e){const t=this.optionsFactory.getCustomOption(e),{numberOfInputs:n}=t||{};return n==null||n==1}isTypeEditable(e){const t=[at.IN_RANGE,at.EMPTY,at.BLANK,at.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&t.indexOf(e)<0}}var cw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class tm extends OA{constructor(){super(`
<div class="ag-floating-filter-input" role="presentation">
<ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>
<div ref="eDateWrapper" style="display: flex;"></div>
</div>`)}getDefaultFilterOptions(){return iu.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent();const t=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input")),this.filterModelFormatter=new DA(this.filterParams,this.localeService,this.optionsFactory)}setEditable(e){mt(this.eDateWrapper,e),mt(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,t){if(this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t))return;super.setLastTypeFromModel(e);const n=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(n),n){if(e){const s=e;this.dateComp.setDate(ro(s.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}onDateChanged(){const e=this.dateComp.getDate(),t=Es(e);this.params.parentFilterInstance(n=>{if(n){const s=ro(t);n.onFloatingFilterChanged(this.getLastType()||null,s)}})}createDateComponent(){const e=to.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),t={onDateChanged:xo(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams};this.dateComp=new SA(this.getContext(),this.userComponentFactory,t,this.eDateWrapper),this.addDestroyFunc(()=>this.dateComp.destroy())}getFilterModelFormatter(){return this.filterModelFormatter}}cw([W("userComponentFactory")],tm.prototype,"userComponentFactory",void 0);cw([Ae("eReadOnlyText")],tm.prototype,"eReadOnlyText",void 0);cw([Ae("eDateWrapper")],tm.prototype,"eDateWrapper",void 0);var Bk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class PA extends Qe{constructor(){super(`
<div class="ag-filter-filter">
<ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>
</div>`)}destroy(){super.destroy()}init(e){const t=this.gridOptionsService.getDocument(),n=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);s&&(n.type="date");const o=s&&xs();this.addManagedListener(n,"mousedown",()=>{this.eDateInput.isDisabled()||o||n.focus()}),this.addManagedListener(n,"input",l=>{l.target===t.activeElement&&(this.eDateInput.isDisabled()||e.onDateChanged())});const{minValidYear:r,maxValidYear:a}=e.filterParams||{};r&&(n.min=`${r}-01-01`),a&&(n.max=`${a}-12-31`)}getDate(){return ro(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue(Es(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()}shouldUseBrowserDatePicker(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:Xg()||Hb()||xs()&&Gb()>=14.1}}Bk([Ae("eDateInput")],PA.prototype,"eDateInput",void 0);class Dl extends Ys{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=super.setValue(e,t);return this.eInput.value!==e&&(this.eInput.value=ye(e)?e:""),n}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=n=>{Zb(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListener(this.eInput,"keydown",t),this.addManagedListener(this.eInput,"paste",n=>{var s;const o=(s=n.clipboardData)===null||s===void 0?void 0:s.getData("text");o&&o.split("").some(r=>!e.test(r))&&n.preventDefault()})}}class uw extends Dl{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const e=parseFloat(this.eInput.value),t=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==t&&this.setValue(t)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"}onWheel(e){document.activeElement===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e);return this.min!=null&&t<this.min?e=this.min.toString():this.max!=null&&t>this.max&&(e=this.max.toString()),e}adjustPrecision(e,t){if(this.precision==null)return e;if(t){const s=parseFloat(e).toFixed(this.precision);return parseFloat(s).toString()}const n=String(e).split(".");if(n.length>1){if(n[1].length<=this.precision)return e;if(this.precision>0)return`${n[0]}.${n[1].slice(0,this.precision)}`}return n[0]}setMin(e){return this.min===e?this:(this.min=e,Zr(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Zr(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Zr(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(ye(n)){let s=this.isScientificNotation(n);if(s&&this.eInput.validity.valid)return e(n);if(!s){n=this.adjustPrecision(n);const o=this.normalizeValue(n);s=n!=o}if(s)return t(n)}return e(n)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}}class IA extends lw{conditionToString(e,t){const{numberOfInputs:n}=t||{};return e.type==at.IN_RANGE||n===2?`${e.filter}-${e.filterTo}`:e.filter!=null?`${e.filter}`:`${e.type}`}}function MA(i){const{allowedCharPattern:e}=i??{};return e??null}class Ah extends gt{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}mapValuesFromModel(e){const{filter:t,filterTo:n,type:s}=e||{};return[this.processValue(t),this.processValue(n)].slice(0,this.getNumberOfInputs(s))}getDefaultDebounceMs(){return 500}comparator(){return(e,t)=>e===t?0:e<t?1:-1}setParams(e){this.numberFilterParams=e,super.setParams(e),this.filterModelFormatter=new IA(this.localeService,this.optionsFactory)}getDefaultFilterOptions(){return Ah.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=MA(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),Gi(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,n,s){const o=this.createManagedBean(s?new Dl({allowedCharPattern:s}):new uw);o.addCssClass(`ag-filter-${n}`),o.addCssClass("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{s<r&&t.push(this.processValue(this.stringToFloat(n.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getFilterType(){return"number"}processValue(e){return e==null||isNaN(e)?null:e}stringToFloat(e){if(typeof e=="number")return e;let t=Qr(e);return t!=null&&t.trim()===""&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):t==null||t.trim()==="-"?null:parseFloat(t)}createCondition(e){const t=this.getConditionType(e),n={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getModelAsString(e){var t;return(t=this.filterModelFormatter.getModelAsString(e))!==null&&t!==void 0?t:""}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{if(!t.getInputElement().validity.valid){e=!0;return}}),e}}Ah.DEFAULT_FILTER_OPTIONS=[gt.EQUALS,gt.NOT_EQUAL,gt.LESS_THAN,gt.LESS_THAN_OR_EQUAL,gt.GREATER_THAN,gt.GREATER_THAN_OR_EQUAL,gt.IN_RANGE,gt.BLANK,gt.NOT_BLANK];class LA extends lw{conditionToString(e,t){const{numberOfInputs:n}=t||{};return e.type==at.IN_RANGE||n===2?`${e.filter}-${e.filterTo}`:e.filter!=null?`${e.filter}`:`${e.type}`}}class Ti extends at{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(e){const t=e&&e.trim();return t===""?e:t}getDefaultDebounceMs(){return 500}setParams(e){this.textFilterParams=e,super.setParams(e),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?Ti.DEFAULT_FORMATTER:Ti.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new LA(this.localeService,this.optionsFactory)}getTextMatcher(){const e=this.textFilterParams.textCustomComparator;return e?(ze.doOnce(()=>console.warn("AG Grid - textCustomComparator is deprecated, use textMatcher instead."),"textCustomComparator.deprecated"),({filterOption:t,value:n,filterText:s})=>e(t,n,s)):this.textFilterParams.textMatcher||Ti.DEFAULT_MATCHER}createCondition(e){const t=this.getConditionType(e),n={filterType:this.getFilterType(),type:t},s=this.getValues(e);return s.length>0&&(n.filter=s[0]),s.length>1&&(n.filterTo=s[1]),n}getFilterType(){return"text"}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(n,s,o,r)=>{if(s<r){const a=Qr(n.getValue()),l=(this.textFilterParams.trimInput?Ti.trimInput(a):a)||null;t.push(l),n.setValue(l,!0)}}),t}getDefaultFilterOptions(){return Ti.DEFAULT_FILTER_OPTIONS}createValueElement(){const e=document.createElement("div");return e.classList.add("ag-filter-body"),Gi(e,"presentation"),this.createFromToElement(e,this.eValuesFrom,"from"),this.createFromToElement(e,this.eValuesTo,"to"),e}createFromToElement(e,t,n){const s=this.createManagedBean(new Dl);s.addCssClass(`ag-filter-${n}`),s.addCssClass("ag-filter-filter"),t.push(s),e.appendChild(s.getGui())}removeValueElements(e,t){this.removeComponents(this.eValuesFrom,e,t),this.removeComponents(this.eValuesTo,e,t)}mapValuesFromModel(e){const{filter:t,filterTo:n,type:s}=e||{};return[t||null,n||null].slice(0,this.getNumberOfInputs(s))}evaluateNullValue(e){const t=[at.NOT_EQUAL,at.NOT_CONTAINS,at.BLANK];return e?t.indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,s){const o=e.map(g=>this.formatter(g))||[],r=this.formatter(t),{api:a,colDef:l,column:c,columnApi:u,context:d,textFormatter:h}=this.textFilterParams;if(n.type===at.BLANK)return this.isBlank(t);if(n.type===at.NOT_BLANK)return!this.isBlank(t);const f={api:a,colDef:l,column:c,columnApi:u,context:d,node:s.node,data:s.data,filterOption:n.type,value:r,textFormatter:h};return o.some(g=>this.matcher(Object.assign(Object.assign({},f),{filterText:g})))}getModelAsString(e){var t;return(t=this.filterModelFormatter.getModelAsString(e))!==null&&t!==void 0?t:""}}Ti.DEFAULT_FILTER_OPTIONS=[at.CONTAINS,at.NOT_CONTAINS,at.EQUALS,at.NOT_EQUAL,at.STARTS_WITH,at.ENDS_WITH,at.BLANK,at.NOT_BLANK];Ti.DEFAULT_FORMATTER=i=>i;Ti.DEFAULT_LOWERCASE_FORMATTER=i=>i==null?null:i.toString().toLowerCase();Ti.DEFAULT_MATCHER=({filterOption:i,value:e,filterText:t})=>{if(t==null)return!1;switch(i){case Ti.CONTAINS:return e.indexOf(t)>=0;case Ti.NOT_CONTAINS:return e.indexOf(t)<0;case Ti.EQUALS:return e===t;case Ti.NOT_EQUAL:return e!=t;case Ti.STARTS_WITH:return e.indexOf(t)===0;case Ti.ENDS_WITH:const n=e.lastIndexOf(t);return n>=0&&n===e.length-t.length;default:return!1}};var dw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class FA extends be{constructor(e){super(),this.params=e}setupGui(e){this.eFloatingFilterTextInput=this.createManagedBean(new Dl(this.params.config)),this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel),e.appendChild(this.eFloatingFilterTextInput.getGui())}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,t){this.eFloatingFilterTextInput.setValue(e,t)}addValueChangedListener(e){const t=this.eFloatingFilterTextInput.getGui();this.addManagedListener(t,"input",e),this.addManagedListener(t,"keydown",e)}}class Dh extends OA{postConstruct(){this.setTemplate(`
<div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>
`)}getDefaultDebounceMs(){return 500}onParentModelChanged(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.params=e;const t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),n=this.localeService.getLocaleTextFunc(),s=`${t} ${n("ariaFilterInput","Filter Input")}`;if(this.floatingFilterInputService=this.createFloatingFilterInputService(s),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer),super.init(e),this.applyActive=to.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const o=to.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),r=xo(this.syncUpWithParentFilter.bind(this),o);this.floatingFilterInputService.addValueChangedListener(r)}}syncUpWithParentFilter(e){const t=e.key===ge.ENTER;if(this.applyActive&&!t)return;let n=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(n=Ti.trimInput(n),this.floatingFilterInputService.setValue(n,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,n||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}}dw([W("columnModel")],Dh.prototype,"columnModel",void 0);dw([Ae("eFloatingFilterInputContainer")],Dh.prototype,"eFloatingFilterInputContainer",void 0);dw([Re],Dh.prototype,"postConstruct",null);class Wk extends be{constructor(e){super(),this.params=e,this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new uw),this.eFloatingFilterTextInput=this.createManagedBean(new Dl),this.eFloatingFilterTextInput.setDisabled(!0),this.eFloatingFilterNumberInput.setInputAriaLabel(this.params.ariaLabel),this.eFloatingFilterTextInput.setInputAriaLabel(this.params.ariaLabel),e.appendChild(this.eFloatingFilterNumberInput.getGui()),e.appendChild(this.eFloatingFilterTextInput.getGui())}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}addValueChangedListener(e){this.setupListeners(this.eFloatingFilterNumberInput.getGui(),e),this.setupListeners(this.eFloatingFilterTextInput.getGui(),e)}setupListeners(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)}}class Uk extends Dh{init(e){super.init(e),this.filterModelFormatter=new IA(this.localeService,this.optionsFactory)}getDefaultFilterOptions(){return Ah.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){const t=MA(this.params.filterParams);return t?this.createManagedBean(new FA({config:{allowedCharPattern:t},ariaLabel:e})):this.createManagedBean(new Wk({ariaLabel:e}))}}class jk extends Dh{init(e){super.init(e),this.filterModelFormatter=new LA(this.localeService,this.optionsFactory)}getDefaultFilterOptions(){return Ti.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.createManagedBean(new FA({ariaLabel:e}))}}class li{constructor(e,t=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new oo,this.eElement=e,this.preventMouseClick=t;const n=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",n,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",n,{passive:!0}),this.eElement.removeEventListener("touchmove",s,{passive:!0}),this.eElement.removeEventListener("touchend",o,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const n=this.touchStart===t;if(this.touching&&n&&!this.moved){this.moved=!0;const s={type:li.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:e};this.eventService.dispatchEvent(s)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!Jb(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:li.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>li.DOUBLE_TAP_MILLIS){const n={type:li.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}}li.EVENT_TAP="tap";li.EVENT_DOUBLE_TAP="doubleTap";li.EVENT_LONG_TAP="longTap";li.DOUBLE_TAP_MILLIS=500;var Ol=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ns extends Qe{constructor(e){super(),e||this.setTemplate(ns.TEMPLATE)}attachCustomElements(e,t,n,s,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=s,this.eSortNone=o}setupSort(e,t=!1){this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),this.column.getColDef().sortable&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(e,t,n){if(t==null)return;const s=gi(e,this.gridOptionsService,n);s&&t.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){const t=e==="asc";mt(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){const t=e==="desc";mt(this.eSortDesc,t,{skipAriaHidden:!0})}if(this.eSortNone){const t=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.is("unSortIcon"),n=e==null;mt(this.eSortNone,!t&&n,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const e=this.column.getColDef().showRowGroup;this.gridOptionsService.isColumnsSortingCoupledToGroup()&&e&&(this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const e=this.sortController.getDisplaySortForColumn(this.column)==="mixed";mt(this.eSortMixed,e,{skipAriaHidden:!0})}}updateSortOrder(){var e;if(!this.eSortOrder)return;const t=this.sortController.getColumnsWithSortingOrdered(),n=(e=this.sortController.getDisplaySortIndexForColumn(this.column))!==null&&e!==void 0?e:-1,s=t.some(r=>{var a;return(a=this.sortController.getDisplaySortIndexForColumn(r))!==null&&a!==void 0?a:-1>=1}),o=n>=0&&s;mt(this.eSortOrder,o,{skipAriaHidden:!0}),n>=0?this.eSortOrder.innerHTML=(n+1).toString():Zn(this.eSortOrder)}}ns.TEMPLATE=`<span class="ag-sort-indicator-container">
<span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>
<span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>
<span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>
<span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>
<span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>
</span>`;Ol([Ae("eSortOrder")],ns.prototype,"eSortOrder",void 0);Ol([Ae("eSortAsc")],ns.prototype,"eSortAsc",void 0);Ol([Ae("eSortDesc")],ns.prototype,"eSortDesc",void 0);Ol([Ae("eSortMixed")],ns.prototype,"eSortMixed",void 0);Ol([Ae("eSortNone")],ns.prototype,"eSortNone",void 0);Ol([W("columnModel")],ns.prototype,"columnModel",void 0);Ol([W("sortController")],ns.prototype,"sortController",void 0);var ss=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Ki extends Qe{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(e){return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort?!1:(this.setDisplayName(e),!0)}workOutTemplate(){let e=Ox(this.params.template,Ki.TEMPLATE);return e=e&&e.trim?e.trim():e,e}init(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)}setDisplayName(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;const t=Mo(this.currentDisplayName);this.eText&&(this.eText.innerHTML=t)}}setupIcons(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)}addInIcon(e,t,n){if(t==null)return;const s=gi(e,this.gridOptionsService,n);s&&t.appendChild(s)}setupTap(){const{gridOptionsService:e}=this;if(e.is("suppressTouch"))return;const t=new li(this.getGui(),!0),n=e.is("suppressMenuHide"),s=n&&ye(this.eMenu),o=s?new li(this.eMenu,!0):t;if(this.params.enableMenu){const r=s?"EVENT_TAP":"EVENT_LONG_TAP",a=l=>{e.api.showColumnMenuAfterMouseClick(this.params.column,l.touchStart)};this.addManagedListener(o,li[r],a)}if(this.params.enableSorting){const r=a=>{const l=a.touchStart.target;n&&this.eMenu.contains(l)||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")};this.addManagedListener(t,li.EVENT_TAP,r)}this.addDestroyFunc(()=>t.destroy()),s&&this.addDestroyFunc(()=>o.destroy())}workOutShowMenu(){const e=!this.gridOptionsService.is("suppressMenuHide"),t=ga()&&e;return this.params.enableMenu&&!t}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){or(this.eMenu);return}const e=this.gridOptionsService.is("suppressMenuHide");this.addManagedListener(this.eMenu,"click",()=>this.showMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",e)}showMenu(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new ns(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;const e=this.gridOptionsService.get("multiSortKey")==="ctrl";this.addManagedListener(this.params.column,qe.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",n=>{const s=this.params.column.isMoving(),r=new Date().getTime()-this.lastMovingChanged<50;if(!(s||r)){const l=e?n.ctrlKey||n.metaKey:n.shiftKey;this.params.progressSort(l)}});const t=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const n=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),o=!(n==null?void 0:n.every(r=>this.params.column.getSort()==r.getSort()));this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",o)}};this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}setupFilterIcon(){this.eFilter&&(this.addManagedListener(this.params.column,qe.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())}onFilterChanged(){const e=this.params.column.isFilterActive();mt(this.eFilter,e,{skipAriaHidden:!0})}}Ki.TEMPLATE=`<div class="ag-cell-label-container" role="presentation">
<span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
<div ref="eLabel" class="ag-header-cell-label" role="presentation">
<span ref="eText" class="ag-header-cell-text"></span>
<span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>
<ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>
</div>
</div>`;ss([W("sortController")],Ki.prototype,"sortController",void 0);ss([W("menuFactory")],Ki.prototype,"menuFactory",void 0);ss([W("columnModel")],Ki.prototype,"columnModel",void 0);ss([Ae("eFilter")],Ki.prototype,"eFilter",void 0);ss([Ae("eSortIndicator")],Ki.prototype,"eSortIndicator",void 0);ss([Ae("eMenu")],Ki.prototype,"eMenu",void 0);ss([Ae("eLabel")],Ki.prototype,"eLabel",void 0);ss([Ae("eText")],Ki.prototype,"eText",void 0);ss([Ae("eSortOrder")],Ki.prototype,"eSortOrder",void 0);ss([Ae("eSortAsc")],Ki.prototype,"eSortAsc",void 0);ss([Ae("eSortDesc")],Ki.prototype,"eSortDesc",void 0);ss([Ae("eSortMixed")],Ki.prototype,"eSortMixed",void 0);ss([Ae("eSortNone")],Ki.prototype,"eSortNone",void 0);var hw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Pl extends Qe{constructor(){super(Pl.TEMPLATE)}destroy(){super.destroy()}init(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){if(this.params.template){const t="AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)";yt(()=>console.warn(t),"HeaderGroupComp.templateNotSupported")}}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const e=s=>{if(Ao(s))return;const o=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),o,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,e),this.addTouchAndClickListeners(this.eOpenIcon,e);const t=s=>{hr(s)};this.addManagedListener(this.eCloseIcon,"dblclick",t),this.addManagedListener(this.eOpenIcon,"dblclick",t),this.addManagedListener(this.getGui(),"dblclick",e),this.updateIconVisibility();const n=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(n,It.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(n,It.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(e,t){const n=new li(e,!0);this.addManagedListener(n,li.EVENT_TAP,t),this.addDestroyFunc(()=>n.destroy()),this.addManagedListener(e,"click",t)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const t=this.params.columnGroup.isExpanded();mt(this.eOpenIcon,t),mt(this.eCloseIcon,!t)}else mt(this.eOpenIcon,!1),mt(this.eCloseIcon,!1)}addInIcon(e,t){const n=gi(e,this.gridOptionsService,null);n&&this.getRefElement(t).appendChild(n)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable()){mt(this.eOpenIcon,!1),mt(this.eCloseIcon,!1);return}}setupLabel(){var e;const{displayName:t,columnGroup:n}=this.params;if(ye(t)){const s=Mo(t);this.getRefElement("agLabel").innerHTML=s}this.addOrRemoveCssClass("ag-sticky-label",!(!((e=n.getColGroupDef())===null||e===void 0)&&e.suppressStickyLabel))}}Pl.TEMPLATE=`<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">
<span ref="agLabel" class="ag-header-group-text" role="presentation"></span>
<span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>
<span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>
</div>`;hw([W("columnModel")],Pl.prototype,"columnModel",void 0);hw([Ae("agOpened")],Pl.prototype,"eOpenIcon",void 0);hw([Ae("agClosed")],Pl.prototype,"eCloseIcon",void 0);class nu extends Qe{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}}var $k=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Oh extends nu{constructor(){super(Oh.TEMPLATE)}init(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),ye(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(e){const t=e.key;(t===ge.LEFT||t===ge.UP||t===ge.RIGHT||t===ge.DOWN||e.shiftKey&&t===ge.ENTER)&&e.stopPropagation()}afterGuiAttached(){const e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const e=this.eTextArea.getValue();return!ye(e)&&!ye(this.params.value)?this.params.value:this.params.parseValue(e)}}Oh.TEMPLATE=`<div class="ag-large-text">
<ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>
</div>`;$k([Ae("eTextArea")],Oh.prototype,"eTextArea",void 0);var NA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class fw extends nu{constructor(){super('<div class="ag-cell-edit-wrapper"><ag-select class="ag-cell-editor" ref="eSelect"></ag-select></div>'),this.startedByEnter=!1}init(e){if(this.focusAfterAttached=e.cellStartedEdit,$e(e.values)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=e.eventKey!=null?e.eventKey===ge.ENTER:!1;let t=!1;e.values.forEach(n=>{const s={value:n},o=this.valueFormatterService.formatValue(e.column,null,n),r=o!=null;s.text=r?o:n,this.eSelect.addOption(s),t=t||e.value===n}),t?this.eSelect.setValue(e.value,!0):e.values.length&&this.eSelect.setValue(e.values[0],!0),this.gridOptionsService.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,va.EVENT_ITEM_SELECTED,()=>e.stopEditing())}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&this.eSelect.showPicker()}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}}NA([W("valueFormatterService")],fw.prototype,"valueFormatterService",void 0);NA([Ae("eSelect")],fw.prototype,"eSelect",void 0);var zk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Ph extends nu{constructor(e){super(`
<div class="ag-cell-edit-wrapper">
${e.getTemplate()}
</div>`),this.cellEditorInput=e}init(e){this.params=e;const t=this.eInput;this.cellEditorInput.init(t,e);let n;if(e.cellStartedEdit){this.focusAfterAttached=!0;const s=e.eventKey;s===ge.BACKSPACE||e.eventKey===ge.DELETE?n="":s&&s.length===1?n=s:(n=this.cellEditorInput.getStartValue(),s!==ge.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,n=this.cellEditorInput.getStartValue();n!=null&&t.setStartValue(n),this.addManagedListener(t.getGui(),"keydown",s=>{const{key:o}=s;(o===ge.PAGE_UP||o===ge.PAGE_DOWN)&&s.preventDefault()})}afterGuiAttached(){var e,t;const n=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(n("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;xs()||s.getFocusableElement().focus();const o=s.getInputElement();this.highlightAllOnFocus?o.select():(t=(e=this.cellEditorInput).setCaret)===null||t===void 0||t.call(e)}focusIn(){const e=this.eInput,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}}zk([Ae("eInput")],Ph.prototype,"eInput",void 0);class Kk{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,t){this.eInput=e,this.params=t,t.maxLength!=null&&e.setMaxLength(t.maxLength)}getValue(){const e=this.eInput.getValue();return!ye(e)&&!ye(this.params.value)?this.params.value:this.params.parseValue(e)}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),t=ye(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)}}class r_ extends Ph{constructor(){super(new Kk)}}var Yk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const qk="↑",Xk="↓";class Ih extends Qe{constructor(){super(Ih.TEMPLATE),this.refreshCount=0}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)}showDelta(e,t){const n=Math.abs(t),s=e.formatValue(n),o=ye(s)?s:n,r=t>=0;r?this.eDelta.innerHTML=qk+o:this.eDelta.innerHTML=Xk+o,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Zn(this.eDelta)}refresh(e){const t=e.value;if(t===this.lastValue||(ye(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:ye(e.value)?this.eValue.innerHTML=t:Zn(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof t=="number"&&typeof this.lastValue=="number"){const n=t-this.lastValue;this.showDelta(e,n)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0}}Ih.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>';Yk([W("filterManager")],Ih.prototype,"filterManager",void 0);var Qk=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Mh extends Qe{constructor(){super(Mh.TEMPLATE),this.refreshCount=0,this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=Ui('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)}refresh(e){let t=e.value;return $e(t)&&(t=""),t===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(this.addSlideAnimation(),this.lastValue=t,ye(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:ye(e.value)?this.eCurrent.innerHTML=t:Zn(this.eCurrent),!0)}}Mh.TEMPLATE=`<span>
<span class="ag-value-slide-current"></span>
</span>`;Qk([W("filterManager")],Mh.prototype,"filterManager",void 0);class xe{constructor(e){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=xe.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const n=this.data;this.data=e,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const s=this.createDataChangedEvent(e,n,t);this.dispatchLocalEvent(s)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,n){return{type:xe.EVENT_DATA_CHANGED,node:this,oldData:t,newData:e,update:n}}createLocalRowEvent(e){return{type:e,node:this}}getRowIndexString(){return this.rowPinned==="top"?"t-"+this.rowIndex:this.rowPinned==="bottom"?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const e=new xe(this.beans);return e.id=this.id,e.data=this.data,e.__daemon=!0,e.selected=this.selected,e.level=this.level,e}setDataAndId(e,t){const n=ye(this.id)?this.createDaemonNode():null,s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.beans.selectionService.syncInRowNode(this,n),this.checkRowSelectable();const o=this.createDataChangedEvent(e,s,!1);this.dispatchLocalEvent(o)}checkRowSelectable(){const e=this.beans.gridOptionsService.get("isRowSelectable");this.setRowSelectable(e?e(this):!0)}setRowSelectable(e){if(this.selectable!==e&&(this.selectable=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_SELECTABLE_CHANGED)),this.beans.gridOptionsService.is("groupSelectsChildren"))){const n=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:n??!1,source:"selectableChanged"})}}setId(e){const t=this.beans.gridOptionsService.getCallback("getRowId");if(t)if(this.data){const n=this.getGroupKeys(!0);this.id=t({data:this.data,parentKeys:n.length>0?n:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(xe.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${xe.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=e}getGroupKeys(e=!1){const t=[];let n=this;for(e&&(n=n.parent);n&&n.level>=0;)t.push(n.key),n=n.parent;return t.reverse(),t}isPixelInRange(e){return!ye(this.rowTop)||!ye(this.rowHeight)?!1:e>=this.rowTop&&e<this.rowTop+this.rowHeight}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(e){this.lastChild!==e&&(this.lastChild=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(e){this.childIndex!==e&&(this.childIndex=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_TOP_CHANGED)),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_DISPLAYED_CHANGED)))}setDragging(e){this.dragging!==e&&(this.dragging=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_DRAGGING_CHANGED)))}setHighlighted(e){e!==this.highlighted&&(this.highlighted=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_HIGHLIGHT_CHANGED)))}setHovered(e){this.hovered!==e&&(this.hovered=e)}isHovered(){return this.hovered}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(e){this.master!==e&&(this.master&&!e&&(this.expanded=!1),this.master=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_MASTER_CHANGED)))}setGroup(e){this.group!==e&&(this.group&&!e&&(this.expanded=!1),this.group=e,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_GROUP_CHANGED)))}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(e,t){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[t.getId()]=e,e!=null&&(this.checkAutoHeightsDebounced==null&&(this.checkAutoHeightsDebounced=xo(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let e=!1,t=!0,n=0;const s=this.__autoHeights;if(s==null||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEach(a=>{let l=s[a.getId()];if(l==null)if(this.beans.columnModel.isColSpanActive()){let c=[];switch(a.getPinned()){case"left":c=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":c=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:c=this.beans.columnModel.getViewportCenterColumnsForRow(this);break}if(c.includes(a)){e=!0;return}l=-1}else{e=!0;return}else t=!1;l>n&&(n=l)}),e)||((t||n<10)&&(n=this.beans.gridOptionsService.getRowHeightForNode(this).height),n==this.rowHeight))return;this.setRowHeight(n);const r=this.beans.rowModel;r.onRowHeightChangedDebounced&&r.onRowHeightChangedDebounced()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_UI_LEVEL_CHANGED)))}setExpanded(e,t){if(this.expanded===e)return;this.expanded=e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_EXPANDED_CHANGED));const n=Object.assign({},this.createGlobalRowEvent(N.EVENT_ROW_GROUP_OPENED),{expanded:e,event:t||null});this.beans.rowNodeEventThrottle.dispatchExpanded(n),this.beans.gridOptionsService.is("groupIncludeFooter")&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}}dispatchLocalEvent(e){this.eventService&&this.eventService.dispatchEvent(e)}setDataValue(e,t,n){const o=(()=>{var l;return typeof e!="string"?e:(l=this.beans.columnModel.getGridColumn(e))!==null&&l!==void 0?l:this.beans.columnModel.getPrimaryColumn(e)})(),r=this.getValueFromValueService(o);if(this.beans.gridOptionsService.is("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(o,r,t,n),!1;const a=this.beans.valueService.setValue(this,o,t,n);return this.dispatchCellChangedEvent(o,t,r),this.checkRowSelectable(),a}getValueFromValueService(e){const t=this.leafGroup&&this.beans.columnModel.isPivotMode(),n=this.group&&this.expanded&&!this.footer&&!t,s=this.beans.gridOptionsService.is("groupIncludeFooter"),o=this.beans.gridOptionsService.is("groupSuppressBlankHeader"),r=n&&s&&!o;return this.beans.valueService.getValue(e,this,!1,r)}dispatchEventForSaveValueReadOnly(e,t,n,s){const o={type:N.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:t,newValue:n,value:n,source:s};this.beans.eventService.dispatchEvent(o)}setGroupValue(e,t){const n=this.beans.columnModel.getGridColumn(e);$e(this.groupData)&&(this.groupData={});const s=n.getColId(),o=this.groupData[s];o!==t&&(this.groupData[s]=t,this.dispatchCellChangedEvent(n,t,o))}setAggData(e){const t=bx([this.aggData,e]),n=this.aggData;this.aggData=e,this.eventService&&t.forEach(s=>{const o=this.beans.columnModel.getGridColumn(s),r=this.aggData?this.aggData[s]:void 0,a=n?n[s]:void 0;this.dispatchCellChangedEvent(o,r,a)})}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gridOptionsService.isRowModelType("serverSide")){const n=this.beans.gridOptionsService.isTreeData(),s=this.beans.gridOptionsService.get("isServerSideGroup");e=!this.stub&&!this.footer&&(n?!!s&&s(this.data):!!this.group)}e!==this.__hasChildren&&(this.__hasChildren=!!e,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(xe.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&Kn(this.childrenAfterGroup)}dispatchCellChangedEvent(e,t,n){const s={type:xe.EVENT_CELL_CHANGED,node:this,column:e,newValue:t,oldValue:n};this.dispatchLocalEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!!(this.hasChildren()&&!this.footer||this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(t=>t.depthFirstSearch(e)),e(this)}calculateSelectedFromChildren(){var e;let t=!1,n=!1,s=!1;if(!(!((e=this.childrenAfterGroup)===null||e===void 0)&&e.length))return this.selectable?this.selected:null;for(let o=0;o<this.childrenAfterGroup.length;o++){const r=this.childrenAfterGroup[o];let a=r.isSelected();if(!r.selectable){const l=r.calculateSelectedFromChildren();if(l===null)continue;a=l}switch(a){case!0:t=!0;break;case!1:n=!0;break;default:s=!0;break}}if(!(s||t&&n))return t?!0:n?!1:this.selectable?this.selected:null}setSelectedInitialValue(e){this.selected=e}selectThisNode(e,t,n="api"){const s=!this.selectable&&e,o=this.selected===e;if(s||o)return!1;this.selected=e,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(xe.EVENT_ROW_SELECTED));const r=Object.assign(Object.assign({},this.createGlobalRowEvent(N.EVENT_ROW_SELECTED)),{event:t||null,source:n});return this.beans.eventService.dispatchEvent(r),!0}setSelected(e,t=!1,n="api"){if(typeof n=="boolean"){console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:e,clearSelection:t,rangeSelect:!1,source:n})}setSelectedParams(e){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):this.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(Object.assign(Object.assign({},e),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return this.rowPinned==="top"||this.rowPinned==="bottom"}isParentOfNode(e){let t=this.parent;for(;t;){if(t===e)return!0;t=t.parent}return!1}addEventListener(e,t){this.eventService||(this.eventService=new oo),this.eventService.addEventListener(e,t)}removeEventListener(e,t){this.eventService&&(this.eventService.removeEventListener(e,t),this.eventService.noRegisteredListenersExist()&&(this.eventService=null))}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(xe.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(xe.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(e){let t=this,n=!0,s=!1,o=null;for(;n&&!s;){const r=t.parent;ye(r)&&t.firstChild?r.rowGroupColumn===e&&(s=!0,o=r):n=!1,t=r}return s?o:null}isFullWidthCell(){const e=this.beans.gridOptionsService.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.key==null)return;const e=[];let t=this;for(;t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}createFooter(){if(this.sibling)return;const e=new xe(this.beans);Object.keys(this).forEach(t=>{e[t]=this[t]}),e.footer=!0,e.setRowTop(null),e.setRowIndex(null),e.oldRowTop=null,e.id="rowGroupFooter_"+this.id,e.sibling=this,this.sibling=e}}xe.ID_PREFIX_ROW_GROUP="row-group-";xe.ID_PREFIX_TOP_PINNED="t-";xe.ID_PREFIX_BOTTOM_PINNED="b-";xe.OBJECT_ID_SEQUENCE=0;xe.EVENT_ROW_SELECTED="rowSelected";xe.EVENT_DATA_CHANGED="dataChanged";xe.EVENT_CELL_CHANGED="cellChanged";xe.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged";xe.EVENT_MASTER_CHANGED="masterChanged";xe.EVENT_GROUP_CHANGED="groupChanged";xe.EVENT_MOUSE_ENTER="mouseEnter";xe.EVENT_MOUSE_LEAVE="mouseLeave";xe.EVENT_HEIGHT_CHANGED="heightChanged";xe.EVENT_TOP_CHANGED="topChanged";xe.EVENT_DISPLAYED_CHANGED="displayedChanged";xe.EVENT_FIRST_CHILD_CHANGED="firstChildChanged";xe.EVENT_LAST_CHILD_CHANGED="lastChildChanged";xe.EVENT_CHILD_INDEX_CHANGED="childIndexChanged";xe.EVENT_ROW_INDEX_CHANGED="rowIndexChanged";xe.EVENT_EXPANDED_CHANGED="expandedChanged";xe.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged";xe.EVENT_SELECTABLE_CHANGED="selectableChanged";xe.EVENT_UI_LEVEL_CHANGED="uiLevelChanged";xe.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged";xe.EVENT_DRAGGING_CHANGED="draggingChanged";var kA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class im extends Qe{constructor(){super(`
<div class="ag-selection-checkbox" role="presentation">
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
</div>`)}postConstruct(){this.eCheckbox.setPassive(!0),Yx(this.eCheckbox.getInputElement(),"polite")}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),n=qg(e,t),s=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel(`${s} (${n})`)}onClicked(e,t,n){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:n.shiftKey,groupSelectsFiltered:t,event:n,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",s=>{hr(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",s=>{hr(s);const o=this.gridOptionsService.is("groupSelectsFiltered"),r=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(r,o)?this.onClicked(!0,o,s||{})===0&&this.onClicked(!1,o,s):r?this.onClicked(!1,o,s):this.onClicked(!0,o,s||{})}),this.addManagedListener(this.rowNode,xe.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsService.get("isRowSelectable")||typeof this.getIsVisible()=="function"){const s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,xe.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,s),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,t){return t&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gridOptionsService.isRowModelType("clientSide")}showOrHideSelect(){var e,t,n,s;let o=this.rowNode.selectable;const r=this.getIsVisible();if(o)if(typeof r=="function"){const l=(e=this.overrides)===null||e===void 0?void 0:e.callbackParams,c=(t=this.column)===null||t===void 0?void 0:t.createColumnFunctionCallbackParams(this.rowNode);o=c?r(Object.assign(Object.assign({},l),c)):!1}else o=r??!1;if((n=this.column)===null||n===void 0?void 0:n.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!o),this.setVisible(!0),this.setDisplayed(!0);return}if(!((s=this.overrides)===null||s===void 0)&&s.removeHidden){this.setDisplayed(o);return}this.setVisible(o)}getIsVisible(){var e,t;return this.overrides?this.overrides.isVisible:(t=(e=this.column)===null||e===void 0?void 0:e.getColDef())===null||t===void 0?void 0:t.checkboxSelection}}kA([Ae("eCheckbox")],im.prototype,"eCheckbox",void 0);kA([Re],im.prototype,"postConstruct",null);var Il=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Bn,Sn;(function(i){i[i.ToolPanel=0]="ToolPanel",i[i.HeaderCell=1]="HeaderCell",i[i.RowDrag=2]="RowDrag",i[i.ChartPanel=3]="ChartPanel"})(Sn||(Sn={}));var Nc;(function(i){i[i.Up=0]="Up",i[i.Down=1]="Down"})(Nc||(Nc={}));var _o;(function(i){i[i.Left=0]="Left",i[i.Right=1]="Right"})(_o||(_o={}));let bt=Bn=class extends be{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=ms("columnMovePin",this.gridOptionsService,null),this.eHideIcon=ms("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=ms("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=ms("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=ms("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=ms("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=ms("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=ms("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=ms("dropNotAllowed",this.gridOptionsService,null)}addDragSource(e,t=!1){const n={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:n,dragSource:e}),this.dragService.addDragSource(n)}removeDragSource(e){const t=this.dragSourceAndParamsList.find(n=>n.dragSource===e);t&&(this.dragService.removeDragSource(t.params),tn(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(e=>this.dragService.removeDragSource(e.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(e,t){var n,s,o,r;const a=this.getHorizontalDirection(e),l=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);const c=this.dropTargets.filter(d=>this.isMouseOnDropTarget(e,d)),u=this.findCurrentDropTarget(e,c);if(u!==this.lastDropTarget)this.leaveLastTargetIfExists(e,a,l,t),this.lastDropTarget!==null&&u===null&&((s=(n=this.dragSource).onGridExit)===null||s===void 0||s.call(n,this.dragItem)),this.lastDropTarget===null&&u!==null&&((r=(o=this.dragSource).onGridEnter)===null||r===void 0||r.call(o,this.dragItem)),this.enterDragTargetIfExists(u,e,a,l,t),this.lastDropTarget=u;else if(u&&u.onDragging){const d=this.createDropTargetEvent(u,e,a,l,t);u.onDragging(d)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,n=[[e.getContainer()]];return t?n.concat(t):n}allContainersIntersect(e,t){for(const n of t){const s=n.getBoundingClientRect();if(s.width===0||s.height===0)return!1;const o=e.clientX>=s.left&&e.clientX<s.right,r=e.clientY>=s.top&&e.clientY<s.bottom;if(!o||!r)return!1}return!0}isMouseOnDropTarget(e,t){const n=this.getAllContainersFromDropTarget(t);let s=!1;for(const o of n)if(this.allContainersIntersect(e,o)){s=!0;break}return t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement)?!1:s&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(e,t){const n=t.length;if(n===0)return null;if(n===1)return t[0];const o=this.gridOptionsService.getRootNode().elementsFromPoint(e.clientX,e.clientY);for(const r of o)for(const a of t)if(Ix(this.getAllContainersFromDropTarget(a)).indexOf(r)!==-1)return a;return null}enterDragTargetIfExists(e,t,n,s,o){if(e){if(e.onDragEnter){const r=this.createDropTargetEvent(e,t,n,s,o);e.onDragEnter(r)}this.setGhostIcon(e.getIconName?e.getIconName():null)}}leaveLastTargetIfExists(e,t,n,s){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const o=this.createDropTargetEvent(this.lastDropTarget,e,t,n,s);this.lastDropTarget.onDragLeave(o)}this.setGhostIcon(null)}}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(n=>n.external).find(n=>n.getContainer()===e.getContainer())||null}getHorizontalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientX,n=e.clientX;return t===n?null:t>n?_o.Left:_o.Right}getVerticalDirection(e){const t=this.eventLastTime&&this.eventLastTime.clientY,n=e.clientY;return t===n?null:t>n?Nc.Up:Nc.Down}createDropTargetEvent(e,t,n,s,o){const r=e.getContainer(),a=r.getBoundingClientRect(),{gridApi:l,columnApi:c,dragItem:u,dragSource:d}=this,h=t.clientX-a.left,f=t.clientY-a.top;return{event:t,x:h,y:f,vDirection:s,hDirection:n,dragSource:d,fromNudge:o,dragItem:u,api:l,columnApi:c,dropZoneTarget:r}}positionGhost(e){const t=this.eGhost;if(!t)return;const s=t.getBoundingClientRect().height,o=oA()-2,r=rA()-2,a=zb(t.offsetParent),{clientY:l,clientX:c}=e;let u=l-a.top-s/2,d=c-a.left-10;const h=this.gridOptionsService.getDocument(),f=h.defaultView||window,g=f.pageYOffset||h.documentElement.scrollTop,p=f.pageXOffset||h.documentElement.scrollLeft;o>0&&d+t.clientWidth>o+p&&(d=o+p-t.clientWidth),d<0&&(d=0),r>0&&u+t.clientHeight>r+g&&(u=r+g-t.clientHeight),u<0&&(u=0),t.style.left=`${d}px`,t.style.top=`${u}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=Ui(Bn.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:e}=this.environment.getTheme();e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let n=this.dragSource.dragItemName;Ug(n)&&(n=n()),t.innerHTML=Mo(n)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const s=this.gridOptionsService.getDocument();let o=null;try{o=s.fullscreenElement}catch{}finally{if(!o){const r=this.gridOptionsService.getRootNode(),a=r.querySelector("body");a?o=a:r instanceof ShadowRoot?o=r:o=r==null?void 0:r.documentElement}}this.eGhostParent=o,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}setGhostIcon(e,t=!1){Zn(this.eGhostIcon);let n=null;switch(e||(e=this.dragSource.defaultIconName||Bn.ICON_NOT_ALLOWED),e){case Bn.ICON_PINNED:n=this.ePinnedIcon;break;case Bn.ICON_MOVE:n=this.eMoveIcon;break;case Bn.ICON_LEFT:n=this.eLeftIcon;break;case Bn.ICON_RIGHT:n=this.eRightIcon;break;case Bn.ICON_GROUP:n=this.eGroupIcon;break;case Bn.ICON_AGGREGATE:n=this.eAggregateIcon;break;case Bn.ICON_PIVOT:n=this.ePivotIcon;break;case Bn.ICON_NOT_ALLOWED:n=this.eDropNotAllowedIcon;break;case Bn.ICON_HIDE:n=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),!(n===this.eHideIcon&&this.gridOptionsService.is("suppressDragLeaveHidesColumns"))&&n&&this.eGhostIcon.appendChild(n)}};bt.ICON_PINNED="pinned";bt.ICON_MOVE="move";bt.ICON_LEFT="left";bt.ICON_RIGHT="right";bt.ICON_GROUP="group";bt.ICON_AGGREGATE="aggregate";bt.ICON_PIVOT="pivot";bt.ICON_NOT_ALLOWED="notAllowed";bt.ICON_HIDE="hide";bt.GHOST_TEMPLATE=`<div class="ag-dnd-ghost ag-unselectable">
<span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>
<div class="ag-dnd-ghost-label"></div>
</div>`;Il([W("dragService")],bt.prototype,"dragService",void 0);Il([W("mouseEventService")],bt.prototype,"mouseEventService",void 0);Il([W("columnApi")],bt.prototype,"columnApi",void 0);Il([W("gridApi")],bt.prototype,"gridApi",void 0);Il([Re],bt.prototype,"init",null);Il([Hi],bt.prototype,"clearDragSourceParamsList",null);bt=Bn=Il([Be("dragAndDropService")],bt);var Lh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ml extends Qe{constructor(e,t,n,s,o,r){super(),this.cellValueFn=e,this.rowNode=t,this.column=n,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(gi("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gridOptionsService.is("rowDragManaged")?new HA(this,this.beans,this.rowNode,this.column):new GA(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,t){this.setTemplateFromElement(e),this.addDragSource(t)}getSelectedNodes(){if(!this.gridOptionsService.is("rowDragMultiRow"))return[this.rowNode];const t=this.beans.selectionService.getSelectedNodes();return t.indexOf(this.rowNode)!==-1?t:[this.rowNode]}checkCompatibility(){const e=this.gridOptionsService.is("rowDragManaged");this.gridOptionsService.isTreeData()&&e&&yt(()=>console.warn("AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true"),"RowDragComp.managedAndTreeData")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptionsService.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const t=this.getRowDragText(this.column),n=this.localeService.getLocaleTextFunc();this.dragSource={type:Sn.RowDrag,eElement:this.getGui(),dragItemName:()=>{var s;const o=this.getDragItem(),r=((s=o.rowNodes)===null||s===void 0?void 0:s.length)||1;return t?t(o,r):r===1?this.cellValueFn():`${r} ${n("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}}Lh([W("beans")],ml.prototype,"beans",void 0);Lh([Re],ml.prototype,"postConstruct",null);Lh([Hi],ml.prototype,"removeDragSource",null);class VA extends be{constructor(e,t,n){super(),this.parent=e,this.rowNode=t,this.column=n}setDisplayedOrVisible(e){const t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{let n=!0,s=!1;this.column&&(n=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),s=Ug(this.column.getColDef().rowDrag)),s?(this.parent.setDisplayed(!0,t),this.parent.setVisible(n,t)):(this.parent.setDisplayed(n,t),this.parent.setVisible(!0,t))}}}class GA extends VA{constructor(e,t,n,s){super(e,n,s),this.beans=t}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gridOptionsService.is("suppressRowDrag");this.setDisplayedOrVisible(e)}}Lh([Re],GA.prototype,"postConstruct",null);class HA extends VA{constructor(e,t,n,s){super(e,n,s),this.beans=t}postConstruct(){this.addManagedListener(this.beans.eventService,N.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,N.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const t=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),n=t&&t.shouldPreventRowMove(),s=this.gridOptionsService.is("suppressRowDrag"),o=this.beans.dragAndDropService.hasExternalDropZones(),r=n&&!o||s;this.setDisplayedOrVisible(r)}}Lh([Re],HA.prototype,"postConstruct",null);var Fh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class su extends be{init(e,t,n,s,o,r,a){this.params=a,this.eGui=t,this.eCheckbox=n,this.eExpanded=s,this.eContracted=o,this.comp=e,this.compClass=r;const l=this.isTopLevelFooter(),c=this.isEmbeddedRowMismatch(),u=a.value==null&&!a.node.master;let d=!1;if(this.gridOptionsService.is("groupIncludeFooter")&&this.gridOptionsService.is("groupHideOpenParents")){const h=a.node;if(h.footer){const f=a.colDef&&a.colDef.showRowGroup,g=h.rowGroupColumn&&h.rowGroupColumn.getColId();d=f!==g}}this.cellIsBlank=l?!1:c||u&&!a.node.master||d,!this.cellIsBlank&&(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),this.addFullWidthRowDraggerIfNeeded(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded())}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eParentOfValue:t}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){Xx(t);return}const n=()=>{Ks(t,!!e.expanded)};this.expandListener=this.addManagedListener(e,xe.EVENT_EXPANDED_CHANGED,n)||null,n()}isTopLevelFooter(){if(!this.gridOptionsService.is("groupIncludeTotalFooter")||this.params.value!=null||this.params.node.level!=-1)return!1;const e=this.params.colDef;if(e==null||e.showRowGroup===!0)return!0;const n=this.columnModel.getRowGroupColumns();return!n||n.length===0?!0:n[0].getId()===e.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gridOptionsService.is("embedFullWidthRows"))return!1;const e=this.params.pinned==="left",t=this.params.pinned==="right",n=!e&&!t;return this.gridOptionsService.is("enableRtl")?this.columnModel.isPinningLeft()?!t:!n:this.columnModel.isPinningLeft()?!e:!n}findDisplayedGroupNode(){const e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent){let n=t.parent;for(;n!=null;){if(n.rowGroupColumn&&e.isRowGroupDisplayed(n.rowGroupColumn.getId())){this.displayedGroupNode=n;break}n=n.parent}}$e(this.displayedGroupNode)&&(this.displayedGroupNode=t)}setupShowingValueForOpenedParent(){const e=this.params.node,t=this.params.column;if(!this.gridOptionsService.is("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!e.groupData){this.showingValueForOpenedParent=!1;return}if(e.rowGroupColumn!=null){const o=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(o)){this.showingValueForOpenedParent=!1;return}}const s=e.groupData[t.getId()]!=null;this.showingValueForOpenedParent=s}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){const e=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(e),{valueFormatted:n,value:s}=e;let o=n;o==null&&(s===""&&this.params.node.group?o=this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):o=s??null),this.comp.setInnerRenderer(t,o)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(t!=null&&!t.isRowGroupDisplayed(e.getId()))return this.params;const s=this.params,{value:o,node:r}=this.params,a=this.valueFormatterService.formatValue(e,r,o);return Object.assign(Object.assign({},s),{valueFormatted:a})}addFooterValue(){const e=this.params.footerValueGetter;let t="";if(e){const s=xb(this.params);s.value=this.params.value,typeof e=="function"?t=e(s):typeof e=="string"?t=this.expressionService.evaluate(e,s):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t="Total "+(this.params.value!=null?this.params.value:"");const n=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(n,t)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);const t=this.userComponentFactory.getInnerRendererDetails(e,e),n=a=>a&&a.componentClass==this.compClass;if(t&&!n(t))return t;const s=this.displayedGroupNode.rowGroupColumn,o=s?s.getColDef():void 0;if(!o)return;const r=this.userComponentFactory.getCellRendererDetails(o,e);if(r&&!n(r))return r;if(n(r)&&o.cellRendererParams&&o.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(o.cellRendererParams,e)}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,xe.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,s=this.isShowRowGroupForThisRow()&&e!=null&&e>=0?`(${e})`:"";this.comp.setChildCount(s)}isShowRowGroupForThisRow(){if(this.gridOptionsService.isTreeData())return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const t=this.params.column;return t==null||t.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const t=this.params,n=gi("groupExpanded",this.gridOptionsService,null),s=gi("groupContracted",this.gridOptionsService,null);n&&this.eExpanded.appendChild(n),s&&this.eContracted.appendChild(s);const o=t.eGridCell;!(((e=this.params.column)===null||e===void 0?void 0:e.isCellEditable(t.node))&&this.gridOptionsService.is("enableGroupEdit"))&&this.isExpandable()&&!t.suppressDoubleClickExpand&&this.addManagedListener(o,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(o,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,xe.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const a=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,xe.EVENT_ALL_CHILDREN_COUNT_CHANGED,a),this.addManagedListener(this.displayedGroupNode,xe.EVENT_MASTER_CHANGED,a),this.addManagedListener(this.displayedGroupNode,xe.EVENT_GROUP_CHANGED,a),this.addManagedListener(this.displayedGroupNode,xe.EVENT_HAS_CHILDREN_CHANGED,a)}onExpandClicked(e){Ao(e)||(hr(e),this.onExpandOrContract(e))}onExpandOrContract(e){const t=this.displayedGroupNode,n=!t.expanded;!n&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(n,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;const s=this.params.column;return s!=null&&typeof s.getColDef().showRowGroup=="string"?this.isShowRowGroupForThisRow():!0}showExpandAndContractIcons(){const{params:e,displayedGroupNode:t,columnModel:n}=this,{node:s}=e,o=this.isExpandable();if(o){const u=this.showingValueForOpenedParent?!0:s.expanded;this.comp.setExpandedDisplayed(u),this.comp.setContractedDisplayed(!u)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=n.isPivotMode(),a=r&&t.leafGroup,l=o&&!a,c=s.footer&&s.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",a):c||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){const e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,xe.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gridOptionsService.is("groupHideOpenParents"))return;const e=this.params,t=e.node,n=!!e.colDef,s=this.gridOptionsService.isTreeData(),r=!n||s||e.colDef.showRowGroup===!0?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new ml(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return typeof e=="function"||e===!0}addCheckboxIfNeeded(){const e=this.displayedGroupNode,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){const n=new im;this.getContext().createBean(n),n.init({rowNode:e,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(n.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(n))}this.comp.setCheckboxVisible(t)}onKeyDown(e){!(e.key===ge.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(Ao(e))return;Bp(this.eExpanded,e)||Bp(this.eContracted,e)||this.onExpandOrContract(e)}}Fh([W("expressionService")],su.prototype,"expressionService",void 0);Fh([W("valueFormatterService")],su.prototype,"valueFormatterService",void 0);Fh([W("columnModel")],su.prototype,"columnModel",void 0);Fh([W("userComponentFactory")],su.prototype,"userComponentFactory",void 0);Fh([W("ctrlsService")],su.prototype,"ctrlsService",void 0);var Nh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Fo extends Qe{constructor(){super(Fo.TEMPLATE)}init(e){const t={setInnerRenderer:(r,a)=>this.setRenderDetails(r,a),setChildCount:r=>this.eChildCount.innerHTML=r,addOrRemoveCssClass:(r,a)=>this.addOrRemoveCssClass(r,a),setContractedDisplayed:r=>mt(this.eContracted,r),setExpandedDisplayed:r=>mt(this.eExpanded,r),setCheckboxVisible:r=>this.eCheckbox.classList.toggle("ag-invisible",!r)},n=this.createManagedBean(new su),s=!e.colDef,o=this.getGui();n.init(t,o,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),s&&Gi(o,"gridcell")}setRenderDetails(e,t){if(e){const n=e.newAgStackInstance();if(!n)return;n.then(s=>{if(!s)return;const o=()=>this.context.destroyBean(s);this.isAlive()?(this.eValue.appendChild(s.getGui()),this.addDestroyFunc(o)):o()})}else this.eValue.innerText=t}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}}Fo.TEMPLATE=`<span class="ag-cell-wrapper">
<span class="ag-group-expanded" ref="eExpanded"></span>
<span class="ag-group-contracted" ref="eContracted"></span>
<span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
<span class="ag-group-value" ref="eValue"></span>
<span class="ag-group-child-count" ref="eChildCount"></span>
</span>`;Nh([Ae("eExpanded")],Fo.prototype,"eExpanded",void 0);Nh([Ae("eContracted")],Fo.prototype,"eContracted",void 0);Nh([Ae("eCheckbox")],Fo.prototype,"eCheckbox",void 0);Nh([Ae("eValue")],Fo.prototype,"eValue",void 0);Nh([Ae("eChildCount")],Fo.prototype,"eChildCount",void 0);var BA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ou extends Qe{constructor(){super(ou.TEMPLATE)}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=gi("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}destroy(){super.destroy()}}ou.TEMPLATE=`<div class="ag-loading">
<span class="ag-loading-icon" ref="eLoadingIcon"></span>
<span class="ag-loading-text" ref="eLoadingText"></span>
</div>`;BA([Ae("eLoadingIcon")],ou.prototype,"eLoadingIcon",void 0);BA([Ae("eLoadingText")],ou.prototype,"eLoadingText",void 0);class nm extends Qe{constructor(){super()}destroy(){super.destroy()}init(e){var t;const n=(t=this.gridOptionsService.get("overlayLoadingTemplate"))!==null&&t!==void 0?t:nm.DEFAULT_LOADING_OVERLAY_TEMPLATE,s=this.localeService.getLocaleTextFunc(),o=n.replace("[LOADING...]",s("loadingOoo","Loading..."));this.setTemplate(o)}}nm.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>';class sm extends Qe{constructor(){super()}destroy(){super.destroy()}init(e){var t;const n=(t=this.gridOptionsService.get("overlayNoRowsTemplate"))!==null&&t!==void 0?t:sm.DEFAULT_NO_ROWS_TEMPLATE,s=this.localeService.getLocaleTextFunc(),o=n.replace("[NO_ROWS_TO_SHOW]",s("noRowsToShow","No Rows To Show"));this.setTemplate(o)}}sm.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>';class Zk extends nu{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:t}=e;this.getGui().innerHTML=Mo(t)}}class Jk{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}init(e,t){this.eInput=e,this.params=t,t.max!=null&&e.setMax(t.max),t.min!=null&&e.setMin(t.min),t.precision!=null&&e.setPrecision(t.precision),t.step!=null&&e.setStep(t.step),t.showStepperButtons&&e.getInputElement().classList.add("ag-number-field-input-stepper")}getValue(){const e=this.eInput.getValue();if(!ye(e)&&!ye(this.params.value))return this.params.value;let t=this.params.parseValue(e);if(t==null)return t;if(typeof t=="string"){if(t==="")return null;t=Number(t)}return isNaN(t)?null:t}getStartValue(){return this.params.value}}class eV extends Ph{constructor(){super(new Jk)}}class tV{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.eInput.getDate();return!ye(e)&&!ye(this.params.value)?this.params.value:e??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Es(e,!1)}}class iV extends Ph{constructor(){super(new tV)}}var nV=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class sV{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,t){this.eInput=e,this.params=t,t.min!=null&&e.setMin(t.min),t.max!=null&&e.setMax(t.max),t.step!=null&&e.setStep(t.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return!ye(e)&&!ye(this.params.value)?this.params.value:this.params.parseValue(e??"")}getStartValue(){var e,t;return Es((t=this.parseDate((e=this.params.value)!==null&&e!==void 0?e:void 0))!==null&&t!==void 0?t:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction()(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction()(e)}}class WA extends Ph{constructor(){super(new sV(()=>this.dataTypeService))}}nV([W("dataTypeService")],WA.prototype,"dataTypeService",void 0);var oV=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class kh extends Qe{constructor(){super(kh.TEMPLATE)}init(e){this.params=e,this.updateCheckbox(e),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.addManagedListener(this.eCheckbox.getInputElement(),"click",n=>{if(hr(n),this.eCheckbox.isDisabled())return;const s=this.eCheckbox.getValue();this.onCheckboxChanged(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",n=>{hr(n)});const t=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",n=>{if(n.key===ge.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===t.activeElement&&this.eCheckbox.toggle();const s=this.eCheckbox.getValue();this.onCheckboxChanged(s),n.preventDefault()}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){var t,n,s;let o,r=!0;if(e.node.group&&e.column){const d=e.column.getColId();d.startsWith(Pc)?o=e.value==null||e.value===""?void 0:e.value==="true":e.node.aggData&&e.node.aggData[d]!==void 0?o=(t=e.value)!==null&&t!==void 0?t:void 0:r=!1}else o=(n=e.value)!==null&&n!==void 0?n:void 0;if(!r){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(o);const a=e.disabled!=null?e.disabled:!(!((s=e.column)===null||s===void 0)&&s.isCellEditable(e.node));this.eCheckbox.setDisabled(a);const l=this.localeService.getLocaleTextFunc(),c=qg(l,o),u=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;this.eCheckbox.setInputAriaLabel(u)}onCheckboxChanged(e){const{column:t,node:n,rowIndex:s,value:o}=this.params,r={type:N.EVENT_CELL_EDITING_STARTED,column:t,colDef:t==null?void 0:t.getColDef(),data:n.data,node:n,rowIndex:s,rowPinned:n.rowPinned,value:o};this.eventService.dispatchEvent(r);const a=this.params.node.setDataValue(this.params.column,e,"edit"),l={type:N.EVENT_CELL_EDITING_STOPPED,column:t,colDef:t==null?void 0:t.getColDef(),data:n.data,node:n,rowIndex:s,rowPinned:n.rowPinned,value:o,oldValue:o,newValue:e,valueChanged:a};this.eventService.dispatchEvent(l)}}kh.TEMPLATE=`
<div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
</div>`;oV([Ae("eCheckbox")],kh.prototype,"eCheckbox",void 0);var rV=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class UA extends nu{constructor(){super(`
<div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">
<ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>
</div>`)}init(e){var t;this.params=e;const n=(t=e.value)!==null&&t!==void 0?t:void 0;this.eCheckbox.setValue(n),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(n),this.addManagedListener(this.eCheckbox,sa.EVENT_CHANGED,s=>this.setAriaLabel(s.selected))}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.localeService.getLocaleTextFunc(),n=qg(t,e),s=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${n})`)}}rV([Ae("eCheckbox")],UA.prototype,"eCheckbox",void 0);var pw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Bd=class extends be{constructor(){super(...arguments),this.agGridDefaults={agDateInput:PA,agColumnHeader:Ki,agColumnGroupHeader:Pl,agSortIndicator:ns,agTextColumnFloatingFilter:jk,agNumberColumnFloatingFilter:Uk,agDateColumnFloatingFilter:tm,agReadOnlyFloatingFilter:nw,agAnimateShowChangeCellRenderer:Ih,agAnimateSlideCellRenderer:Mh,agGroupCellRenderer:Fo,agGroupRowRenderer:Fo,agLoadingCellRenderer:ou,agCheckboxCellRenderer:kh,agCellEditor:r_,agTextCellEditor:r_,agNumberCellEditor:eV,agDateCellEditor:iV,agDateStringCellEditor:WA,agSelectCellEditor:fw,agLargeTextCellEditor:Oh,agCheckboxCellEditor:UA,agTextColumnFilter:Ti,agNumberColumnFilter:Ah,agDateColumnFilter:iu,agLoadingOverlay:nm,agNoRowsOverlay:sm,agTooltipComponent:Zk},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:We.SetFilterModule,agSetColumnFloatingFilter:We.SetFilterModule,agMultiColumnFilter:We.MultiFilterModule,agMultiColumnFloatingFilter:We.MultiFilterModule,agGroupColumnFilter:We.RowGroupingModule,agGroupColumnFloatingFilter:We.RowGroupingModule,agRichSelect:We.RichSelectModule,agRichSelectCellEditor:We.RichSelectModule,agDetailCellRenderer:We.MasterDetailModule,agSparklineCellRenderer:We.SparklinesModule},this.jsComps={}}init(){this.gridOptions.components!=null&&Qt(this.gridOptions.components,(e,t)=>this.registerJsComponent(e,t))}registerDefaultComponent(e,t){if(this.agGridDefaults[e]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[e]=t}registerJsComponent(e,t){this.jsComps[e]=t}retrieve(e,t){const n=(l,c)=>({componentFromFramework:c,component:l}),s=this.getFrameworkOverrides().frameworkComponent(t,this.gridOptions.components);if(s!=null)return n(s,!0);const o=this.jsComps[t];if(o){const l=this.getFrameworkOverrides().isFrameworkComponent(o);return n(o,l)}const r=this.agGridDefaults[t];if(r)return n(r,!1);const a=this.enterpriseAgDefaultCompsModule[t];return a?Pe.__assertRegistered(a,`AG Grid '${e}' component: ${t}`,this.context.getGridId()):yt(()=>{this.warnAboutMissingComponent(e,t)},"MissingComp"+t),null}warnAboutMissingComponent(e,t){const n=[...Object.keys(this.agGridDefaults).filter(o=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(o)),...Object.keys(this.jsComps)],s=Ib(t,n,!0,.8);console.warn(`AG Grid: Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.`),s.length>0&&console.warn(` Did you mean: [${s.slice(0,3)}]?`),console.warn("If using a custom component check it has been registered as described in: https://ag-grid.com/javascript-data-grid/components/")}};pw([W("gridOptions")],Bd.prototype,"gridOptions",void 0);pw([Re],Bd.prototype,"init",null);Bd=pw([Be("userComponentRegistry")],Bd);const aV={propertyName:"dateComponent",cellRenderer:!1},lV={propertyName:"headerComponent",cellRenderer:!1},cV={propertyName:"headerGroupComponent",cellRenderer:!1},a_={propertyName:"cellRenderer",cellRenderer:!0},uV={propertyName:"cellEditor",cellRenderer:!1},l_={propertyName:"innerRenderer",cellRenderer:!0},dV={propertyName:"loadingOverlayComponent",cellRenderer:!1},hV={propertyName:"noRowsOverlayComponent",cellRenderer:!1},fV={propertyName:"tooltipComponent",cellRenderer:!1},zC={propertyName:"filter",cellRenderer:!1},pV={propertyName:"floatingFilterComponent",cellRenderer:!1},gV={propertyName:"toolPanel",cellRenderer:!1},mV={propertyName:"statusPanel",cellRenderer:!1},vV={propertyName:"fullWidthCellRenderer",cellRenderer:!0},CV={propertyName:"loadingCellRenderer",cellRenderer:!0},yV={propertyName:"groupRowRenderer",cellRenderer:!0},bV={propertyName:"detailCellRenderer",cellRenderer:!0};class jA{static getFloatingFilterType(e){return this.filterToFloatingFilterMapping[e]}}jA.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"};var ru=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let oa=class extends be{getHeaderCompDetails(e,t){return this.getCompDetails(e,lV,"agColumnHeader",t)}getHeaderGroupCompDetails(e){const t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,cV,"agColumnGroupHeader",e)}getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,vV,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,CV,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,yV,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,bV,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,t){return this.getCompDetails(e,l_,null,t)}getFullWidthGroupRowInnerCellRenderer(e,t){return this.getCompDetails(e,l_,null,t)}getCellRendererDetails(e,t){return this.getCompDetails(e,a_,null,t)}getCellEditorDetails(e,t){return this.getCompDetails(e,uV,"agCellEditor",t,!0)}getFilterDetails(e,t,n){return this.getCompDetails(e,zC,n,t,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,aV,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,dV,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,hV,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,fV,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,t){return this.getCompDetails(e,a_,null,t)}getFloatingFilterCompDetails(e,t,n){return this.getCompDetails(e,pV,n,t)}getToolPanelCompDetails(e,t){return this.getCompDetails(e,gV,null,t,!0)}getStatusPanelCompDetails(e,t){return this.getCompDetails(e,mV,null,t,!0)}getCompDetails(e,t,n,s,o=!1){const{propertyName:r,cellRenderer:a}=t;let{compName:l,jsComp:c,fwComp:u,paramsFromSelector:d,popupFromSelector:h,popupPositionFromSelector:f}=this.getCompKeys(e,t,s);const g=C=>{const m=this.userComponentRegistry.retrieve(r,C);m&&(c=m.componentFromFramework?void 0:m.component,u=m.componentFromFramework?m.component:void 0)};if(l!=null&&g(l),c==null&&u==null&&n!=null&&g(n),c&&a&&!this.agComponentUtils.doesImplementIComponent(c)&&(c=this.agComponentUtils.adaptFunction(r,c)),!c&&!u){o&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`);return}const p=this.mergeParamsWithApplicationProvidedParams(e,t,s,d),v=c==null,y=c||u;return{componentFromFramework:v,componentClass:y,params:p,type:t,popupFromSelector:h,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(y,v,p,t)}}getCompKeys(e,t,n){const{propertyName:s}=t;let o,r,a,l,c,u;if(e){const d=e,h=d[s+"Selector"],f=h?h(n):null,g=p=>{typeof p=="string"?o=p:p!=null&&p!==!0&&(this.getFrameworkOverrides().isFrameworkComponent(p)?a=p:r=p)};f?(g(f.component),l=f.params,c=f.popup,u=f.popupPosition):g(d[s])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}newAgStackInstance(e,t,n,s){const o=s.propertyName,r=!t;let a;if(r)a=new e;else{const c=this.componentMetadataProvider.retrieve(o);a=this.frameworkComponentWrapper.wrap(e,c.mandatoryMethodList,c.optionalMethodList,s)}const l=this.initComponent(a,n);return l==null?vn.resolve(a):l.then(()=>a)}mergeParamsWithApplicationProvidedParams(e,t,n,s=null){const o={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};Qn(o,n);const r=e,a=r&&r[t.propertyName+"Params"];if(typeof a=="function"){const l=a(n);Qn(o,l)}else typeof a=="object"&&Qn(o,a);return Qn(o,s),o}initComponent(e,t){if(this.context.createBean(e),e.init!=null)return e.init(t)}getDefaultFloatingFilterType(e,t){if(e==null)return null;let n=null,{compName:s,jsComp:o,fwComp:r}=this.getCompKeys(e,zC);return s?n=jA.getFloatingFilterType(s):o==null&&r==null&&e.filter===!0&&(n=t()),n}};ru([W("gridOptions")],oa.prototype,"gridOptions",void 0);ru([W("agComponentUtils")],oa.prototype,"agComponentUtils",void 0);ru([W("componentMetadataProvider")],oa.prototype,"componentMetadataProvider",void 0);ru([W("userComponentRegistry")],oa.prototype,"userComponentRegistry",void 0);ru([xt("frameworkComponentWrapper")],oa.prototype,"frameworkComponentWrapper",void 0);oa=ru([Be("userComponentFactory")],oa);var $p;(function(i){i[i.SINGLE_SHEET=0]="SINGLE_SHEET",i[i.MULTI_SHEET=1]="MULTI_SHEET"})($p||($p={}));var gw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Wd=class extends be{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){const t=e.dragSource.eElement,n=e.mouseDownListener;if(t.removeEventListener("mousedown",n),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const t=this.dragSources.find(n=>n.dragSource===e);t&&(this.removeListener(t),tn(this.dragSources,t))}isDragging(){return this.dragging}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:n,includeTouch:s,stopPropagationForTouch:o}=e;n.addEventListener("mousedown",t);let r=null;const a=this.gridOptionsService.is("suppressTouch");s&&!a&&(r=l=>{jb(l.target)||(l.cancelable&&(l.preventDefault(),o&&l.stopPropagation()),this.onTouchStart(e,l))},n.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:r,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const n=t.touches[0];this.touchLastTime=n,this.touchStart=n;const s=c=>this.onTouchMove(c,e.eElement),o=c=>this.onTouchUp(c,e.eElement),r=c=>{c.cancelable&&c.preventDefault()},a=t.target,l=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:r,options:{passive:!1}},{target:a,type:"touchmove",listener:s,options:{passive:!0}},{target:a,type:"touchend",listener:o,options:{passive:!0}},{target:a,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onCommonMove(n,this.touchStart,e.eElement)}onMouseDown(e,t){const n=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||n._alreadyProcessedByDragService||(n._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=c=>this.onMouseMove(c,e.eElement),o=c=>this.onMouseUp(c,e.eElement),r=c=>c.preventDefault(),a=this.gridOptionsService.getRootNode(),l=[{target:a,type:"mousemove",listener:s},{target:a,type:"mouseup",listener:o},{target:a,type:"contextmenu",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:n,type:s,listener:o,options:r}=t;n.addEventListener(s,o,r)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:n,type:s,listener:o,options:r}=t;n.removeEventListener(s,o,r)})})}isEventNearStartEvent(e,t){const{dragStartPixels:n}=this.currentDragParams,s=ye(n)?n:4;return Jb(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,n){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;const s={type:N.EVENT_DRAG_STARTED,target:n};this.eventService.dispatchEvent(s),this.currentDragParams.onDragStart(t),this.currentDragParams.onDragging(t)}this.currentDragParams.onDragging(e)}onTouchMove(e,t){const n=this.getFirstActiveTouch(e.touches);n&&this.onCommonMove(n,this.touchStart,t)}onMouseMove(e,t){this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const t=this.gridOptionsService.is("enableCellTextSelection"),n=xs(),s=e.type==="mousemove";return(t&&s||n)&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const t=e.target,n=t==null?void 0:t.tagName.toLocaleLowerCase();return!!(n!=null&&n.match("^a$|textarea|input|select|button"))}onTouchUp(e,t){let n=this.getFirstActiveTouch(e.changedTouches);n||(n=this.touchLastTime),this.onUpCommon(n,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);const n={type:N.EVENT_DRAG_STOPPED,target:t};this.eventService.dispatchEvent(n)}this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(n=>n()),this.dragEndFunctions.length=0}};gw([W("mouseEventService")],Wd.prototype,"mouseEventService",void 0);gw([Hi],Wd.prototype,"removeAllListeners",null);Wd=gw([Be("dragService")],Wd);var lr;(function(i){i[i.Above=0]="Above",i[i.Below=1]="Below"})(lr||(lr={}));var _t;(function(i){i.EVERYTHING="group",i.FILTER="filter",i.SORT="sort",i.MAP="map",i.AGGREGATE="aggregate",i.FILTER_AGGREGATES="filter_aggregates",i.PIVOT="pivot",i.NOTHING="nothing"})(_t||(_t={}));var wt=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};function $a(i){const e=i;return e!=null&&e.getFrameworkComponentInstance!=null?e.getFrameworkComponentInstance():i}let vt=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}registerOverlayWrapperComp(e){this.overlayWrapperComp=e}registerSideBarComp(e){this.sideBarComp=e}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(()=>{this.gridBodyCtrl=this.ctrlsService.getGridBodyCtrl()})}__getAlignedGridService(){return this.alignedGridsService}__getContext(){return this.context}getSetterMethod(e){return`set${e.charAt(0).toUpperCase()}${e.substring(1)}`}__setProperty(e,t){this.gridOptionsService.set(e,t);const n=this.getSetterMethod(e),s=this;s[n]&&s[n](t)}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,t){this.detailGridInfoMap[e]=t}removeDetailGridInfo(e){this.detailGridInfoMap[e]=void 0}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let t=0;Qt(this.detailGridInfoMap,(n,s)=>{ye(s)&&(e(s,t),t++)})}getDataAsCsv(e){if(Pe.__assertRegistered(We.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){Pe.__assertRegistered(We.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}getExcelExportMode(e){const t=this.gridOptionsService.get("defaultExcelExportParams");return Object.assign({exportMode:"xlsx"},t,e).exportMode}assertNotExcelMultiSheet(e,t){if(!Pe.__assertRegistered(We.ExcelExportModule,"api."+e,this.context.getGridId()))return!1;const n=this.getExcelExportMode(t);return this.excelCreator.getFactoryMode(n)===$p.MULTI_SHEET?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(!Pe.__assertRegistered(We.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId()))return;const t=this.getExcelExportMode(e);return this.excelCreator.setFactoryMode($p.MULTI_SHEET,t),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(Pe.__assertRegistered(We.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){if(Pe.__assertRegistered(We.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,t){if(!e)return;const n=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;t===null?n.removeAttribute(s):n.setAttribute(s,t)}logMissingRowModel(e,...t){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${t.join(" or ")}`)}setServerSideDatasource(e){this.serverSideRowModel?this.serverSideRowModel.setDatasource(e):this.logMissingRowModel("setServerSideDatasource","serverSide")}setCacheBlockSize(e){this.serverSideRowModel?(this.gridOptionsService.set("cacheBlockSize",e),this.serverSideRowModel.resetRootStore()):this.logMissingRowModel("setCacheBlockSize","serverSide")}setDatasource(e){this.gridOptionsService.isRowModelType("infinite")?this.rowModel.setDatasource(e):this.logMissingRowModel("setDatasource","infinite")}setViewportDatasource(e){this.gridOptionsService.isRowModelType("viewport")?this.rowModel.setViewportDatasource(e):this.logMissingRowModel("setViewportDatasource","viewport")}setRowData(e){if(this.immutableService==null){this.logMissingRowModel("setRowData","clientSide");return}this.immutableService.isActive()?this.immutableService.setRowData(e):(this.selectionService.reset(),this.clientSideRowModel.setRowData(e))}setPinnedTopRowData(e){this.pinnedRowModel.setPinnedTopRowData(e)}setPinnedBottomRowData(e){this.pinnedRowModel.setPinnedBottomRowData(e)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}setColumnDefs(e,t="api"){this.columnModel.setColumnDefs(e,t),this.gridOptionsService.set("columnDefs",e,!0,{source:t})}setAutoGroupColumnDef(e,t="api"){this.gridOptionsService.set("autoGroupColumnDef",e,!0,{source:t})}setDefaultColDef(e,t="api"){this.gridOptionsService.set("defaultColDef",e,!0,{source:t})}setColumnTypes(e,t="api"){this.gridOptionsService.set("columnTypes",e,!0,{source:t})}expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}setAlwaysShowHorizontalScroll(e){this.gridOptionsService.set("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.gridOptionsService.set("alwaysShowVerticalScroll",e)}refreshCells(e={}){this.rowRenderer.refreshCells(e)}flashCells(e={}){this.rowRenderer.flashCells(e)}redrawRows(e={}){const t=e?e.rowNodes:void 0;this.rowRenderer.redrawRows(t)}setFunctionsReadOnly(e){this.gridOptionsService.set("functionsReadOnly",e)}refreshHeader(){this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh())}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return this.rowModel}setRowNodeExpanded(e,t,n){e&&(n&&e.parent&&e.parent.level!==-1&&this.setRowNodeExpanded(e.parent,t,n),e.setExpanded(t))}onGroupExpandedOrCollapsed(){if($e(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.clientSideRowModel.refreshModel({step:_t.MAP})}refreshClientSideRowModel(e){if($e(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gridOptionsService.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!0):this.serverSideRowModel?this.serverSideRowModel.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel?this.clientSideRowModel.expandOrCollapseAll(!1):this.serverSideRowModel?this.serverSideRowModel.expandAll(!1):this.logMissingRowModel("expandAll","clientSide","serverSide")}addRenderedRowListener(e,t,n){this.rowRenderer.addRenderedRowListener(e,t,n)}getQuickFilter(){return this.gridOptionsService.get("quickFilterText")}setQuickFilter(e){this.gridOptionsService.set("quickFilterText",e)}setExcludeHiddenColumnsFromQuickFilter(e){vs("30","setExcludeHiddenColumnsFromQuickFilter",void 0,"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `setIncludeHiddenColumnsInQuickFilter`"),this.setIncludeHiddenColumnsInQuickFilter(!e)}setIncludeHiddenColumnsInQuickFilter(e){this.gridOptionsService.set("includeHiddenColumnsInQuickFilter",e)}setNodesSelected(e){if(!e.nodes.every(a=>a.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):a.id===void 0?(console.warn("AG Grid: cannot select node until id for node is known"),!1):!0))return;const{nodes:n,source:s,newValue:o}=e,r=n;this.selectionService.setNodesSelected({nodes:r,source:s??"api",newValue:o})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return $e(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getServerSideSelectionState()}setServerSideSelectionState(e){if($e(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setServerSideSelectionState(e)}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}sizeColumnsToFit(e){this.gridBodyCtrl.sizeColumnsToFit(e)}showLoadingOverlay(){this.overlayWrapperComp.showLoadingOverlay()}showNoRowsOverlay(){this.overlayWrapperComp.showNoRowsOverlay()}hideOverlay(){this.overlayWrapperComp.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if($e(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}return this.selectionService.getBestCostNodeSelection()}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,t="auto"){this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,t)}ensureIndexVisible(e,t){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,t)}ensureNodeVisible(e,t=null){this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,t)}forEachLeafNode(e){if($e(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,t){this.rowModel.forEachNode(e,t)}forEachNodeAfterFilter(e){if($e(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){if($e(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,t){const n=this.getFilterInstanceImpl(e,o=>{if(!t)return;const r=$a(o);t(r)});return $a(n)}getFilterInstanceImpl(e,t){const n=this.columnModel.getPrimaryColumn(e);if(!n)return;const s=this.filterManager.getFilterComponent(n,"NO_UI"),o=s&&s.resolveNow(null,r=>r);return o?setTimeout(t,0,o):s&&s.then(r=>{t(r)}),o}destroyFilter(e){const t=this.columnModel.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"api")}getStatusPanel(e){if(!Pe.__assertRegistered(We.StatusBarModule,"api.getStatusPanel",this.context.getGridId()))return;const t=this.statusBarService.getStatusPanel(e);return $a(t)}getColumnDef(e){const t=this.columnModel.getPrimaryColumn(e);return t?t.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(){this.filterManager.onFilterChanged()}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.filterManager.setFilterModel(e)}getFilterModel(){return this.filterManager.getFilterModel()}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,t,n){this.focusService.setFocusedCell({rowIndex:e,column:t,rowPinned:n,forceBrowserFocus:!0})}setSuppressRowDrag(e){this.gridOptionsService.set("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.gridOptionsService.set("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.gridOptionsService.set("suppressRowClickSelection",e)}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const t=this.dragAndDropService.findExternalZone(e);t&&this.dragAndDropService.removeDropTarget(t)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}setHeaderHeight(e){this.gridOptionsService.set("headerHeight",e)}setDomLayout(e){this.gridOptionsService.set("domLayout",e)}setEnableCellTextSelection(e){this.gridBodyCtrl.setCellTextSelection(e)}setFillHandleDirection(e){this.gridOptionsService.set("fillHandleDirection",e)}setGroupHeaderHeight(e){this.gridOptionsService.set("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.gridOptionsService.set("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.gridOptionsService.set("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.gridOptionsService.set("pivotGroupHeaderHeight",e)}setPivotMode(e){this.columnModel.setPivotMode(e)}setAnimateRows(e){this.gridOptionsService.set("animateRows",e)}setIsExternalFilterPresent(e){this.gridOptionsService.set("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.gridOptionsService.set("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.gridOptionsService.set("navigateToNextCell",e)}setTabToNextCell(e){this.gridOptionsService.set("tabToNextCell",e)}setTabToNextHeader(e){this.gridOptionsService.set("tabToNextHeader",e)}setNavigateToNextHeader(e){this.gridOptionsService.set("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.gridOptionsService.set("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.gridOptionsService.set("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.gridOptionsService.set("getBusinessKeyForNode",e)}setGetChildCount(e){this.gridOptionsService.set("getChildCount",e)}setProcessRowPostCreate(e){this.gridOptionsService.set("processRowPostCreate",e)}setGetRowId(e){this.gridOptionsService.set("getRowId",e)}setGetRowClass(e){this.gridOptionsService.set("getRowClass",e)}setIsFullWidthRow(e){this.gridOptionsService.set("isFullWidthRow",e)}setIsRowSelectable(e){this.gridOptionsService.set("isRowSelectable",e)}setIsRowMaster(e){this.gridOptionsService.set("isRowMaster",e)}setPostSortRows(e){this.gridOptionsService.set("postSortRows",e)}setGetDocument(e){this.gridOptionsService.set("getDocument",e)}setGetContextMenuItems(e){this.gridOptionsService.set("getContextMenuItems",e)}setGetMainMenuItems(e){this.gridOptionsService.set("getMainMenuItems",e)}setProcessCellForClipboard(e){this.gridOptionsService.set("processCellForClipboard",e)}setSendToClipboard(e){this.gridOptionsService.set("sendToClipboard",e)}setProcessCellFromClipboard(e){this.gridOptionsService.set("processCellFromClipboard",e)}setProcessSecondaryColDef(e){vs("28.0","setProcessSecondaryColDef","setProcessPivotResultColDef"),this.setProcessPivotResultColDef(e)}setProcessSecondaryColGroupDef(e){vs("28.0","setProcessSecondaryColGroupDef","setProcessPivotResultColGroupDef"),this.setProcessPivotResultColGroupDef(e)}setProcessPivotResultColDef(e){this.gridOptionsService.set("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.gridOptionsService.set("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.gridOptionsService.set("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.gridOptionsService.set("initialGroupOrderComparator",e)}setGetChartToolbarItems(e){this.gridOptionsService.set("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.gridOptionsService.set("paginationNumberFormatter",e)}setGetServerSideStoreParams(e){vs("28.0","setGetServerSideStoreParams","setGetServerSideGroupLevelParams"),this.setGetServerSideGroupLevelParams(e)}setGetServerSideGroupLevelParams(e){this.gridOptionsService.set("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.gridOptionsService.set("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.gridOptionsService.set("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.gridOptionsService.set("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.gridOptionsService.set("getServerSideGroupKey",e)}setGetRowStyle(e){this.gridOptionsService.set("getRowStyle",e)}setGetRowHeight(e){this.gridOptionsService.set("getRowHeight",e)}assertSideBarLoaded(e){return Pe.__assertRegistered(We.SideBarModule,"api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarComp.isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarComp.setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarComp.setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarComp.openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarComp.close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarComp.openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarComp.refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarComp.isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance")){const t=this.sideBarComp.getToolPanelInstance(e);return $a(t)}}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarComp.getDef()}setSideBar(e){this.gridOptionsService.set("sideBar",e)}setSuppressClipboardPaste(e){this.gridOptionsService.set("suppressClipboardPaste",e)}resetRowHeights(){if(ye(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}}setGroupRemoveSingleChildren(e){this.gridOptionsService.set("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.gridOptionsService.set("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.gridOptionsService.set("groupDisplayType",e)}setRowClass(e){this.gridOptionsService.set("rowClass",e)}setDeltaSort(e){this.gridOptionsService.set("deltaSort",e)}setRowCount(e,t){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(e,t);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(e,t);return}this.logMissingRowModel("setRowCount","infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,t){let n=this.columnModel.getPrimaryColumn(e);return $e(n)&&(n=this.columnModel.getGridColumn(e)),$e(n)?null:this.valueService.getValue(n,t)}addEventListener(e,t){const n=this.gridOptionsService.useAsyncEvents();this.eventService.addEventListener(e,t,n)}addGlobalListener(e){const t=this.gridOptionsService.useAsyncEvents();this.eventService.addGlobalListener(e,t)}removeEventListener(e,t){const n=this.gridOptionsService.useAsyncEvents();this.eventService.removeEventListener(e,t,n)}removeGlobalListener(e){const t=this.gridOptionsService.useAsyncEvents();this.eventService.removeGlobalListener(e,t)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){if(this.destroyCalled)return;this.destroyCalled=!0;const e=this.ctrlsService.getGridCtrl();e&&e.destroyGridUi(),this.context.destroy()}cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid(){setTimeout(Sx.bind(window,this,"Grid API"),100)}warnIfDestroyed(e){return this.destroyCalled&&console.warn(`AG Grid: Grid API method ${e} was called on a grid that was destroyed.`),this.destroyCalled}resetQuickFilter(){this.warnIfDestroyed("resetQuickFilter")||this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(Pe.__assertRegistered(We.RangeSelectionModule,"api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){if(this.rangeService){this.rangeService.addCellRange(e);return}Pe.__assertRegistered(We.RangeSelectionModule,"api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),Pe.__assertRegistered(We.RangeSelectionModule,"gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}getChartModels(){if(Pe.__assertRegistered(We.GridChartsModule,"api.getChartModels",this.context.getGridId()))return this.chartService.getChartModels()}getChartRef(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.getChartRef",this.context.getGridId()))return this.chartService.getChartRef(e)}getChartImageDataURL(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.getChartImageDataURL",this.context.getGridId()))return this.chartService.getChartImageDataURL(e)}downloadChart(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.downloadChart",this.context.getGridId()))return this.chartService.downloadChart(e)}openChartToolPanel(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.openChartToolPanel",this.context.getGridId()))return this.chartService.openChartToolPanel(e)}closeChartToolPanel(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.closeChartToolPanel",this.context.getGridId()))return this.chartService.closeChartToolPanel(e.chartId)}createRangeChart(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.createRangeChart",this.context.getGridId()))return this.chartService.createRangeChart(e)}createPivotChart(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.createPivotChart",this.context.getGridId()))return this.chartService.createPivotChart(e)}createCrossFilterChart(e){if(Pe.__assertRegistered(We.GridChartsModule,"api.createCrossFilterChart",this.context.getGridId()))return this.chartService.createCrossFilterChart(e)}updateChart(e){Pe.__assertRegistered(We.GridChartsModule,"api.updateChart",this.context.getGridId())&&this.chartService.updateChart(e)}restoreChart(e,t){if(Pe.__assertRegistered(We.GridChartsModule,"api.restoreChart",this.context.getGridId()))return this.chartService.restoreChart(e,t)}copyToClipboard(e){Pe.__assertRegistered(We.ClipboardModule,"api.copyToClipboard",this.context.getGridId())&&this.clipboardService.copyToClipboard(e)}cutToClipboard(e){Pe.__assertRegistered(We.ClipboardModule,"api.cutToClipboard",this.context.getGridId())&&this.clipboardService.cutToClipboard(e,"api")}copySelectedRowsToClipboard(e){Pe.__assertRegistered(We.ClipboardModule,"api.copySelectedRowsToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRowsToClipboard(e)}copySelectedRangeToClipboard(e){Pe.__assertRegistered(We.ClipboardModule,"api.copySelectedRangeToClipboard",this.context.getGridId())&&this.clipboardService.copySelectedRangeToClipboard(e)}copySelectedRangeDown(){Pe.__assertRegistered(We.ClipboardModule,"api.copySelectedRangeDown",this.context.getGridId())&&this.clipboardService.copyRangeDown()}pasteFromClipboard(){Pe.__assertRegistered(We.ClipboardModule,"api.pasteFromClipboard",this.context.getGridId())&&this.clipboardService.pasteFromClipboard()}showColumnMenuAfterButtonClick(e,t){const n=this.columnModel.getGridColumn(e);this.menuFactory.showMenuAfterButtonClick(n,t,"columnMenu")}showColumnMenuAfterMouseClick(e,t){let n=this.columnModel.getGridColumn(e);if(n||(n=this.columnModel.getPrimaryColumn(e)),!n){console.error(`AG Grid: column '${e}' not found`);return}this.menuFactory.showMenuAfterMouseEvent(n,t)}hidePopupMenu(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()}setPopupParent(e){this.gridOptionsService.set("popupParent",e)}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map($a)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map($a)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const t=this.columnModel.getGridColumn(e.colKey);if(!t){console.warn(`AG Grid: no column found for ${e.colKey}`);return}const n={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:t};e.rowPinned==null&&this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e.rowIndex);const o=this.navigationService.getCellByPosition(n);o&&o.startRowOrCellEdit(e.key)}addAggFunc(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(e)}applyServerSideTransactionAsync(e,t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(e,t)}retryServerSideLoads(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()}flushServerSideAsyncTransactions(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()}applyTransaction(e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.clientSideRowModel.updateRowData(e)}applyTransactionAsync(e,t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.clientSideRowModel.batchUpdateRowData(e,t)}flushAsyncTransactions(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.clientSideRowModel.flushAsyncTransactions()}setSuppressModelUpdateAfterUpdateTransaction(e){this.gridOptionsService.set("suppressModelUpdateAfterUpdateTransaction",e)}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(e)}refreshServerSideStore(e){return vs("28.0","refreshServerSideStore","refreshServerSide"),this.refreshServerSide(e)}getServerSideStoreState(){return vs("28.0","getServerSideStoreState","getServerSideGroupLevelState"),this.getServerSideGroupLevelState()}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}setDataTypeDefinitions(e){this.gridOptionsService.set("dataTypeDefinitions",e)}setPagination(e){this.gridOptionsService.set("pagination",e)}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationSetPageSize(e){this.gridOptionsService.set("paginationPageSize",e)}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}};wt([xt("immutableService")],vt.prototype,"immutableService",void 0);wt([xt("csvCreator")],vt.prototype,"csvCreator",void 0);wt([xt("excelCreator")],vt.prototype,"excelCreator",void 0);wt([W("rowRenderer")],vt.prototype,"rowRenderer",void 0);wt([W("navigationService")],vt.prototype,"navigationService",void 0);wt([W("filterManager")],vt.prototype,"filterManager",void 0);wt([W("columnModel")],vt.prototype,"columnModel",void 0);wt([W("selectionService")],vt.prototype,"selectionService",void 0);wt([W("gridOptionsService")],vt.prototype,"gridOptionsService",void 0);wt([W("valueService")],vt.prototype,"valueService",void 0);wt([W("alignedGridsService")],vt.prototype,"alignedGridsService",void 0);wt([W("eventService")],vt.prototype,"eventService",void 0);wt([W("pinnedRowModel")],vt.prototype,"pinnedRowModel",void 0);wt([W("context")],vt.prototype,"context",void 0);wt([W("rowModel")],vt.prototype,"rowModel",void 0);wt([W("sortController")],vt.prototype,"sortController",void 0);wt([W("paginationProxy")],vt.prototype,"paginationProxy",void 0);wt([W("focusService")],vt.prototype,"focusService",void 0);wt([W("dragAndDropService")],vt.prototype,"dragAndDropService",void 0);wt([xt("rangeService")],vt.prototype,"rangeService",void 0);wt([xt("clipboardService")],vt.prototype,"clipboardService",void 0);wt([xt("aggFuncService")],vt.prototype,"aggFuncService",void 0);wt([W("menuFactory")],vt.prototype,"menuFactory",void 0);wt([xt("contextMenuFactory")],vt.prototype,"contextMenuFactory",void 0);wt([W("valueCache")],vt.prototype,"valueCache",void 0);wt([W("animationFrameService")],vt.prototype,"animationFrameService",void 0);wt([xt("statusBarService")],vt.prototype,"statusBarService",void 0);wt([xt("chartService")],vt.prototype,"chartService",void 0);wt([xt("undoRedoService")],vt.prototype,"undoRedoService",void 0);wt([xt("rowNodeBlockLoader")],vt.prototype,"rowNodeBlockLoader",void 0);wt([xt("ssrmTransactionManager")],vt.prototype,"serverSideTransactionManager",void 0);wt([W("ctrlsService")],vt.prototype,"ctrlsService",void 0);wt([Re],vt.prototype,"init",null);wt([Hi],vt.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null);vt=wt([Be("gridApi")],vt);var Ml=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},KC;let No=KC=class extends be{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.quickFilter=null,this.quickFilterParts=null,this.processingFilterChange=!1}init(){this.addManagedListener(this.eventService,N.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>{this.refreshFiltersForAggregations(),this.resetQuickFilterCache()}),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VISIBLE,()=>{this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",e=>this.setQuickFilter(e.currentValue)),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",()=>this.onIncludeHiddenColumnsInQuickFilterChanged()),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.setQuickFilterParts(),this.allowShowChangeAfterFilter=this.gridOptionsService.is("allowShowChangeAfterFilter"),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>this.updateAggFiltering())}isExternalFilterPresentCallback(){const e=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1}doesExternalFilterPass(e){const t=this.gridOptionsService.get("doesExternalFilterPass");return typeof t=="function"?t(e):!1}setQuickFilterParts(){this.quickFilterParts=this.quickFilter?this.quickFilter.split(" "):null}setFilterModel(e){const t=[],n=this.getFilterModel();if(e){const s=ew(Object.keys(e));this.allColumnFilters.forEach((o,r)=>{const a=e[r];t.push(this.setModelOnFilterWrapper(o.filterPromise,a)),s.delete(r)}),s.forEach(o=>{const r=this.columnModel.getPrimaryColumn(o)||this.columnModel.getGridColumn(o);if(!r){console.warn("AG Grid: setFilterModel() - no column found for colId: "+o);return}if(!r.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+o);return}const a=this.getOrCreateFilterWrapper(r,"NO_UI");if(!a){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+o);return}t.push(this.setModelOnFilterWrapper(a.filterPromise,e[o]))})}else this.allColumnFilters.forEach(s=>{t.push(this.setModelOnFilterWrapper(s.filterPromise,null))});vn.all(t).then(()=>{const s=this.getFilterModel(),o=[];this.allColumnFilters.forEach((r,a)=>{const l=n?n[a]:null,c=s?s[a]:null;ze.jsonEquals(l,c)||o.push(r.column)}),o.length>0&&this.onFilterChanged({columns:o})})}setModelOnFilterWrapper(e,t){return new vn(n=>{e.then(s=>{typeof s.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),n()),(s.setModel(t)||vn.resolve()).then(()=>n())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((t,n)=>{const o=t.filterPromise.resolveNow(null,a=>a);if(o==null)return null;if(typeof o.getModel!="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}const r=o.getModel();ye(r)&&(e[n]=r)}),e}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=s=>s?s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1,t=!!this.gridOptionsService.getGroupAggFiltering(),n=s=>{if(!s.isPrimary())return!0;const r=!this.columnModel.isPivotActive();return!s.isValueActive()||!r?!1:this.columnModel.isPivotMode()?!0:t};this.allColumnFilters.forEach(s=>{if(s.filterPromise.resolveNow(!1,e)){const o=s.filterPromise.resolveNow(null,r=>r);n(s.column)?this.activeAggregateFilters.push(o):this.activeColumnFilters.push(o)}})}updateFilterFlagInColumns(e,t){this.allColumnFilters.forEach(n=>{const s=n.filterPromise.resolveNow(!1,o=>o.isFilterActive());n.column.setFilterActive(s,e,t)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()}doColumnFiltersPass(e,t,n){const{data:s,aggData:o}=e,r=n?this.activeAggregateFilters:this.activeColumnFilters,a=n?o:s;for(let l=0;l<r.length;l++){const c=r[l];if(!(c==null||c===t)){if(typeof c.doesFilterPass!="function")throw new Error("Filter is missing method doesFilterPass");if(!c.doesFilterPass({node:e,data:a}))return!1}}return!0}parseQuickFilter(e){return ye(e)?this.gridOptionsService.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(e){if(e!=null&&typeof e!="string"){console.warn(`AG Grid - setQuickFilter() only supports string inputs, received: ${typeof e}`);return}const t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.onFilterChanged())}resetQuickFilterCache(){this.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}onIncludeHiddenColumnsInQuickFilterChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.onFilterChanged()}refreshFiltersForAggregations(){this.gridOptionsService.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e={}){const t=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(t,0):t()}onFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:n,columns:s}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",n),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEach(r=>{r.filterPromise&&r.filterPromise.then(a=>{a&&a!==t&&a.onAnyFilterChanged&&a.onAnyFilterChanged()})});const o={type:N.EVENT_FILTER_CHANGED,columns:s||[]};n&&Qn(o,n),this.processingFilterChange=!0,this.eventService.dispatchEvent(o),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.allowShowChangeAfterFilter&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilter!==null}updateAggFiltering(){this.aggFiltering=!!this.gridOptionsService.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&(this.aggFiltering||this.columnModel.isPivotMode())}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!(this.aggFiltering||this.columnModel.isPivotMode())}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassQuickFilterNoCache(e,t){return this.columnModel.getAllColumnsForQuickFilter().some(s=>{const o=this.getQuickFilterTextForColumn(s,e);return ye(o)&&o.indexOf(t)>=0})}doesRowPassQuickFilterCache(e,t){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilter(e){const t=this.gridOptionsService.is("cacheQuickFilter");return this.quickFilterParts.every(n=>t?this.doesRowPassQuickFilterCache(e,n):this.doesRowPassQuickFilterNoCache(e,n))}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip))}getQuickFilterTextForColumn(e,t){let n=this.valueService.getValue(e,t,!0);const s=e.getColDef();if(s.getQuickFilterText){const o={value:n,node:t,data:t.data,column:e,colDef:s,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};n=s.getQuickFilterText(o)}return ye(n)?n.toString().toUpperCase():null}aggregateRowForQuickFilter(e){const t=[];this.columnModel.getAllColumnsForQuickFilter().forEach(s=>{const o=this.getQuickFilterTextForColumn(s,e);ye(o)&&t.push(o)}),e.quickFilterAggregateText=t.join(KC.QUICK_FILTER_SEPARATOR)}onNewRowsLoaded(e){this.allColumnFilters.forEach(t=>{t.filterPromise.then(n=>{n.onNewRowsLoaded&&n.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:t})=>this.valueService.getValue(e,t,!0)}getFilterComponent(e,t,n=!0){var s;if(n)return((s=this.getOrCreateFilterWrapper(e,t))===null||s===void 0?void 0:s.filterPromise)||null;const o=this.cachedFilter(e);return o?o.filterPromise:null}isFilterActive(e){const t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,n=>n.isFilterActive())}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return null;let n=this.cachedFilter(e);if(n)t!=="NO_UI"&&this.putIntoGui(n,t);else{n=this.createFilterWrapper(e,t);const s=e.getColId();this.allColumnFilters.set(s,n),this.allColumnListeners.set(s,this.addManagedListener(e,qe.EVENT_COL_DEF_CHANGED,()=>this.checkDestroyFilter(s)))}return n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;if(Pe.__isRegistered(We.SetFilterModule,this.context.getGridId()))t="agSetColumnFilter";else{const n=e.getColDef().cellDataType;n==="number"?t="agNumberColumnFilter":n==="date"||n==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;if(Pe.__isRegistered(We.SetFilterModule,this.context.getGridId()))t="agSetColumnFloatingFilter";else{const n=e.getColDef().cellDataType;n==="number"?t="agNumberColumnFloatingFilter":n==="date"||n==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e){const t=this.getDefaultFilter(e),n=e.getColDef();let s;const o=Object.assign(Object.assign({},this.createFilterParams(e,n)),{filterModifiedCallback:()=>{const a={type:N.EVENT_FILTER_MODIFIED,column:e,filterInstance:s};this.eventService.dispatchEvent(a)},filterChangedCallback:a=>{const l={filterInstance:s,additionalEventAttributes:a,columns:[e]};this.callOnFilterChangedOutsideRenderCycle(l)},doesRowPassOtherFilter:a=>this.doesRowPassOtherFilters(s,a)}),r=this.userComponentFactory.getFilterDetails(n,o,t);return r?{filterPromise:()=>{const a=r.newAgStackInstance();return a&&a.then(l=>s=l),a},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return{column:e,colDef:xb(t),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),doesRowPassOtherFilter:()=>!0,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}}createFilterWrapper(e,t){var n;const s={column:e,filterPromise:null,compiledElement:null,guiPromise:vn.resolve(null),compDetails:null},{filterPromise:o,compDetails:r}=this.createFilterInstance(e);return s.filterPromise=(n=o==null?void 0:o())!==null&&n!==void 0?n:null,s.compDetails=r,o&&this.putIntoGui(s,t),s}putIntoGui(e,t){const n=document.createElement("div");n.className="ag-filter",e.guiPromise=new vn(s=>{e.filterPromise.then(o=>{let r=o.getGui();ye(r)||console.warn(`AG Grid: getGui method from filter returned ${r}, it should be a DOM element or an HTML template string.`),typeof r=="string"&&(r=Ui(r)),n.appendChild(r),s(n);const a={type:N.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:n};this.eventService.dispatchEvent(a)})})}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((t,n)=>{let s;t.column.isPrimary()?s=this.columnModel.getPrimaryColumn(n):s=this.columnModel.getGridColumn(n),!s&&(e.push(t.column),this.disposeFilterWrapper(t,"columnChanged"),this.disposeColumnListener(n))}),e.length>0?this.onFilterChanged({columns:e}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();e==null||e.forEach(t=>{t.getColDef().filter==="agGroupColumnFilter"&&this.getOrCreateFilterWrapper(t,"NO_UI")})}isFilterAllowed(e){var t,n;if(!e.isFilterAllowed())return!1;const o=this.allColumnFilters.get(e.getColId());return(n=(t=o==null?void 0:o.filterPromise)===null||t===void 0?void 0:t.resolveNow(!0,r=>{var a,l;return typeof((a=r)===null||a===void 0?void 0:a.isFilterAllowed)=="function"?(l=r)===null||l===void 0?void 0:l.isFilterAllowed():!0}))!==null&&n!==void 0?n:!0}getFloatingFilterCompDetails(e,t){const n=e.getColDef(),s=this.createFilterParams(e,n),o=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(n,zC,s);let r=this.userComponentFactory.getDefaultFloatingFilterType(n,()=>this.getDefaultFloatingFilter(e));r==null&&(r="agReadOnlyFloatingFilter");const l={column:e,filterParams:o,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:c=>{const u=this.getFilterComponent(e,"NO_UI");u!=null&&u.then(d=>{c($a(d))})},showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(n,l,r)}getCurrentFloatingFilterParentModel(e){const t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,n=>n&&n.getModel()):null}destroyFilter(e,t="api"){const n=e.getColId(),s=this.allColumnFilters.get(n);this.disposeColumnListener(n),s&&(this.disposeFilterWrapper(s,t),this.onFilterChanged({columns:[e]}))}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){e.filterPromise.then(n=>{(n.setModel(null)||vn.resolve()).then(()=>{this.getContext().destroyBean(n),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId());const s={type:N.EVENT_FILTER_DESTROYED,source:t,column:e.column};this.eventService.dispatchEvent(s)})})}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const n=t.column,{compDetails:s}=n.isFilterAllowed()?this.createFilterInstance(n):{compDetails:null};((r,a)=>{if(!a||!r)return!0;const{componentClass:l}=r,{componentClass:c}=a;return!(l===c||(l==null?void 0:l.render)&&(c==null?void 0:c.render)&&l.render===c.render)})(t.compDetails,s)&&this.destroyFilter(n,"columnChanged")}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};No.QUICK_FILTER_SEPARATOR=`
`;Ml([W("valueService")],No.prototype,"valueService",void 0);Ml([W("columnModel")],No.prototype,"columnModel",void 0);Ml([W("rowModel")],No.prototype,"rowModel",void 0);Ml([W("userComponentFactory")],No.prototype,"userComponentFactory",void 0);Ml([W("rowRenderer")],No.prototype,"rowRenderer",void 0);Ml([Re],No.prototype,"init",null);No=KC=Ml([Be("filterManager")],No);class mw extends Qe{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}}var Vh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class _r extends mw{constructor(e){super(_r.TEMPLATE,e)}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(n,s)=>this.addOrRemoveCssClass(n,s),addOrRemoveBodyCssClass:(n,s)=>this.eFloatingFilterBody.classList.toggle(n,s),setButtonWrapperDisplayed:n=>mt(this.eButtonWrapper,n),setCompDetails:n=>this.setCompDetails(n),getFloatingFilterComp:()=>this.compPromise,setWidth:n=>e.style.width=n,setMenuIcon:n=>this.eButtonShowMainFilter.appendChild(n)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}}_r.TEMPLATE=`<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">
<div ref="eFloatingFilterBody" role="presentation"></div>
<div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">
<button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>
</div>
</div>`;Vh([Ae("eFloatingFilterBody")],_r.prototype,"eFloatingFilterBody",void 0);Vh([Ae("eButtonWrapper")],_r.prototype,"eButtonWrapper",void 0);Vh([Ae("eButtonShowMainFilter")],_r.prototype,"eButtonShowMainFilter",void 0);Vh([Re],_r.prototype,"postConstruct",null);Vh([Hi],_r.prototype,"destroyFloatingFilterComp",null);var wV=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},_i;(function(i){i.AUTO_HEIGHT="ag-layout-auto-height",i.NORMAL="ag-layout-normal",i.PRINT="ag-layout-print"})(_i||(_i={}));class om extends be{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},n=t.autoHeight?_i.AUTO_HEIGHT:t.print?_i.PRINT:_i.NORMAL;this.view.updateLayoutClasses(n,t)}getDomLayout(){var e;const t=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal";return["normal","print","autoHeight"].indexOf(t)===-1?(yt(()=>console.warn(`AG Grid: ${t} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"warn about dom layout values"),"normal"):t}}wV([Re],om.prototype,"postConstruct",null);var Ca=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Qi;(function(i){i[i.Vertical=0]="Vertical",i[i.Horizontal=1]="Horizontal"})(Qi||(Qi={}));var mn;(function(i){i[i.Container=0]="Container",i[i.FakeContainer=1]="FakeContainer"})(mn||(mn={}));class Rr extends be{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=xo(()=>this.lastScrollSource[Qi.Horizontal]=null,500),this.resetLastVScrollDebounced=xo(()=>this.lastScrollSource[Qi.Vertical]=null,500)}postConstruct(){this.enableRtl=this.gridOptionsService.is("enableRtl"),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.centerRowContainerCtrl,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const e=this.ctrlsService.getFakeHScrollComp(),t=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const n=this.gridOptionsService.is("debounceVerticalScrollbar"),s=n?xo(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=n?xo(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),t.onScrollCallback(o)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(this.centerRowContainerCtrl==null)return;e===void 0&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());const n=this.enableRtl?e:-e,s=this.ctrlsService.getTopCenterRowContainerCtrl(),o=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),r=this.ctrlsService.getBottomCenterRowContainerCtrl(),a=this.ctrlsService.getFakeHScrollComp();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(-n),r.setContainerTranslateX(n),s.setContainerTranslateX(n),o.setContainerTranslateX(n);const c=this.centerRowContainerCtrl.getViewportElement(),u=this.lastScrollSource[Qi.Horizontal]===mn.Container;e=Math.abs(e),u?a.setScrollPosition(e):Hd(c,e,this.enableRtl)}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e}onFakeHScroll(){this.isControllingScroll(mn.FakeContainer,Qi.Horizontal)&&this.onHScrollCommon(mn.FakeContainer)}onHScroll(){this.isControllingScroll(mn.Container,Qi.Horizontal)&&this.onHScrollCommon(mn.Container)}onHScrollCommon(e){const t=this.centerRowContainerCtrl.getViewportElement(),{scrollLeft:n}=t;if(this.shouldBlockScrollUpdate(Qi.Horizontal,n,!0))return;let s;e===mn.Container?s=Gd(t,this.enableRtl):s=this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(s)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(mn.FakeContainer,Qi.Vertical)&&this.onVScrollCommon(mn.FakeContainer)}onVScroll(){this.isControllingScroll(mn.Container,Qi.Vertical)&&this.onVScrollCommon(mn.Container)}onVScrollCommon(e){let t;e===mn.Container?t=this.eBodyViewport.scrollTop:t=this.ctrlsService.getFakeVScrollComp().getScrollPosition(),!this.shouldBlockScrollUpdate(Qi.Vertical,t,!0)&&(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e===mn.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gridOptionsService.is("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const t=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(Qi.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged())}fireScrollEvent(e){const t={type:N.EVENT_BODY_SCROLL,direction:e===Qi.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const n=Object.assign(Object.assign({},t),{type:N.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(n)},100)}shouldBlockScrollUpdate(e,t,n=!1){return n&&!ga()?!1:e===Qi.Vertical?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Eh(this.eBodyViewport),{scrollHeight:n}=this.eBodyViewport;return e<0||e+t>n}shouldBlockHorizontalScroll(e){const t=this.centerRowContainerCtrl.getCenterWidth(),{scrollWidth:n}=this.centerRowContainerCtrl.getViewportElement();if(this.enableRtl&&Vd()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>n}redrawRowsAfterScroll(){this.fireScrollEvent(Qi.Vertical)}onHorizontalViewportChanged(){this.centerRowContainerCtrl.onHorizontalViewportChanged()}checkScrollLeft(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(mn.Container)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const s=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(Qi.Horizontal,e)&&(this.enableRtl&&Vd()?e=e>0?0:s:e=Math.min(Math.max(e,0),s)),Hd(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}}getHScrollPosition(){return this.centerRowContainerCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const n=this.rowModel.getRowCount();let s=-1;for(let o=0;o<n;o++){const r=this.rowModel.getRow(o);if(typeof e=="function"){if(r&&e(r)){s=o;break}}else if(e===r||e===r.data){s=o;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(this.gridOptionsService.isDomLayout("print"))return;const n=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=n){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}this.gridOptionsService.is("pagination")&&!this.gridOptionsService.is("suppressPaginationPanel")||this.paginationProxy.goToPageWithIndex(e);const a=this.ctrlsService.getGridBodyCtrl().getStickyTopHeight(),l=this.paginationProxy.getRow(e);let c;do{const u=l.rowTop,d=l.rowHeight,h=this.paginationProxy.getPixelOffset(),f=l.rowTop-h,g=f+l.rowHeight,p=this.getVScrollPosition(),v=this.heightScaler.getDivStretchOffset(),y=p.top+v,C=p.bottom+v,m=C-y,w=this.heightScaler.getScrollPositionForPixel(f),E=this.heightScaler.getScrollPositionForPixel(g-m),R=Math.min((w+E)/2,f),O=y+a>f,A=C<g;let D=null;t==="top"?D=w:t==="bottom"?D=E:t==="middle"?D=R:O?D=w-a:A&&(D=E),D!==null&&(this.setVerticalScrollPosition(D),this.rowRenderer.redraw()),c=u!==l.rowTop||d!==l.rowHeight}while(c);this.animationFrameService.flushAllFrames()}ensureColumnVisible(e,t="auto"){const n=this.columnModel.getGridColumn(e);if(!n||n.isPinned()||!this.columnModel.isColumnDisplayed(n))return;const s=this.getPositionedHorizontalScroll(n,t);s!==null&&this.centerRowContainerCtrl.setCenterViewportScrollLeft(s),this.centerRowContainerCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:n,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowContainerCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowContainerCtrl.getCenterWidth(),a=this.enableRtl;let l=(a?n:s)||o,c=a?s:n;t!=="auto"&&(l=t==="start",c=t==="end");const u=t==="middle";if(l||c||u){const{colLeft:d,colMiddle:h,colRight:f}=this.getColumnBounds(e);return u?h-r/2:l?a?f:d:a?d-r:f-r}return null}isColumnOutsideViewport(e){const{start:t,end:n}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),r=this.enableRtl,a=r?t>o:n<o,l=r?n<s:t>s;return{columnBeforeStart:a,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,n=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),o=e.getLeft(),r=t?-1:1,a=t?n-o:o,l=a+s*r,c=a+s/2*r;return{colLeft:a,colMiddle:c,colRight:l}}getViewportBounds(){const e=this.centerRowContainerCtrl.getCenterWidth(),t=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),n=t,s=e+t;return{start:n,end:s,width:e}}}Ca([W("ctrlsService")],Rr.prototype,"ctrlsService",void 0);Ca([W("animationFrameService")],Rr.prototype,"animationFrameService",void 0);Ca([W("paginationProxy")],Rr.prototype,"paginationProxy",void 0);Ca([W("rowModel")],Rr.prototype,"rowModel",void 0);Ca([W("rowContainerHeightService")],Rr.prototype,"heightScaler",void 0);Ca([W("rowRenderer")],Rr.prototype,"rowRenderer",void 0);Ca([W("columnModel")],Rr.prototype,"columnModel",void 0);Ca([Re],Rr.prototype,"postConstruct",null);class SV{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const n=t||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!n,this.tickDown=e.clientY>s.bottom-o&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e;if(e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}}var Ms=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class os extends be{constructor(e){super(),this.isMultiRowDrag=!1,this.isGridSorted=!1,this.isGridFiltered=!1,this.isRowGroupActive=!1,this.eContainer=e}postConstruct(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel);const e=()=>{this.onSortChanged(),this.onFilterChanged(),this.onRowGroupChanged()};this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_MODEL_UPDATED,()=>{e()}),e(),this.ctrlsService.whenReady(()=>{const t=this.ctrlsService.getGridBodyCtrl();this.autoScrollService=new SV({scrollContainer:t.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>t.getScrollFeature().getVScrollPosition().top,setVerticalPosition:n=>t.getScrollFeature().setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}onSortChanged(){this.isGridSorted=this.sortController.isSortActive()}onFilterChanged(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()}onRowGroupChanged(){const e=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!Kn(e)}getContainer(){return this.eContainer}isInterestedIn(e){return e===Sn.RowDrag}getIconName(){return this.gridOptionsService.is("rowDragManaged")&&this.shouldPreventRowMove()?bt.ICON_NOT_ALLOWED:bt.ICON_MOVE}shouldPreventRowMove(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=this.gridOptionsService.is("rowDragMultiRow"),n=[...this.selectionService.getSelectedNodes()].sort((o,r)=>o.rowIndex==null||r.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(r)),s=e.dragItem.rowNode;return t&&n.indexOf(s)!==-1?(this.isMultiRowDrag=!0,n):(this.isMultiRowDrag=!1,[s])}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(N.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(t=>{t.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gridOptionsService.getDomDataKey()}isDropZoneWithinThisGrid(e){const n=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return!n.contains(s)}onEnterOrDragging(e){this.dispatchGridEvent(N.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const t=this.mouseEventService.getNormalisedPosition(e).y;this.gridOptionsService.is("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const n=this.isFromThisGrid(e),s=this.gridOptionsService.is("rowDragManaged"),o=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!n?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(o[0],t):this.moveRows(o,t))}getRowIndexNumber(e){return parseInt(Ot(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel.getLastHighlightedRowNode(),n=t&&t.highlighted===lr.Below,s=this.mouseEventService.getNormalisedPosition(e).y,o=e.dragItem.rowNodes;let r=n?1:0;if(this.isFromThisGrid(e))o.forEach(a=>{a.rowTop<s&&(r-=1)}),this.moveRows(o,s,r);else{const a=this.gridOptionsService.getCallback("getRowId");let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;this.clientSideRowModel.getHighlightPosition(s)===lr.Above&&l--,this.clientSideRowModel.updateRowData({add:o.map(c=>c.data).filter(c=>!this.clientSideRowModel.getRowNode(a?a({data:c,level:0}):c.id)),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,n=0){this.clientSideRowModel.ensureRowsAtPixel(e,t,n)&&(this.focusService.clearFocusedCell(),this.rangeService&&this.rangeService.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer()){yt(()=>console.warn("AG Grid: addRowDropZone - A container target needs to be provided"),"add-drop-zone-empty-target");return}if(this.dragAndDropService.findExternalZone(e)){console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}let t={getContainer:e.getContainer};e.fromGrid?(e.fromGrid=void 0,t=e):(e.onDragEnter&&(t.onDragEnter=n=>{e.onDragEnter(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_ENTER,n))}),e.onDragLeave&&(t.onDragLeave=n=>{e.onDragLeave(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_LEAVE,n))}),e.onDragging&&(t.onDragging=n=>{e.onDragging(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_MOVE,n))}),e.onDragStop&&(t.onDragStop=n=>{e.onDragStop(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_END,n))})),this.dragAndDropService.addDropTarget(Object.assign({isInterestedIn:n=>n===Sn.RowDrag,getIconName:()=>bt.ICON_MOVE,external:!0},t))}getRowDropZone(e){const t=this.getContainer.bind(this),n=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:t,onDragEnter:e.onDragEnter?a=>{n(a),e.onDragEnter(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_ENTER,a))}:n,onDragLeave:e.onDragLeave?a=>{s(a),e.onDragLeave(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_LEAVE,a))}:s,onDragging:e.onDragging?a=>{o(a),e.onDragging(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_MOVE,a))}:o,onDragStop:e.onDragStop?a=>{r(a),e.onDragStop(this.draggingToRowDragEvent(N.EVENT_ROW_DRAG_END,a))}:r,fromGrid:!0}:{getContainer:t,onDragEnter:n,onDragLeave:s,onDragging:o,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,t){const n=this.mouseEventService.getNormalisedPosition(t).y,s=n>this.paginationProxy.getCurrentPageHeight();let o=-1,r;s||(o=this.rowModel.getRowIndexAtPixel(n),r=this.rowModel.getRow(o));let a;switch(t.vDirection){case Nc.Down:a="down";break;case Nc.Up:a="up";break;default:a=null;break}return{type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:r,y:n,vDirection:a}}dispatchGridEvent(e,t){const n=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(n)}onDragLeave(e){this.dispatchGridEvent(N.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)}onDragStop(e){this.dispatchGridEvent(N.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{t.setDragging(!1)})}}Ms([W("dragAndDropService")],os.prototype,"dragAndDropService",void 0);Ms([W("rowModel")],os.prototype,"rowModel",void 0);Ms([W("paginationProxy")],os.prototype,"paginationProxy",void 0);Ms([W("columnModel")],os.prototype,"columnModel",void 0);Ms([W("focusService")],os.prototype,"focusService",void 0);Ms([W("sortController")],os.prototype,"sortController",void 0);Ms([W("filterManager")],os.prototype,"filterManager",void 0);Ms([W("selectionService")],os.prototype,"selectionService",void 0);Ms([W("mouseEventService")],os.prototype,"mouseEventService",void 0);Ms([W("ctrlsService")],os.prototype,"ctrlsService",void 0);Ms([xt("rangeService")],os.prototype,"rangeService",void 0);Ms([Re],os.prototype,"postConstruct",null);var rs=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},kc;(function(i){i.ANIMATION_ON="ag-row-animation",i.ANIMATION_OFF="ag-row-no-animation"})(kc||(kc={}));const $A="ag-force-vertical-scroll",EV="ag-selectable",_V="ag-column-moving";class Fn extends be{constructor(){super(...arguments),this.stickyTopHeight=0}getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,t,n,s,o,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=s,this.eBottom=o,this.eStickyTop=r,this.setCellTextSelection(this.gridOptionsService.is("enableCellTextSelection")),this.createManagedBean(new om(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Rr(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,n,o,r]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.ctrlsService.registerGridBodyCtrl(this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,N.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(t=>{this.addManagedListener(t,"focusin",n=>{const{target:s}=n,o=ol(s,"ag-root",t);t.classList.toggle("ag-has-focus",!o)}),this.addManagedListener(t,"focusout",n=>{const{target:s,relatedTarget:o}=n,r=t.contains(o),a=ol(o,"ag-root",t);ol(s,"ag-root",t)||(!r||a)&&t.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(_V,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(EV,e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyTopWidth(e);const t=e&&this.gridOptionsService.getScrollbarWidth()||0,n=wc()?16:0,s=`calc(100% + ${t+n}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gridOptionsService.is("stopEditingWhenCellsLoseFocus"))return;const e=n=>{const s=n.relatedTarget;if(Up(s)===null){this.rowRenderer.stopEditing();return}let o=t.some(r=>r.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!o){const r=this.popupService;o=r.getActivePopups().some(a=>a.contains(s))||r.isElementWithinCustomPopup(s)}o||this.rowRenderer.stopEditing()},t=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];t.forEach(n=>this.addManagedListener(n,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,n=t===-1?-1:e+t;this.comp.setRowCount(n)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gridOptionsService.is("alwaysShowVerticalScroll"),t=e?$A:null,n=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||n&&pA(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const t=this.gridOptionsService.isAnimateRows()&&!this.rowContainerHeightService.isStretching(),n=t?kc.ANIMATION_ON:kc.ANIMATION_OFF;this.comp.setRowAnimationCssOnBodyViewport(n,t)};e(),this.addManagedListener(this.eventService,N.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),t=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&t&&this.addManagedListener(e,"wheel",n=>this.onFullWidthContainerWheel(n,t))}onFullWidthContainerWheel(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,t,n){if(!e&&!n)return;this.gridOptionsService.is("preventDefaultOnContextMenu")&&(e||n).preventDefault();const{target:s}=e||t;if(s===this.eBodyViewport||s===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):n&&this.contextMenuFactory.onContextMenu(null,n,null,null,null,this.eGridBody)}}mockContextMenuForIPad(e){if(!ga())return;const t=new li(this.eBodyViewport),n=s=>{e(void 0,s.touchStart,s.touchEvent)};this.addManagedListener(t,li.EVENT_LONG_TAP,n),this.addDestroyFunc(()=>t.destroy())}onBodyViewportWheel(e){this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyTopWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new os(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let t=e.getPinnedTopTotalHeight();t&&(t+=1);let n=e.getPinnedBottomTotalHeight();n&&(n+=1),this.comp.setTopHeight(t),this.comp.setBottomHeight(n),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(n?"inherit":"none"),this.setStickyTopOffsetTop()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyTopWidth(e){if(!e)this.comp.setStickyTopWidth("100%");else{const t=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`)}}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const t=this.ctrlsService.getGridHeaderCtrl().getHeaderHeight(),n=this.pinnedRowModel.getPinnedTopTotalHeight();let s=0;t>0&&(s+=t+1),n>0&&(s+=n+1),this.comp.setStickyTopTop(`${s}px`)}sizeColumnsToFit(e,t){const s=this.isVerticalScrollShowing()?this.gridOptionsService.getScrollbarWidth():0,r=Zg(this.eGridBody)-s;if(r>0){this.columnModel.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}}rs([W("animationFrameService")],Fn.prototype,"animationFrameService",void 0);rs([W("rowContainerHeightService")],Fn.prototype,"rowContainerHeightService",void 0);rs([W("ctrlsService")],Fn.prototype,"ctrlsService",void 0);rs([W("columnModel")],Fn.prototype,"columnModel",void 0);rs([W("scrollVisibleService")],Fn.prototype,"scrollVisibleService",void 0);rs([xt("contextMenuFactory")],Fn.prototype,"contextMenuFactory",void 0);rs([W("headerNavigationService")],Fn.prototype,"headerNavigationService",void 0);rs([W("dragAndDropService")],Fn.prototype,"dragAndDropService",void 0);rs([W("pinnedRowModel")],Fn.prototype,"pinnedRowModel",void 0);rs([W("rowRenderer")],Fn.prototype,"rowRenderer",void 0);rs([W("popupService")],Fn.prototype,"popupService",void 0);rs([W("mouseEventService")],Fn.prototype,"mouseEventService",void 0);rs([W("rowModel")],Fn.prototype,"rowModel",void 0);var zp;(function(i){i[i.FILL=0]="FILL",i[i.RANGE=1]="RANGE"})(zp||(zp={}));var uc;(function(i){i[i.VALUE=0]="VALUE",i[i.DIMENSION=1]="DIMENSION"})(uc||(uc={}));const Fu="ag-cell-range-selected",RV="ag-cell-range-chart",TV="ag-cell-range-single-cell",xV="ag-cell-range-chart-category",AV="ag-cell-range-handle",DV="ag-cell-range-top",OV="ag-cell-range-right",PV="ag-cell-range-bottom",IV="ag-cell-range-left";class MV{constructor(e,t){this.beans=e,this.cellCtrl=t}setComp(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Fu,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(`${Fu}-1`,this.rangeCount===1),this.cellComp.addOrRemoveCssClass(`${Fu}-2`,this.rangeCount===2),this.cellComp.addOrRemoveCssClass(`${Fu}-3`,this.rangeCount===3),this.cellComp.addOrRemoveCssClass(`${Fu}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(RV,this.hasChartRange),Mc(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(TV,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),t=this.isSingleCell(),n=!t&&e.top,s=!t&&e.right,o=!t&&e.bottom,r=!t&&e.left;this.cellComp.addOrRemoveCssClass(DV,n),this.cellComp.addOrRemoveCssClass(OV,s),this.cellComp.addOrRemoveCssClass(PV,o),this.cellComp.addOrRemoveCssClass(IV,r)}isSingleCell(){const{rangeService:e}=this.beans;return this.rangeCount===1&&e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const t=e.getCellRanges();return t.length>0&&t.every(n=>Ss([uc.DIMENSION,uc.VALUE],n.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gridOptionsService.is("enableRtl");let t=!1,n=!1,s=!1,o=!1;const r=this.cellCtrl.getCellPosition().column,{rangeService:a,columnModel:l}=this.beans;let c,u;e?(c=l.getDisplayedColAfter(r),u=l.getDisplayedColBefore(r)):(c=l.getDisplayedColBefore(r),u=l.getDisplayedColAfter(r));const d=a.getCellRanges().filter(h=>a.isCellInSpecificRange(this.cellCtrl.getCellPosition(),h));c||(o=!0),u||(n=!0);for(let h=0;h<d.length&&!(t&&n&&s&&o);h++){const f=d[h],g=a.getRangeStartRow(f),p=a.getRangeEndRow(f);!t&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())&&(t=!0),!s&&this.beans.rowPositionUtils.sameRow(p,this.cellCtrl.getCellPosition())&&(s=!0),!o&&c&&f.columns.indexOf(c)<0&&(o=!0),!n&&u&&f.columns.indexOf(u)<0&&(n=!0)}return{top:t,right:n,bottom:s,left:o}}refreshHandle(){if(!this.beans.rangeService)return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass(AV,!!this.selectionHandle)}shouldHaveSelectionHandle(){const{gridOptionsService:e,rangeService:t}=this.beans,n=t.getCellRanges(),s=n.length;if(this.rangeCount<1||s<1)return!1;const o=Ot(n),r=this.cellCtrl.getCellPosition(),a=e.is("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),l=e.is("enableRangeHandle");let c=s===1&&!this.cellCtrl.isEditing()&&(a||l);if(this.hasChartRange){const d=n[0].type===uc.DIMENSION&&t.isCellInSpecificRange(r,n[0]);this.cellComp.addOrRemoveCssClass(xV,d),c=o.type===uc.VALUE}return c&&o.endRow!=null&&t.isContiguousRange(o)&&t.isBottomRightCell(o,r)}addSelectionHandle(){const{gridOptionsService:e,rangeService:t}=this.beans,n=Ot(t.getCellRanges()).type,o=e.is("enableFillHandle")&&$e(n)?zp.FILL:zp.RANGE;this.selectionHandle&&this.selectionHandle.getType()!==o&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(o)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}}class LV extends be{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode(),this.setupColSpan(),this.setupRowSpan()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode)}setComp(e){this.eGui=e,this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onDisplayColumnsChanged(){const e=this.getColSpanningList();Ur(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const e=this.column.getColSpan(this.rowNode),t=[];if(e===1)t.push(this.column);else{let n=this.column;const s=this.column.getPinned();for(let o=0;n&&o<e&&(t.push(n),n=this.beans.columnModel.getDisplayedColAfter(n),!(!n||$e(n)||s!==n.getPinned()));o++);}return t}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning?e=Ot(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left")return e;const t=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(this.column.getPinned()==="right"){const n=this.beans.columnModel.getBodyContainerWidth();return t+n+(e||0)}return t+(e||0)}applyRowSpan(){if(this.rowSpan===1)return;const t=this.beans.gridOptionsService.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}}class FV extends be{constructor(e,t){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=t,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),t={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.beans.stylingService.processClassRules(e.cellClassRules,t,n=>this.cellComp.addOrRemoveCssClass(n,!0),n=>this.cellComp.addOrRemoveCssClass(n,!1))}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let t;if(typeof e.cellStyle=="function"){const n={column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context},s=e.cellStyle;t=s(n)}else t=e.cellStyle;t&&this.cellComp.setUserStyles(t)}applyClassesFromColDef(){const e=this.column.getColDef(),t={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.staticClasses.length&&this.staticClasses.forEach(n=>this.cellComp.addOrRemoveCssClass(n,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,t),this.staticClasses.length&&this.staticClasses.forEach(n=>this.cellComp.addOrRemoveCssClass(n,!0))}destroy(){super.destroy()}}class vw extends be{constructor(e,t){super(),this.ctrl=e,this.beans=t}setComp(e){this.comp=e,this.setupTooltip()}setupTooltip(){this.browserTooltips=this.beans.gridOptionsService.is("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?this.comp.setTitle(this.tooltip!=null?this.tooltip:void 0):this.createTooltipFeatureIfNeeded()}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){if(this.genericTooltipFeature!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.genericTooltipFeature=this.createManagedBean(new fr(e),this.beans.context)}refreshToolTip(){this.updateTooltipText(),this.browserTooltips&&this.comp.setTitle(this.tooltip!=null?this.tooltip:void 0)}getTooltipParams(){const e=this.ctrl,t=e.getColumn?e.getColumn():void 0,n=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:n,column:t,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0}}getTooltipText(){return this.tooltip}destroy(){super.destroy()}}var st=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Ze=class{postConstruct(){this.doingMasterDetail=this.gridOptionsService.isMasterDetail(),this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};st([W("resizeObserverService")],Ze.prototype,"resizeObserverService",void 0);st([W("paginationProxy")],Ze.prototype,"paginationProxy",void 0);st([W("context")],Ze.prototype,"context",void 0);st([W("columnApi")],Ze.prototype,"columnApi",void 0);st([W("gridApi")],Ze.prototype,"gridApi",void 0);st([W("gridOptionsService")],Ze.prototype,"gridOptionsService",void 0);st([W("expressionService")],Ze.prototype,"expressionService",void 0);st([W("environment")],Ze.prototype,"environment",void 0);st([W("rowRenderer")],Ze.prototype,"rowRenderer",void 0);st([W("templateService")],Ze.prototype,"templateService",void 0);st([W("valueService")],Ze.prototype,"valueService",void 0);st([W("eventService")],Ze.prototype,"eventService",void 0);st([W("columnModel")],Ze.prototype,"columnModel",void 0);st([W("headerNavigationService")],Ze.prototype,"headerNavigationService",void 0);st([W("navigationService")],Ze.prototype,"navigationService",void 0);st([W("columnAnimationService")],Ze.prototype,"columnAnimationService",void 0);st([xt("rangeService")],Ze.prototype,"rangeService",void 0);st([W("focusService")],Ze.prototype,"focusService",void 0);st([xt("contextMenuFactory")],Ze.prototype,"contextMenuFactory",void 0);st([W("popupService")],Ze.prototype,"popupService",void 0);st([W("valueFormatterService")],Ze.prototype,"valueFormatterService",void 0);st([W("stylingService")],Ze.prototype,"stylingService",void 0);st([W("columnHoverService")],Ze.prototype,"columnHoverService",void 0);st([W("userComponentFactory")],Ze.prototype,"userComponentFactory",void 0);st([W("userComponentRegistry")],Ze.prototype,"userComponentRegistry",void 0);st([W("animationFrameService")],Ze.prototype,"animationFrameService",void 0);st([W("dragService")],Ze.prototype,"dragService",void 0);st([W("dragAndDropService")],Ze.prototype,"dragAndDropService",void 0);st([W("sortController")],Ze.prototype,"sortController",void 0);st([W("filterManager")],Ze.prototype,"filterManager",void 0);st([W("rowContainerHeightService")],Ze.prototype,"rowContainerHeightService",void 0);st([W("frameworkOverrides")],Ze.prototype,"frameworkOverrides",void 0);st([W("cellPositionUtils")],Ze.prototype,"cellPositionUtils",void 0);st([W("rowPositionUtils")],Ze.prototype,"rowPositionUtils",void 0);st([W("selectionService")],Ze.prototype,"selectionService",void 0);st([xt("selectionHandleFactory")],Ze.prototype,"selectionHandleFactory",void 0);st([W("rowCssClassCalculator")],Ze.prototype,"rowCssClassCalculator",void 0);st([W("rowModel")],Ze.prototype,"rowModel",void 0);st([W("ctrlsService")],Ze.prototype,"ctrlsService",void 0);st([W("ctrlsFactory")],Ze.prototype,"ctrlsFactory",void 0);st([W("agStackComponentsRegistry")],Ze.prototype,"agStackComponentsRegistry",void 0);st([W("valueCache")],Ze.prototype,"valueCache",void 0);st([W("rowNodeEventThrottle")],Ze.prototype,"rowNodeEventThrottle",void 0);st([W("localeService")],Ze.prototype,"localeService",void 0);st([W("valueParserService")],Ze.prototype,"valueParserService",void 0);st([Re],Ze.prototype,"postConstruct",null);Ze=st([Be("beans")],Ze);class NV extends Ze{constructor(e,t,n){super(),this.cellCtrl=e,this.beans=t,this.column=n}onMouseEvent(e,t){if(!Ao(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}const{eventService:t,rangeService:n,gridOptionsService:s}=this.beans,o=e.ctrlKey||e.metaKey;n&&o&&n.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&n.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,N.EVENT_CELL_CLICKED);t.dispatchEvent(r);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>a.onCellClicked(r),0),(s.is("singleClickEdit")||a.singleClickEdit)&&!s.is("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit()}isDoubleClickOnIPad(){if(!ga()||Ob("dblclick"))return!1;const e=new Date().getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t}onCellDoubleClicked(e){const t=this.column.getColDef(),n=this.cellCtrl.createEvent(e,N.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(n),typeof t.onCellDoubleClicked=="function"&&window.setTimeout(()=>t.onCellDoubleClicked(n),0),!this.beans.gridOptionsService.is("singleClickEdit")&&!this.beans.gridOptionsService.is("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:n,shiftKey:s}=e,o=e.target,{eventService:r,rangeService:a}=this.beans;if(this.isRightClickInExistingRange(e))return;const l=a&&a.getCellRanges().length!=0;if(!s||!l){const c=xs()&&!this.cellCtrl.isEditing()&&!jb(o);this.cellCtrl.focusCell(c)}if(s&&l&&e.preventDefault(),!this.containsWidget(o)){if(a){const c=this.cellCtrl.getCellPosition();if(s)a.extendLatestRangeToCell(c);else{const u=t||n;a.setRangeToCell(c,u)}}r.dispatchEvent(this.cellCtrl.createEvent(e,N.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){const{rangeService:t}=this.beans;return!!(t&&t.isCellInAnyRange(this.cellCtrl.getCellPosition())&&e.button===2)}containsWidget(e){return ol(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,N.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const t=this.cellCtrl.createEvent(e,N.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.getGui(),n=t.contains(e.target),s=t.contains(e.relatedTarget);return n&&s}destroy(){}}class kV extends be{constructor(e,t,n,s,o){super(),this.cellCtrl=e,this.beans=t,this.rowNode=s,this.rowCtrl=o}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case ge.ENTER:this.onEnterKeyDown(e);break;case ge.F2:this.onF2KeyDown(e);break;case ge.ESCAPE:this.onEscapeKeyDown(e);break;case ge.TAB:this.onTabKeyDown(e);break;case ge.BACKSPACE:case ge.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case ge.DOWN:case ge.UP:case ge.RIGHT:case ge.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:n,beans:s,rowNode:o}=this,{gridOptionsService:r,rangeService:a,eventService:l}=s;n.isEditing()||(l.dispatchEvent({type:N.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),bA(e,r.is("enableCellEditingOnBackspace"))?a&&r.isEnableRangeSelection()?a.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):n.isCellEditable()&&o.setDataValue(n.getColumn(),null,"cellClear"):n.startRowOrCellEdit(e,t),l.dispatchEvent({type:N.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))}onEnterKeyDown(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.is("enterNavigatesVertically")){const t=e.shiftKey?ge.UP:ge.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(ge.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(ge.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const s=e.key;s===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(s,e),e.preventDefault())}onSpaceKeyDown(e){const{gridOptionsService:t}=this.beans;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){const n=this.rowNode.isSelected(),s=!n;if(s||!t.is("suppressRowDeselection")){const o=this.beans.gridOptionsService.is("groupSelectsFiltered"),r=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"});n===void 0&&r===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}}var VV=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class zA extends Qe{constructor(e,t,n){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=t,this.eCell=n}postConstruct(){this.getGui().appendChild(gi("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const t=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);const n=()=>{try{const s=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s)}catch{}};if(t){const s={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};t(s)}else n()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}}VV([Re],zA.prototype,"postConstruct",null);const GV="ag-cell",HV="ag-cell-auto-height",BV="ag-cell-normal-height",WV="ag-cell-focus",UV="ag-cell-first-right-pinned",jV="ag-cell-last-left-pinned",$V="ag-cell-not-inline-editing",zV="ag-column-hover",KV="ag-cell-wrap-text";let YV=0;class io extends be{constructor(e,t,n,s){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=e,this.rowNode=t,this.beans=n,this.rowCtrl=s,this.instanceId=e.getId()+"-"+YV++,this.createCellPosition(),this.addFeatures()}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new LV(this,this.beans),this.addDestroyFunc(()=>{var t;(t=this.cellPositionFeature)===null||t===void 0||t.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new FV(this,this.beans),this.addDestroyFunc(()=>{var t;(t=this.cellCustomStyleFeature)===null||t===void 0||t.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new NV(this,this.beans,this.column),this.addDestroyFunc(()=>{var t;(t=this.cellMouseListenerFeature)===null||t===void 0||t.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new kV(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var t;(t=this.cellKeyboardListenerFeature)===null||t===void 0||t.destroy(),this.cellKeyboardListenerFeature=null}),this.beans.rangeService&&this.beans.gridOptionsService.isEnableRangeSelection()&&(this.cellRangeFeature=new MV(this.beans,this),this.addDestroyFunc(()=>{var t;(t=this.cellRangeFeature)===null||t===void 0||t.destroy(),this.cellRangeFeature=null})),this.column.isTooltipEnabled()&&this.addTooltipFeature()}addTooltipFeature(){const t={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:()=>{const n=this.column.getColDef(),s=this.rowNode.data;if(n.tooltipField&&ye(s))return bc(s,n.tooltipField,this.column.isTooltipFieldContainsDots());const o=n.tooltipValueGetter;return o?o({location:"cell",api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted}):null},getValueFormatted:()=>this.valueFormatted};this.tooltipFeature=new vw(t,this.beans),this.addDestroyFunc(()=>{var n;(n=this.tooltipFeature)===null||n===void 0||n.destroy(),this.tooltipFeature=null})}setComp(e,t,n,s,o){var r,a,l,c;this.cellComp=e,this.eGui=t,this.printLayout=s,this.updateAndFormatValue(!0),this.addDomData(),this.onCellFocused(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),n&&this.setupAutoHeight(n),this.setAriaColIndex(),this.beans.gridOptionsService.is("suppressCellFocus")||this.cellComp.setTabIndex(-1);const u=Mo(this.column.getId());this.cellComp.setColId(u),this.cellComp.setRole("gridcell"),(r=this.cellPositionFeature)===null||r===void 0||r.setComp(t),(a=this.cellCustomStyleFeature)===null||a===void 0||a.setComp(e),(l=this.tooltipFeature)===null||l===void 0||l.setComp(e),(c=this.cellKeyboardListenerFeature)===null||c===void 0||c.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(e,t),o&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(d=>d()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(e){if(!this.column.isAutoHeight())return;const t=e.parentElement,n=this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height,s=a=>{if(this.editing||!this.isAlive())return;const{paddingTop:l,paddingBottom:c,borderBottomWidth:u,borderTopWidth:d}=ma(t),h=l+c+u+d,g=e.offsetHeight+h;if(a<5){const v=this.beans.gridOptionsService.getDocument(),y=!v||!v.contains(e),C=g==0;if(y||C){this.beans.frameworkOverrides.setTimeout(()=>s(a+1),0);return}}const p=Math.max(g,n);this.rowNode.setRowAutoHeight(p,this.column)},o=()=>s(0);o();const r=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(()=>{r(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getInstanceId(){return this.instanceId}showValue(e=!1){const t=this.valueFormatted!=null?this.valueFormatted:this.value,n=this.createCellRendererParams(),s=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),n);this.cellComp.setRenderDetails(s,t,e),this.refreshHandle()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(e.checkboxSelection),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gridOptionsService.is("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(e.checkboxSelection),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource);return t||n||s}startEditing(e=null,t=!1,n=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp){this.onCellCompAttachedFuncs.push(()=>{this.startEditing(e,t,n)});return}const s=this.createCellEditorParams(e,t),o=this.column.getColDef(),r=this.beans.userComponentFactory.getCellEditorDetails(o,s),a=(r==null?void 0:r.popupFromSelector)!=null?r.popupFromSelector:!!o.cellEditorPopup,l=(r==null?void 0:r.popupPositionFromSelector)!=null?r.popupPositionFromSelector:o.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(r,a,l);const c=this.createEvent(n,N.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(c)}setEditing(e){this.editing!==e&&(this.editing=e,this.refreshHandle())}stopRowOrCellEdit(e=!1){this.beans.gridOptionsService.get("editType")==="fullRow"?this.rowCtrl.stopRowEditing(e):this.stopEditing(e)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(e){const t={newValueExists:!1};if(e)return t;const n=this.cellComp.getCellEditor();return!n||n.isCancelAfterEnd&&n.isCancelAfterEnd()?t:{newValue:n.getValue(),newValueExists:!0}}saveNewValue(e,t){if(t===e)return!1;this.suppressRefreshCell=!0;const n=this.rowNode.setDataValue(this.column,t,"edit");return this.suppressRefreshCell=!1,n}stopEditing(e=!1){if(!this.editing)return!1;const{newValue:t,newValueExists:n}=this.takeValueFromCellEditor(e),s=this.rowNode.getValueFromValueService(this.column);let o=!1;return n&&(o=this.saveNewValue(s,t)),this.setEditing(!1),this.cellComp.setEditDetails(),this.updateAndFormatValue(),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(s,t,!e&&!!o),o}dispatchEditingStoppedEvent(e,t,n){const s=Object.assign(Object.assign({},this.createEvent(null,N.EVENT_CELL_EDITING_STOPPED)),{oldValue:e,newValue:t,valueChanged:n});this.beans.eventService.dispatchEvent(s)}createCellEditorParams(e,t){return{value:this.rowNode.getValueFromValueService(this.column),eventKey:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsService.api,cellStartedEdit:t,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}}createCellRendererParams(){return{value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:t=>this.beans.valueService.setValue(this.rowNode,this.column,t),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(t,n,s,o)=>this.registerRowDragger(t,n,o)}}parseValue(e){return this.beans.valueParserService.parseValue(this.column,this.rowNode,e,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusOut&&e.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const e=this.cellComp.getCellEditor();e&&e.focusIn?e.focusIn():this.focusCell(!0)}onCellChanged(e){if(!this.cellComp)return;e.column===this.column&&this.refreshCell({})}refreshCell(e){var t,n,s;if(this.suppressRefreshCell||this.editing||!this.cellComp)return;const o=this.column.getColDef(),r=e!=null&&!!e.newData,a=e!=null&&!!e.suppressFlash||!!o.suppressCellFlash,l=o.field==null&&o.valueGetter==null&&o.showRowGroup==null,c=e&&e.forceRefresh||l||r,u=this.updateAndFormatValue();if(c||u){this.showValue(r);const h=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!a&&!h&&(this.beans.gridOptionsService.is("enableCellChangeFlash")||o.enableCellChangeFlash)&&this.flashCell(),(t=this.cellCustomStyleFeature)===null||t===void 0||t.applyUserStyles(),(n=this.cellCustomStyleFeature)===null||n===void 0||n.applyClassesFromColDef()}this.refreshToolTip(),(s=this.cellCustomStyleFeature)===null||s===void 0||s.applyCellClassRules()}stopEditingAndFocus(e=!1,t=!1){this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit(t)}navigateAfterEdit(e){if(this.beans.gridOptionsService.is("enterNavigatesVerticallyAfterEdit")){const n=e?ge.UP:ge.DOWN;this.beans.navigationService.navigateToNextCell(null,n,this.getCellPosition(),!1)}}flashCell(e){const t=e&&e.flashDelay,n=e&&e.fadeDelay;this.animateCell("data-changed",t,n)}animateCell(e,t,n){var s,o;const r=`ag-cell-${e}`,a=`ag-cell-${e}-animation`,{gridOptionsService:l}=this.beans;t||(t=(s=l.getNum("cellFlashDelay"))!==null&&s!==void 0?s:500),ye(n)||(n=(o=l.getNum("cellFadeDelay"))!==null&&o!==void 0?o:1e3),this.cellComp.addOrRemoveCssClass(r,!0),this.cellComp.addOrRemoveCssClass(a,!1),window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!1),this.cellComp.addOrRemoveCssClass(a,!0),this.eGui.style.transition=`background-color ${n}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(a,!1),this.eGui.style.transition="")},n))},t)}onFlashCells(e){if(!this.cellComp)return;const t=this.beans.cellPositionUtils.createId(this.getCellPosition());e.cells[t]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(e){const t=this.callValueFormatter(e);return t??e}callValueFormatter(e){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e=!1){const t=this.value,n=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),e?!0:!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n}valuesAreEqual(e,t){const n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}getComp(){return this.cellComp}getValue(){return this.value}getValueFormatted(){return this.valueFormatted}addDomData(){const e=this.getGui();this.beans.gridOptionsService.setDomData(e,io.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gridOptionsService.setDomData(e,io.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){return{type:t,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,rowIndex:this.rowNode.rowIndex}}processCharacter(e){var t;(t=this.cellKeyboardListenerFeature)===null||t===void 0||t.processCharacter(e)}onKeyDown(e){var t;(t=this.cellKeyboardListenerFeature)===null||t===void 0||t.onKeyDown(e)}onMouseEvent(e,t){var n;(n=this.cellMouseListenerFeature)===null||n===void 0||n.onMouseEvent(e,t)}getGui(){return this.eGui}refreshToolTip(){var e;(e=this.tooltipFeature)===null||e===void 0||e.refreshToolTip()}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var e;this.cellComp&&((e=this.cellPositionFeature)===null||e===void 0||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&this.setAriaColIndex()}setAriaColIndex(){const e=this.beans.columnModel.getAriaColumnIndex(this.column);Vb(this.getGui(),e)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var e;return(e=this.cellPositionFeature)===null||e===void 0?void 0:e.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}getBeans(){return this.beans}isPrintLayout(){return this.printLayout}appendChild(e){this.eGui.appendChild(e)}refreshHandle(){this.cellRangeFeature&&this.cellRangeFeature.refreshHandle()}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(e,t=null){this.cellComp&&(this.beans.gridOptionsService.get("editType")==="fullRow"?this.rowCtrl.startRowEditing(e,this):this.startEditing(e,!0,t))}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return this.cellRangeFeature!=null}focusCell(e=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const e=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(UV,e)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const e=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(jV,e)}onCellFocused(e){if(!this.cellComp||this.beans.gridOptionsService.is("suppressCellFocus"))return;const t=this.beans.focusService.isCellFocused(this.cellPosition);this.cellComp.addOrRemoveCssClass(WV,t),t&&e&&e.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!e.preventScrollOnBrowserFocus});const n=this.beans.gridOptionsService.get("editType")==="fullRow";!t&&!n&&this.editing&&this.stopRowOrCellEdit()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:Qr(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass(GV,!0),this.cellComp.addOrRemoveCssClass($V,!0);const e=this.column.isAutoHeight()==!0;this.cellComp.addOrRemoveCssClass(HV,e),this.cellComp.addOrRemoveCssClass(BV,!e)}onColumnHover(){if(!this.cellComp||!this.beans.gridOptionsService.is("columnHoverHighlight"))return;const e=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(zV,e)}onColDefChanged(){this.cellComp&&(this.setWrapText(),this.editing||this.refreshCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.cellComp.addOrRemoveCssClass(KV,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),n=this.createEvent(e,N.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>t.onCellContextMenu(n),0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const e=new im;return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=new zA(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const s=this.createRowDragComp(e,t,n);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,n){const s=this.beans.gridOptionsService.is("pagination"),o=this.beans.gridOptionsService.is("rowDragManaged"),r=this.beans.gridOptionsService.isRowModelType("clientSide");if(o){if(!r){yt(()=>console.warn("AG Grid: managed row dragging is only allowed in the Client Side Row Model"),"CellComp.addRowDragging");return}if(s){yt(()=>console.warn("AG Grid: managed row dragging is not possible when doing pagination"),"CellComp.addRowDragging");return}}const a=new ml(()=>this.value,this.rowNode,this.column,e,t,n);return this.beans.context.createBean(a),a}}io.DOM_DATA_KEY_CELL_CTRL="cellCtrl";var Dn;(function(i){i.Normal="Normal",i.FullWidth="FullWidth",i.FullWidthLoading="FullWidthLoading",i.FullWidthGroup="FullWidthGroup",i.FullWidthDetail="FullWidthDetail"})(Dn||(Dn={}));let qV=0;class no extends be{constructor(e,t,n,s,o){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.lastMouseDownOnDragger=!1,this.updateColumnListsPending=!1,this.businessKeySanitised=null,this.beans=t,this.gridOptionsService=t.gridOptionsService,this.rowNode=e,this.paginationPage=t.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=s,this.printLayout=o,this.instanceId=e.id+"-"+qV++,this.setAnimateFlags(n),this.initRowBusinessKey(),this.rowFocused=t.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=t.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gridOptionsService.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=Mo(e)}isSticky(){return this.rowNode.sticky}getBeans(){return this.beans}getInstanceId(){return this.instanceId}setComp(e,t,n){const s={rowComp:e,element:t,containerType:n};this.allRowGuis.push(s),n===Ji.LEFT?this.leftGui=s:n===Ji.RIGHT?this.rightGui=s:n===Ji.FULL_WIDTH?this.fullWidthGui=s:this.centerGui=s,this.initialiseRowComp(s),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),e===Ji.LEFT?this.leftGui=void 0:e===Ji.RIGHT?this.rightGui=void 0:e===Ji.FULL_WIDTH&&(this.fullWidthGui=void 0)}isCacheable(){return this.rowType===Dn.FullWidthDetail&&this.gridOptionsService.is("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(n=>n.element.style.display=t)}initialiseRowComp(e){const t=this.gridOptionsService;this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(e),t.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=e.rowComp;n.setRole("row"),this.getInitialRowClasses(e.containerType).forEach(o=>n.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Ks(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),this.isFullWidth()&&!this.gridOptionsService.is("suppressCellFocus")&&n.setTabIndex(-1),t.setDomData(e.element,no.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>t.setDomData(e.element,no.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,e.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e.element),this.isFullWidth()&&this.setupFullWidth(e),t.is("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKeySanitised!=null&&e.setRowBusinessKey(this.businessKeySanitised)}setRowCompRowId(e){const t=Mo(this.rowNode.id);t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(LC(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(LC(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){if(this.gridOptionsService.isEnableRangeSelection()){yt(()=>{console.warn("AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`")},"rowDragAndRangeSelectionEnabled");return}const t=this.beans.localeService.getLocaleTextFunc(),n=new ml(()=>`1 ${t("rowDragRow","row")}`,this.rowNode,void 0,e.element,void 0,!0);this.createManagedBean(n,this.beans.context)}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthParams(e.element,t);if(this.rowType==Dn.FullWidthDetail&&!Pe.__assertRegistered(We.MasterDetailModule,"cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;let s;switch(this.rowType){case Dn.FullWidthDetail:s=this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(n);break;case Dn.FullWidthGroup:s=this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(n);break;case Dn.FullWidthLoading:s=this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(n);break;default:s=this.beans.userComponentFactory.getFullWidthCellRendererDetails(n);break}e.rowComp.showFullWidth(s)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderer(){var e,t;return(t=(e=this.fullWidthGui)===null||e===void 0?void 0:e.rowComp)===null||t===void 0?void 0:t.getFullWidthCellRenderer()}getCellElement(e){const t=this.getCellCtrl(e);return t?t.getGui():null}executeProcessRowPostCreateFunc(){var e;const t=this.gridOptionsService.getCallback("processRowPostCreate");if(!t||!this.areAllContainersReady())return;const n={eRow:(e=this.centerGui)===null||e===void 0?void 0:e.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};t(n)}areAllContainersReady(){const e=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),t=!!this.centerGui,n=!!this.rightGui||!this.beans.columnModel.isPinningRight();return e&&t&&n}setRowType(){const e=this.rowNode.stub,t=this.rowNode.isFullWidthCell(),n=this.beans.doingMasterDetail&&this.rowNode.detail,s=this.beans.columnModel.isPivotMode(),r=!!this.rowNode.group&&!this.rowNode.footer&&this.gridOptionsService.isGroupUseEntireRow(s);e?this.rowType=Dn.FullWidthLoading:n?this.rowType=Dn.FullWidthDetail:t?this.rowType=Dn.FullWidth:r?this.rowType=Dn.FullWidthGroup:this.rowType=Dn.Normal}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;if(e||this.gridOptionsService.is("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(e,t,n=null){const s={list:[],map:{}},o=(r,a)=>{s.list.push(a),s.map[r]=a};return t.forEach(r=>{const a=r.getInstanceId();let l=e.map[a];l||(l=new io(r,this.rowNode,this.beans,this)),o(a,l)}),e.list.forEach(r=>{if(s.map[r.getColumn().getInstanceId()]!=null)return;if(!this.isCellEligibleToBeRemoved(r,n)){o(r.getColumn().getInstanceId(),r);return}r.destroy()}),s}updateColumnListsImpl(e=!1){this.updateColumnListsPending=!1;const t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const n=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);const s=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const o=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}this.allRowGuis.forEach(n=>{const s=n.containerType===Ji.LEFT?this.leftCellCtrls:n.containerType===Ji.RIGHT?this.rightCellCtrls:this.centerCellCtrls;n.rowComp.setCellCtrls(s.list,e)})}isCellEligibleToBeRemoved(e,t){if(e.getColumn().getPinned()!=t)return!0;const r=e.isEditing(),a=this.beans.focusService.isCellFocused(e.getCellPosition());if(r||a){const c=e.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(c)>=0)}return!0}listenOnDomOrder(e){const t=()=>{const n=this.gridOptionsService.is("ensureDomOrder"),s=this.gridOptionsService.isDomLayout("print");e.rowComp.setDomOrder(n||s)};this.addManagedPropertyListener("domLayout",t),t()}setAnimateFlags(e){if(this.isSticky()||!e)return;const t=ye(this.rowNode.oldRowTop),n=this.beans.columnModel.isPinningLeft(),s=this.beans.columnModel.isPinningRight();t?(this.slideInAnimation.center=!0,this.slideInAnimation.left=n,this.slideInAnimation.right=s):(this.fadeInAnimation.center=!0,this.fadeInAnimation.left=n,this.fadeInAnimation.right=s)}isEditing(){return this.editingRow}stopRowEditing(e){this.stopEditing(e)}isFullWidth(){return this.rowType!==Dn.Normal}getRowType(){return this.rowType}refreshFullWidth(){const e=(a,l)=>{if(!a)return!0;const c=a.rowComp.getFullWidthCellRenderer();if(!c||!c.refresh)return!1;const u=this.createFullWidthParams(a.element,l);return c.refresh(u)},t=e(this.fullWidthGui,null),n=e(this.centerGui,null),s=e(this.leftGui,"left"),o=e(this.rightGui,"right");return t&&n&&s&&o}addListeners(){this.addManagedListener(this.rowNode,xe.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,xe.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,xe.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,xe.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const e=this.beans.eventService;this.addManagedListener(e,N.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(e,N.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(e,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(e,N.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(e,N.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(e,N.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(e,N.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(e,N.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(e,N.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()}onColumnMoved(){this.updateColumnLists()}addListenersForCellComps(){this.addManagedListener(this.rowNode,xe.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())}),this.addManagedListener(this.rowNode,xe.EVENT_CELL_CHANGED,e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))})}onRowNodeDataChanged(e){if(this.rowNode.detailNode&&this.beans.rowRenderer.refreshFullWidthRow(this.rowNode.detailNode),this.isFullWidth()){this.beans.rowRenderer.refreshFullWidthRow(this.rowNode);return}this.getAllCellCtrls().forEach(t=>t.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(t=>{this.setRowCompRowId(t.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(t.rowComp)}),this.onRowSelected(),this.postProcessCss()}onRowNodeCellChanged(){this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const n=e===lr.Above,s=e===lr.Below;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",n),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",s)})}onRowNodeDraggingChanged(){this.postProcessRowDragging()}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}updateExpandedCss(){const e=this.rowNode.isExpandable(),t=this.rowNode.expanded==!0;this.allRowGuis.forEach(n=>{n.rowComp.addOrRemoveCssClass("ag-row-group",e),n.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),n.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),Ks(n.element,e&&t)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Qr(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.allRowGuis.find(l=>l.element.contains(e.target));if(!((t?t.element:null)===e.target))return;const o=this.rowNode,r=this.beans.focusService.getFocusedCell(),a={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:r&&r.column};this.beans.navigationService.navigateToNextCell(e,e.key,a,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Ao(e))return;const t=this.allRowGuis.find(r=>r.element.contains(e.target)),n=t?t.element:null,s=n===e.target;let o=null;s||(o=this.beans.focusService.findNextFocusableElement(n,!1,e.shiftKey)),(this.isFullWidth()&&s||!o)&&this.beans.navigationService.onTabKeyDown(this,e)}onFullWidthRowFocused(e){var t;const n=this.rowNode,s=e?this.isFullWidth()&&e.rowIndex===n.rowIndex&&e.rowPinned==n.rowPinned:!1,o=this.fullWidthGui?this.fullWidthGui.element:(t=this.centerGui)===null||t===void 0?void 0:t.element;o&&(o.classList.toggle("ag-full-width-focus",s),s&&o.focus({preventScroll:!0}))}refreshCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()}removeCellCtrl(e,t){const n={list:[],map:{}};return e.list.forEach(s=>{s!==t&&(n.list.push(s),n.map[s.getInstanceId()]=s)}),n}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:t}}createRowEventWithSource(e,t){const n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){if(Ao(e))return;const t=this.createRowEventWithSource(N.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}onRowMouseDown(e){if(this.lastMouseDownOnDragger=ol(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,n=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:n.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}onRowClick(e){if(Ao(e)||this.lastMouseDownOnDragger)return;const n=this.createRowEventWithSource(N.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(n);const s=e.ctrlKey||e.metaKey,o=e.shiftKey;if(this.gridOptionsService.is("groupSelectsChildren")&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.is("suppressRowClickSelection"))return;const a=this.gridOptionsService.is("rowMultiSelectWithClick"),l=!this.gridOptionsService.is("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())a?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):s?l&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!o,rangeSelect:o,event:e,source:c});else{const u=a?!1:!s;this.rowNode.setSelectedParams({newValue:!0,clearSelection:u,rangeSelect:o,event:e,source:c})}}setupDetailRowAutoHeight(e){if(this.rowType!==Dn.FullWidthDetail||!this.gridOptionsService.is("detailRowAutoHeight"))return;const t=()=>{const s=e.clientHeight;if(s!=null&&s>0){const o=()=>{this.rowNode.setRowHeight(s),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()};this.beans.frameworkOverrides.setTimeout(o,0)}},n=this.beans.resizeObserverService.observeResize(e,t);this.addDestroyFunc(n),t()}createFullWidthParams(e,t){return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(s,o,r,a)=>this.addFullWidthRowDragging(s,o,r,a)}}addFullWidthRowDragging(e,t,n="",s){if(!this.isFullWidth())return;const o=new ml(()=>n,this.rowNode,void 0,e,t,s);this.createManagedBean(o,this.beans.context)}onUiLevelChanged(){const e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass(t,!0),s.rowComp.addOrRemoveCssClass(n,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}onModelUpdated(){this.refreshFirstAndLastRowStyles()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-row-last",t)))}stopEditing(e=!1){if(this.stoppingRowEdit)return;const t=this.getAllCellCtrls(),n=this.editingRow;this.stoppingRowEdit=!0;let s=!1;for(const o of t){const r=o.stopEditing(e);n&&!e&&!s&&r&&(s=!0)}if(s){const o=this.createRowEvent(N.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(o)}n&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(e){this.allRowGuis.forEach(t=>{t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})}setEditingRow(e){this.editingRow=e,this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-row-editing",e));const t=e?this.createRowEvent(N.EVENT_ROW_EDITING_STARTED):this.createRowEvent(N.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)}startRowEditing(e=null,t=null,n=null){if(this.editingRow)return;this.getAllCellCtrls().reduce((o,r)=>{const a=r===t;return a?r.startEditing(e,a,n):r.startEditing(null,a,n),o?!0:r.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!e||!e.length||e.forEach(t=>{this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e){const t=this.processStylesFromGridOptions();this.forEachGui(e,n=>n.rowComp.setUserStyles(t))}getPinnedForContainer(e){return e===Ji.LEFT?"left":e===Ji.RIGHT?"right":null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),n={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(n)}processStylesFromGridOptions(){const e=this.gridOptionsService.get("rowStyle");if(e&&typeof e=="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}const t=this.gridOptionsService.getCallback("getRowStyle");let n;if(t){const s={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};n=t(s)}return Object.assign({},e,n)}onRowSelected(e){const t=!!this.rowNode.isSelected();this.forEachGui(e,n=>{n.rowComp.addOrRemoveCssClass("ag-row-selected",t),Mc(n.element,t?!0:void 0);const s=this.createAriaLabel();pa(n.element,s??"")})}createAriaLabel(){const e=this.rowNode.isSelected();return e&&this.gridOptionsService.is("suppressRowDeselection")?void 0:this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row.`)}isUseAnimationFrameForCreate(){return this.useAnimationFrameForCreate}addHoverFunctionality(e){this.active&&(this.addManagedListener(e,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(e,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,xe.EVENT_MOUSE_ENTER,()=>{!this.beans.dragService.isDragging()&&!this.gridOptionsService.is("suppressRowHoverHighlight")&&(e.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,xe.EVENT_MOUSE_LEAVE,()=>{e.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(e){const n=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.applyPaginationOffset(n.top,!0)-100,o=this.applyPaginationOffset(n.bottom,!0)+100;return Math.min(Math.max(s,e),o)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(e,t){(e?[e]:this.allRowGuis).forEach(t)}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),o=this.gridOptionsService.isGetRowHeightFunction()?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,r=o?`${Math.min(n,o)-2}px`:void 0;this.forEachGui(e,a=>{a.element.style.height=`${t}px`,r&&a.element.style.setProperty("--ag-line-height",r)})}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}destroyFirstPass(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);const e=this.createRowEvent(N.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(e),this.beans.eventService.dispatchEvent(e),super.destroy()}setupRemoveAnimation(){if(this.isSticky())return;if(this.rowNode.rowTop!=null){const t=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(t)}else this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0))}destroySecondPass(){this.allRowGuis.length=0;const e=t=>(t.list.forEach(n=>n.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocused(){this.onCellFocusChanged()}onCellFocusCleared(){this.onCellFocusChanged()}onCellFocusChanged(){const e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const n=this.beans.paginationProxy.getPixelOffset();return e+n*(t?1:-1)}setRowTop(e){if(!this.printLayout&&ye(e)){const t=this.applyPaginationOffset(e),o=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t)}px`;this.setRowTopStyle(o)}}getInitialRowTop(e){return this.gridOptionsService.is("suppressRowTransform")?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.gridOptionsService.is("suppressRowTransform")?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";let t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{const n=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,s=this.applyPaginationOffset(n);t=this.rowNode.isRowPinned()?s:this.beans.rowContainerHeightService.getRealPixelPosition(s)}return t+"px"}setRowTopStyle(e){const t=this.gridOptionsService.is("suppressRowTransform");this.allRowGuis.forEach(n=>t?n.rowComp.setTop(e):n.rowComp.setTransform(`translateY(${e})`))}getRowNode(){return this.rowNode}getCellCtrl(e){let t=null;return this.getAllCellCtrls().forEach(n=>{n.getColumn()==e&&(t=n)}),t!=null||this.getAllCellCtrls().forEach(n=>{n.getColSpanningList().indexOf(e)>=0&&(t=n)}),t}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString(),n=this.beans.headerNavigationService.getHeaderRowCount(),s=this.rowNode.rowIndex%2===0,o=n+this.rowNode.rowIndex+1;this.forEachGui(e,r=>{r.rowComp.setRowIndex(t),r.rowComp.addOrRemoveCssClass("ag-row-even",s),r.rowComp.addOrRemoveCssClass("ag-row-odd",!s),kb(r.element,o)})}getPinnedLeftRowElement(){return this.leftGui?this.leftGui.element:void 0}getPinnedRightRowElement(){return this.rightGui?this.rightGui.element:void 0}getBodyRowElement(){return this.centerGui?this.centerGui.element:void 0}getFullWidthRowElement(){return this.fullWidthGui?this.fullWidthGui.element:void 0}}no.DOM_DATA_KEY_ROW_CTRL="renderedRow";var as=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Nn extends be{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Ob("touchstart")?"touchstart":"mousedown"].forEach(n=>{const s=this.processMouseEvent.bind(this,n);this.addManagedListener(this.element,n,s)})}processMouseEvent(e,t){if(!this.mouseEventService.isEventFromThisGrid(t)||Ao(t))return;const n=this.getRowForEvent(t),s=this.mouseEventService.getRenderedCellForEvent(t);e==="contextmenu"?this.handleContextMenuMouseEvent(t,null,n,s):(s&&s.onMouseEvent(e,t),n&&n.onMouseEvent(e,t))}mockContextMenuForIPad(){if(!ga())return;const e=new li(this.element),t=n=>{const s=this.getRowForEvent(n.touchEvent),o=this.mouseEventService.getRenderedCellForEvent(n.touchEvent);this.handleContextMenuMouseEvent(null,n.touchEvent,s,o)};this.addManagedListener(e,li.EVENT_LONG_TAP,t),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let t=e.target;for(;t;){const n=this.gridOptionsService.getDomData(t,no.DOM_DATA_KEY_ROW_CTRL);if(n)return n;t=t.parentElement}return null}handleContextMenuMouseEvent(e,t,n,s){const o=n?n.getRowNode():null,r=s?s.getColumn():null;let a=null;if(r){const u=e||t;s.dispatchCellContextMenuEvent(u),a=this.valueService.getValue(r,o)}const l=this.ctrlsService.getGridBodyCtrl(),c=s?s.getGui():l.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,t,o,r,a,c)}getControlsForEventTarget(e){return{cellCtrl:Hp(this.gridOptionsService,e,io.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Hp(this.gridOptionsService,e,no.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,t){const{cellCtrl:n,rowCtrl:s}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))}processCellKeyboardEvent(e,t,n){const s=e.getRowNode(),o=e.getColumn(),r=e.isEditing();if(!jp(this.gridOptionsService,n,s,o,r)&&t==="keydown"&&(!r&&this.navigationService.handlePageScrollingKey(n)||e.onKeyDown(n),this.doGridOperations(n,e.isEditing()),Zb(n)&&e.processCharacter(n)),t==="keydown"){const l=e.createEvent(n,N.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l)}}processFullWidthRowKeyboardEvent(e,t,n){const s=e.getRowNode(),o=this.focusService.getFocusedCell(),r=o&&o.column;if(!jp(this.gridOptionsService,n,s,r,!1)){const l=n.key;if(t==="keydown")switch(l){case ge.PAGE_HOME:case ge.PAGE_END:case ge.PAGE_UP:case ge.PAGE_DOWN:this.navigationService.handlePageScrollingKey(n,!0);break;case ge.UP:case ge.DOWN:e.onKeyboardNavigate(n);break;case ge.TAB:e.onTabKeyDown(n);break}}if(t==="keydown"){const l=e.createRowEvent(N.EVENT_CELL_KEY_DOWN,n);this.eventService.dispatchEvent(l)}}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!this.mouseEventService.isEventFromThisGrid(e))return;const n=yA(e);if(n===ge.A)return this.onCtrlAndA(e);if(n===ge.C)return this.onCtrlAndC(e);if(n===ge.D)return this.onCtrlAndD(e);if(n===ge.V)return this.onCtrlAndV(e);if(n===ge.X)return this.onCtrlAndX(e);if(n===ge.Y)return this.onCtrlAndY();if(n===ge.Z)return this.onCtrlAndZ(e)}onCtrlAndA(e){const{pinnedRowModel:t,paginationProxy:n,rangeService:s}=this;if(s&&n.isRowsToRender()){const[o,r]=[t.isEmpty("top"),t.isEmpty("bottom")],a=o?null:"top";let l,c;r?(l=null,c=this.paginationProxy.getRowCount()-1):(l="bottom",c=t.getPinnedBottomRowData().length-1);const u=this.columnModel.getAllDisplayedColumns();if(Kn(u))return;s.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l,columnStart:u[0],columnEnd:Ot(u)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection"))return;const{cellCtrl:t,rowCtrl:n}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||n!=null&&n.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")||this.gridOptionsService.is("suppressCutToClipboard"))return;const{cellCtrl:t,rowCtrl:n}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||n!=null&&n.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:t,rowCtrl:n}=this.getControlsForEventTarget(e.target);t!=null&&t.isEditing()||n!=null&&n.isEditing()||this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gridOptionsService.is("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}}as([W("mouseEventService")],Nn.prototype,"mouseEventService",void 0);as([W("valueService")],Nn.prototype,"valueService",void 0);as([xt("contextMenuFactory")],Nn.prototype,"contextMenuFactory",void 0);as([W("ctrlsService")],Nn.prototype,"ctrlsService",void 0);as([W("navigationService")],Nn.prototype,"navigationService",void 0);as([W("focusService")],Nn.prototype,"focusService",void 0);as([W("undoRedoService")],Nn.prototype,"undoRedoService",void 0);as([W("columnModel")],Nn.prototype,"columnModel",void 0);as([W("paginationProxy")],Nn.prototype,"paginationProxy",void 0);as([W("pinnedRowModel")],Nn.prototype,"pinnedRowModel",void 0);as([xt("rangeService")],Nn.prototype,"rangeService",void 0);as([xt("clipboardService")],Nn.prototype,"clipboardService",void 0);as([Re],Nn.prototype,"postConstruct",null);var rm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Gh extends be{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(()=>{this.gridBodyCtrl=this.ctrlsService.getGridBodyCtrl(),this.listenForResize()}),this.addManagedListener(this.eventService,N.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.getBodyViewportElement(),t=Eh(e);if(this.bodyHeight!==t){this.bodyHeight=t;const n={type:N.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(n)}}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}}rm([W("ctrlsService")],Gh.prototype,"ctrlsService",void 0);rm([W("columnModel")],Gh.prototype,"columnModel",void 0);rm([W("scrollVisibleService")],Gh.prototype,"scrollVisibleService",void 0);rm([Re],Gh.prototype,"postConstruct",null);var KA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Cw extends be{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,N.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;mt(this.element,t),_s(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}}KA([W("pinnedWidthService")],Cw.prototype,"pinnedWidthService",void 0);KA([Re],Cw.prototype,"postConstruct",null);var YA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class yw extends be{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,N.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;mt(this.element,t),_s(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}}YA([W("pinnedWidthService")],yw.prototype,"pinnedWidthService",void 0);YA([Re],yw.prototype,"postConstruct",null);var qA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class am extends be{constructor(e,t){super(),this.eContainer=e,this.eWrapper=t}postConstruct(){this.addManagedListener(this.eventService,N.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),t=e!=null?`${e}px`:"";this.eContainer.style.height=t,this.eWrapper&&(this.eWrapper.style.height=t)}}qA([W("rowContainerHeightService")],am.prototype,"maxDivHeightScaler",void 0);qA([Re],am.prototype,"postConstruct",null);var bw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class lm extends be{constructor(e){super(),this.eContainer=e}postConstruct(){if(!this.gridOptionsService.isEnableRangeSelection()||$e(this.rangeService))return;const e={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(e),this.addDestroyFunc(()=>this.dragService.removeDragSource(e))}}bw([xt("rangeService")],lm.prototype,"rangeService",void 0);bw([W("dragService")],lm.prototype,"dragService",void 0);bw([Re],lm.prototype,"postConstruct",null);var ww=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class au extends be{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,N.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,t=this.gridOptionsService.isDomLayout("print"),n=e.getBodyContainerWidth(),s=e.getDisplayedColumnsLeftWidth(),o=e.getDisplayedColumnsRightWidth();let r;t?r=n+s+o:(r=n,this.addSpacer&&(this.gridOptionsService.is("enableRtl")?s:o)===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gridOptionsService.getScrollbarWidth())),this.callback(r)}}ww([W("columnModel")],au.prototype,"columnModel",void 0);ww([W("scrollVisibleService")],au.prototype,"scrollVisibleService",void 0);ww([Re],au.prototype,"postConstruct",null);var ya=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ce;(function(i){i.LEFT="left",i.RIGHT="right",i.CENTER="center",i.FULL_WIDTH="fullWidth",i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.TOP_CENTER="topCenter",i.TOP_FULL_WIDTH="topFullWidth",i.STICKY_TOP_LEFT="stickyTopLeft",i.STICKY_TOP_RIGHT="stickyTopRight",i.STICKY_TOP_CENTER="stickyTopCenter",i.STICKY_TOP_FULL_WIDTH="stickyTopFullWidth",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i.BOTTOM_CENTER="bottomCenter",i.BOTTOM_FULL_WIDTH="bottomFullWidth"})(Ce||(Ce={}));var Ji;(function(i){i.LEFT="left",i.RIGHT="right",i.CENTER="center",i.FULL_WIDTH="fullWidth"})(Ji||(Ji={}));function XV(i){switch(i){case Ce.CENTER:case Ce.TOP_CENTER:case Ce.STICKY_TOP_CENTER:case Ce.BOTTOM_CENTER:return Ji.CENTER;case Ce.LEFT:case Ce.TOP_LEFT:case Ce.STICKY_TOP_LEFT:case Ce.BOTTOM_LEFT:return Ji.LEFT;case Ce.RIGHT:case Ce.TOP_RIGHT:case Ce.STICKY_TOP_RIGHT:case Ce.BOTTOM_RIGHT:return Ji.RIGHT;case Ce.FULL_WIDTH:case Ce.TOP_FULL_WIDTH:case Ce.STICKY_TOP_FULL_WIDTH:case Ce.BOTTOM_FULL_WIDTH:return Ji.FULL_WIDTH;default:throw Error("Invalid Row Container Type")}}const QV=sr([[Ce.CENTER,"ag-center-cols-container"],[Ce.LEFT,"ag-pinned-left-cols-container"],[Ce.RIGHT,"ag-pinned-right-cols-container"],[Ce.FULL_WIDTH,"ag-full-width-container"],[Ce.TOP_CENTER,"ag-floating-top-container"],[Ce.TOP_LEFT,"ag-pinned-left-floating-top"],[Ce.TOP_RIGHT,"ag-pinned-right-floating-top"],[Ce.TOP_FULL_WIDTH,"ag-floating-top-full-width-container"],[Ce.STICKY_TOP_CENTER,"ag-sticky-top-container"],[Ce.STICKY_TOP_LEFT,"ag-pinned-left-sticky-top"],[Ce.STICKY_TOP_RIGHT,"ag-pinned-right-sticky-top"],[Ce.STICKY_TOP_FULL_WIDTH,"ag-sticky-top-full-width-container"],[Ce.BOTTOM_CENTER,"ag-floating-bottom-container"],[Ce.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[Ce.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[Ce.BOTTOM_FULL_WIDTH,"ag-floating-bottom-full-width-container"]]),ZV=sr([[Ce.CENTER,"ag-center-cols-viewport"],[Ce.TOP_CENTER,"ag-floating-top-viewport"],[Ce.STICKY_TOP_CENTER,"ag-sticky-top-viewport"],[Ce.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]),JV=sr([[Ce.CENTER,"ag-center-cols-clipper"]]);class Ls extends be{constructor(e){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=e,this.isFullWithContainer=this.name===Ce.TOP_FULL_WIDTH||this.name===Ce.STICKY_TOP_FULL_WIDTH||this.name===Ce.BOTTOM_FULL_WIDTH||this.name===Ce.FULL_WIDTH}static getRowContainerCssClasses(e){const t=QV.get(e),n=ZV.get(e),s=JV.get(e);return{container:t,viewport:n,wrapper:s}}static getPinned(e){switch(e){case Ce.BOTTOM_LEFT:case Ce.TOP_LEFT:case Ce.STICKY_TOP_LEFT:case Ce.LEFT:return"left";case Ce.BOTTOM_RIGHT:case Ce.TOP_RIGHT:case Ce.STICKY_TOP_RIGHT:case Ce.RIGHT:return"right";default:return null}}postConstruct(){this.enableRtl=this.gridOptionsService.is("enableRtl"),this.embedFullWidthRows=this.gridOptionsService.is("embedFullWidthRows"),this.forContainers([Ce.CENTER],()=>this.viewportSizeFeature=this.createManagedBean(new Gh(this)))}registerWithCtrlsService(){switch(this.name){case Ce.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case Ce.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case Ce.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case Ce.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case Ce.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case Ce.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case Ce.STICKY_TOP_CENTER:this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case Ce.STICKY_TOP_LEFT:this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case Ce.STICKY_TOP_RIGHT:this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case Ce.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case Ce.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case Ce.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this);break}}forContainers(e,t){e.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(e,t,n,s){this.comp=e,this.eContainer=t,this.eViewport=n,this.eWrapper=s,this.createManagedBean(new Nn(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();const o=[Ce.TOP_CENTER,Ce.TOP_LEFT,Ce.TOP_RIGHT],r=[Ce.STICKY_TOP_CENTER,Ce.STICKY_TOP_LEFT,Ce.STICKY_TOP_RIGHT],a=[Ce.BOTTOM_CENTER,Ce.BOTTOM_LEFT,Ce.BOTTOM_RIGHT],l=[Ce.CENTER,Ce.LEFT,Ce.RIGHT],c=[...o,...a,...l,...r],u=[Ce.CENTER,Ce.LEFT,Ce.RIGHT,Ce.FULL_WIDTH],d=[Ce.CENTER,Ce.TOP_CENTER,Ce.STICKY_TOP_CENTER,Ce.BOTTOM_CENTER],h=[Ce.LEFT,Ce.BOTTOM_LEFT,Ce.TOP_LEFT,Ce.STICKY_TOP_LEFT],f=[Ce.RIGHT,Ce.BOTTOM_RIGHT,Ce.TOP_RIGHT,Ce.STICKY_TOP_RIGHT];this.forContainers(h,()=>{this.pinnedWidthFeature=this.createManagedBean(new Cw(this.eContainer)),this.addManagedListener(this.eventService,N.EVENT_LEFT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(f,()=>{this.pinnedWidthFeature=this.createManagedBean(new yw(this.eContainer)),this.addManagedListener(this.eventService,N.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(u,()=>this.createManagedBean(new am(this.eContainer,this.eWrapper))),this.forContainers(c,()=>this.createManagedBean(new lm(this.eContainer))),this.forContainers(d,()=>this.createManagedBean(new au(g=>this.comp.setContainerWidth(`${g}px`)))),wc()&&(this.forContainers([Ce.CENTER],()=>{const g=this.enableRtl?N.EVENT_LEFT_PINNED_WIDTH_CHANGED:N.EVENT_RIGHT_PINNED_WIDTH_CHANGED;this.addManagedListener(this.eventService,g,()=>this.refreshPaddingForFakeScrollbar())}),this.refreshPaddingForFakeScrollbar()),this.addListeners(),this.registerWithCtrlsService()}refreshPaddingForFakeScrollbar(){const{enableRtl:e,columnModel:t,name:n,eWrapper:s,eContainer:o}=this,r=e?Ce.LEFT:Ce.RIGHT;this.forContainers([Ce.CENTER,r],()=>{const a=t.getContainerWidth(r),l=e?"marginLeft":"marginRight";n===Ce.CENTER?s.style[l]=a?"0px":"16px":o.style[l]=a?"16px":"0px"})}addListeners(){this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,()=>this.onScrollVisibilityChanged()),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_ROWS_CHANGED,e=>this.onDisplayedRowsChanged(e.afterScroll)),this.onScrollVisibilityChanged(),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if([Ce.STICKY_TOP_CENTER,Ce.STICKY_TOP_LEFT,Ce.STICKY_TOP_RIGHT,Ce.STICKY_TOP_FULL_WIDTH].indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const n=()=>{const s=this.gridOptionsService.is("ensureDomOrder"),o=this.gridOptionsService.isDomLayout("print");this.comp.setDomOrder(s||o)};this.addManagedPropertyListener("domLayout",n),n()}stopHScrollOnPinnedRows(){this.forContainers([Ce.TOP_CENTER,Ce.STICKY_TOP_CENTER,Ce.BOTTOM_CENTER],()=>{const e=()=>this.eViewport.scrollLeft=0;this.addManagedListener(this.eViewport,"scroll",e)})}onDisplayedColumnsChanged(){this.forContainers([Ce.CENTER],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers([Ce.CENTER],()=>this.onHorizontalViewportChanged())}onScrollVisibilityChanged(){const e=this.gridOptionsService.getScrollbarWidth()||0;if(this.name===Ce.CENTER){const n=this.scrollVisibleService.isHorizontalScrollShowing()?e:0,s=n==0?"100%":`calc(100% + ${n}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setViewportHeight(s))}if(this.name===Ce.FULL_WIDTH){const n=`calc(100% - ${wc()?16:0}px)`;this.eContainer.style.setProperty("width",n)}}addPreventScrollWhileDragging(){const e=t=>{this.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",e))}onHorizontalViewportChanged(){const e=this.getCenterWidth(),t=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(e,t)}getCenterWidth(){return Zg(this.eViewport)}getCenterViewportScrollLeft(){return Gd(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportVisible(){return Er(this.eViewport)}getViewportScrollLeft(){return Gd(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gridOptionsService.is("alwaysShowHorizontalScroll")||fA(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(e){this.eContainer.style.transform=`translateX(${e}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Hd(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!Ls.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged()),wc()&&this.refreshPaddingForFakeScrollbar()}onDisplayedRowsChanged(e=!1){if(this.visible){const t=this.gridOptionsService.isDomLayout("print"),n=o=>{const r=o.isFullWidth(),a=this.embedFullWidthRows||t;return this.isFullWithContainer?!a&&r:a||!r},s=this.getRowCtrls().filter(n);this.comp.setRowCtrls(s,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)}getRowCtrls(){switch(this.name){case Ce.TOP_CENTER:case Ce.TOP_LEFT:case Ce.TOP_RIGHT:case Ce.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case Ce.STICKY_TOP_CENTER:case Ce.STICKY_TOP_LEFT:case Ce.STICKY_TOP_RIGHT:case Ce.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case Ce.BOTTOM_CENTER:case Ce.BOTTOM_LEFT:case Ce.BOTTOM_RIGHT:case Ce.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getRowCtrls()}}}ya([W("scrollVisibleService")],Ls.prototype,"scrollVisibleService",void 0);ya([W("dragService")],Ls.prototype,"dragService",void 0);ya([W("ctrlsService")],Ls.prototype,"ctrlsService",void 0);ya([W("columnModel")],Ls.prototype,"columnModel",void 0);ya([W("resizeObserverService")],Ls.prototype,"resizeObserverService",void 0);ya([W("animationFrameService")],Ls.prototype,"animationFrameService",void 0);ya([W("rowRenderer")],Ls.prototype,"rowRenderer",void 0);ya([Re],Ls.prototype,"postConstruct",null);var jo=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const eG=`<div class="ag-root ag-unselectable" role="treegrid">
<ag-header-root ref="gridHeader"></ag-header-root>
<div class="ag-floating-top" ref="eTop" role="presentation">
<ag-row-container ref="topLeftContainer" name="${Ce.TOP_LEFT}"></ag-row-container>
<ag-row-container ref="topCenterContainer" name="${Ce.TOP_CENTER}"></ag-row-container>
<ag-row-container ref="topRightContainer" name="${Ce.TOP_RIGHT}"></ag-row-container>
<ag-row-container ref="topFullWidthContainer" name="${Ce.TOP_FULL_WIDTH}"></ag-row-container>
</div>
<div class="ag-body" ref="eBody" role="presentation">
<div class="ag-body-clipper" ref="eBodyClipper" role="presentation">
<div class="ag-body-viewport" ref="eBodyViewport" role="presentation">
<ag-row-container ref="leftContainer" name="${Ce.LEFT}"></ag-row-container>
<ag-row-container ref="centerContainer" name="${Ce.CENTER}"></ag-row-container>
<ag-row-container ref="rightContainer" name="${Ce.RIGHT}"></ag-row-container>
<ag-row-container ref="fullWidthContainer" name="${Ce.FULL_WIDTH}"></ag-row-container>
</div>
</div>
<ag-fake-vertical-scroll></ag-fake-vertical-scroll>
</div>
<div class="ag-sticky-top" ref="eStickyTop" role="presentation">
<ag-row-container ref="stickyTopLeftContainer" name="${Ce.STICKY_TOP_LEFT}"></ag-row-container>
<ag-row-container ref="stickyTopCenterContainer" name="${Ce.STICKY_TOP_CENTER}"></ag-row-container>
<ag-row-container ref="stickyTopRightContainer" name="${Ce.STICKY_TOP_RIGHT}"></ag-row-container>
<ag-row-container ref="stickyTopFullWidthContainer" name="${Ce.STICKY_TOP_FULL_WIDTH}"></ag-row-container>
</div>
<div class="ag-floating-bottom" ref="eBottom" role="presentation">
<ag-row-container ref="bottomLeftContainer" name="${Ce.BOTTOM_LEFT}"></ag-row-container>
<ag-row-container ref="bottomCenterContainer" name="${Ce.BOTTOM_CENTER}"></ag-row-container>
<ag-row-container ref="bottomRightContainer" name="${Ce.BOTTOM_RIGHT}"></ag-row-container>
<ag-row-container ref="bottomFullWidthContainer" name="${Ce.BOTTOM_FULL_WIDTH}"></ag-row-container>
</div>
<ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>
<ag-overlay-wrapper></ag-overlay-wrapper>
</div>`;class lo extends Qe{constructor(){super(eG)}init(){const e=(n,s)=>{const o=`${n}px`;s.style.minHeight=o,s.style.height=o},t={setRowAnimationCssOnBodyViewport:(n,s)=>this.setRowAnimationCssOnBodyViewport(n,s),setColumnCount:n=>Jx(this.getGui(),n),setRowCount:n=>Zx(this.getGui(),n),setTopHeight:n=>e(n,this.eTop),setBottomHeight:n=>e(n,this.eBottom),setTopDisplay:n=>this.eTop.style.display=n,setBottomDisplay:n=>this.eBottom.style.display=n,setStickyTopHeight:n=>this.eStickyTop.style.height=n,setStickyTopTop:n=>this.eStickyTop.style.top=n,setStickyTopWidth:n=>this.eStickyTop.style.width=n,setColumnMovingCss:(n,s)=>this.addOrRemoveCssClass(n,s),updateLayoutClasses:(n,s)=>{[this.eBodyViewport.classList,this.eBodyClipper.classList,this.eBody.classList].forEach(r=>{r.toggle(_i.AUTO_HEIGHT,s.autoHeight),r.toggle(_i.NORMAL,s.normal),r.toggle(_i.PRINT,s.print)}),this.addOrRemoveCssClass(_i.AUTO_HEIGHT,s.autoHeight),this.addOrRemoveCssClass(_i.NORMAL,s.normal),this.addOrRemoveCssClass(_i.PRINT,s.print)},setAlwaysVerticalScrollClass:(n,s)=>this.eBodyViewport.classList.toggle($A,s),registerBodyViewportResizeListener:n=>{const s=this.resizeObserverService.observeResize(this.eBodyViewport,n);this.addDestroyFunc(()=>s())},setPinnedTopBottomOverflowY:n=>this.eTop.style.overflowY=this.eBottom.style.overflowY=n,setCellSelectableCss:(n,s)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(o=>o.classList.toggle(n,s))},setBodyViewportWidth:n=>this.eBodyViewport.style.width=n};this.ctrl=this.createManagedBean(new Fn),this.ctrl.setComp(t,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService||this.gridOptionsService.get("rowSelection")==="multiple")&&Qx(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const n=this.eBodyViewport.classList;n.toggle(kc.ANIMATION_ON,t),n.toggle(kc.ANIMATION_OFF,!t)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}}jo([W("resizeObserverService")],lo.prototype,"resizeObserverService",void 0);jo([xt("rangeService")],lo.prototype,"rangeService",void 0);jo([Ae("eBodyViewport")],lo.prototype,"eBodyViewport",void 0);jo([Ae("eStickyTop")],lo.prototype,"eStickyTop",void 0);jo([Ae("eTop")],lo.prototype,"eTop",void 0);jo([Ae("eBottom")],lo.prototype,"eBottom",void 0);jo([Ae("gridHeader")],lo.prototype,"headerRootComp",void 0);jo([Ae("eBodyClipper")],lo.prototype,"eBodyClipper",void 0);jo([Ae("eBody")],lo.prototype,"eBody",void 0);jo([Re],lo.prototype,"init",null);var Sw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Ud=class extends be{postConstruct(){this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)}updateImpl(){const e=this.ctrlsService.getCenterRowContainerCtrl();if(!e)return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}setScrollsVisible(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;const n={type:N.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(n)}}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};Sw([W("ctrlsService")],Ud.prototype,"ctrlsService",void 0);Sw([Re],Ud.prototype,"postConstruct",null);Ud=Sw([Be("scrollVisibleService")],Ud);var XA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qu;let Vc=qu=class extends be{constructor(){super(...arguments),this.gridInstanceId=qu.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[qu.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return Hp(this.gridOptionsService,e.target,io.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let t=e;for(;t;){const n=t[qu.GRID_DOM_KEY];if(ye(n))return n===this.gridInstanceId;t=t.parentElement}return!1}getCellPositionForEvent(e){const t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null}getNormalisedPosition(e){const t=this.gridOptionsService.isDomLayout("normal"),n=e;let s,o;if(n.clientX!=null||n.clientY!=null?(s=n.clientX,o=n.clientY):(s=n.x,o=n.y),t){const r=this.ctrlsService.getGridBodyCtrl(),a=r.getScrollFeature().getVScrollPosition(),l=r.getScrollFeature().getHScrollPosition();s+=l.left,o+=a.top}return{x:s,y:o}}};Vc.gridInstanceSequence=new Fc;Vc.GRID_DOM_KEY="__ag_grid_instance";XA([W("ctrlsService")],Vc.prototype,"ctrlsService",void 0);Vc=qu=XA([Be("mouseEventService")],Vc);var kn=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let an=class extends be{constructor(){super(),this.onPageDown=FC(this.onPageDown,100),this.onPageUp=FC(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const n=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,a=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(n){case ge.PAGE_HOME:case ge.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(n),l=!0);break;case ge.LEFT:case ge.RIGHT:case ge.UP:case ge.DOWN:if(!a)return!1;o&&!s&&!r&&(this.onCtrlUpDownLeftRight(n,a),l=!0);break;case ge.PAGE_DOWN:case ge.PAGE_UP:!o&&!s&&(l=this.handlePageUpDown(n,a,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,n){return n&&(t=this.focusService.getFocusedCell()),t?(e===ge.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:n,scrollColumn:s,focusIndex:o,focusColumn:r}=e;if(ye(s)&&!s.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(s),ye(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,n),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(o),this.focusService.setFocusedCell({rowIndex:o,column:r,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){const a={rowIndex:o,rowPinned:null,column:r};this.rangeService.setRangeToCell(a)}}onPageDown(e){const n=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),o=this.paginationProxy.getPixelOffset(),r=n.top+s,a=this.paginationProxy.getRowIndexAtPixel(r+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,a):this.navigateToNextPage(e,a)}onPageUp(e){const n=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.paginationProxy.getPixelOffset(),o=n.top,r=this.paginationProxy.getRowIndexAtPixel(o+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)}navigateToNextPage(e,t,n=!1){const s=this.getViewportHeight(),o=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),a=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),c=n?(l==null?void 0:l.rowHeight)-s-a:s-a,u=(l==null?void 0:l.rowTop)+c;let d=this.paginationProxy.getRowIndexAtPixel(u+a);if(d===e.rowIndex){const f=n?-1:1;t=d=e.rowIndex+f}let h;n?(h="bottom",d<o&&(d=o),t<o&&(t=o)):(h="top",d>r&&(d=r),t>r&&(t=r)),this.isRowTallerThanView(d)&&(t=d,h="top"),this.navigateTo({scrollIndex:t,scrollType:h,scrollColumn:null,focusIndex:d,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,n=!1){this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,n);this.navigateTo({scrollIndex:t,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){var n;const s=t?-1:1,o=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=this.paginationProxy.getRow(l);if(c){const u=(n=c.rowHeight)!==null&&n!==void 0?n:0;if(a+u>o)break;a+=u}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),n=this.gridOptionsService.getScrollbarWidth();let s=t.bottom-t.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(s-=n),s}isRowTallerThanView(e){const t=this.paginationProxy.getRow(e);if(!t)return!1;const n=t.rowHeight;return typeof n!="number"?!1:n>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const n=this.cellNavigationService.getNextCellToFocus(e,t,!0),{rowIndex:s,column:o}=n;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})}onHomeOrEndKey(e){const t=e===ge.PAGE_HOME,n=this.columnModel.getAllDisplayedColumns(),s=t?n[0]:Ot(n),o=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s})}onTabKeyDown(e,t){const n=t.shiftKey;if(this.tabToNextCellCommon(e,n,t)){t.preventDefault();return}if(n){const{rowIndex:o,rowPinned:r}=e.getRowPosition();(r?o===0:o===this.paginationProxy.getPageFirstRow())&&(this.gridOptionsService.getNum("headerHeight")===0?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusLastHeader(t)))}else e instanceof io&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(n)&&t.preventDefault()}tabToNextCell(e,t){const n=this.focusService.getFocusedCell();if(!n)return!1;let s=this.getCellByPosition(n);return!s&&(s=this.rowRenderer.getRowByPosition(n),!s||!s.isFullWidth())?!1:this.tabToNextCellCommon(s,e,t)}tabToNextCellCommon(e,t,n){let s=e.isEditing();if(!s&&e instanceof io){const a=e.getRowCtrl();a&&(s=a.isEditing())}let o;return s?this.gridOptionsService.get("editType")==="fullRow"?o=this.moveToNextEditingRow(e,t,n):o=this.moveToNextEditingCell(e,t,n):o=this.moveToNextCellNotEditing(e,t),o||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,t,n=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const o=this.findNextCellToFocusOn(s,t,!0);return o==null?!1:(o.startEditing(null,!0,n),o.focusCell(!1),!0)}moveToNextEditingRow(e,t,n=null){const s=e.getCellPosition(),o=this.findNextCellToFocusOn(s,t,!0);if(o==null)return!1;const r=o.getCellPosition(),a=this.isCellEditable(s),l=this.isCellEditable(r),c=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;return a&&e.setFocusOutOnEditor(),c||(e.getRowCtrl().stopEditing(),o.getRowCtrl().startRowEditing(void 0,void 0,n)),l?(o.setFocusInOnEditor(),o.focusCell()):o.focusCell(!0),!0}moveToNextCellNotEditing(e,t){const n=this.columnModel.getAllDisplayedColumns();let s;e instanceof no?s=Object.assign(Object.assign({},e.getRowPosition()),{column:t?n[0]:Ot(n)}):s=e.getCellPosition();const o=this.findNextCellToFocusOn(s,t,!1);if(o instanceof io)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),t);return ye(o)}findNextCellToFocusOn(e,t,n){let s=e;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=this.cellNavigationService.getNextTabbedCell(s,t);const o=this.gridOptionsService.getCallback("tabToNextCell");if(ye(o)){const c=o({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:s||null});ye(c)?(c.floating&&(yt(()=>{console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),c.rowPinned=c.floating),s={rowIndex:c.rowIndex,column:c.column,rowPinned:c.rowPinned}):s=null}if(!s)return null;if(s.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+s.rowIndex,column:s.column}}),null}const r=this.gridOptionsService.get("editType")==="fullRow";if(n&&!r&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const a=this.getCellByPosition(s);if(!a){const l=this.rowRenderer.getRowByPosition(s);if(!l||!l.isFullWidth()||n)continue;return l}if(!a.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(s),a}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}getCellByPosition(e){const t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,t,n,s){let o=n,r=!1;for(;o&&(o===n||!this.isValidNavigateCell(o));)this.gridOptionsService.is("enableRtl")?t===ge.LEFT&&(o=this.getLastCellOfColSpan(o)):t===ge.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextCellToFocus(t,o),r=$e(o);if(r&&e&&e.key===ge.UP&&(o={rowIndex:-1,rowPinned:null,column:n.column}),s){const l=this.gridOptionsService.getCallback("navigateToNextCell");if(ye(l)){const u=l({key:t,previousCellPosition:n,nextCellPosition:o||null,event:e});ye(u)?(u.floating&&(yt(()=>{console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),u.rowPinned=u.floating),o={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):o=null}}if(!o)return;if(o.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+o.rowIndex,column:n.column},event:e||void 0});return}const a=this.getNormalisedPosition(o);a?this.focusPosition(a):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){this.ensureCellVisible(e);const t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t=!1){const n=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const o=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ot(n):n[0])};this.focusPosition(r);const a=o!=null?this.rowPositionUtils.before(r,o):!1,l={type:N.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:a};return this.eventService.dispatchEvent(l),!0}focusPosition(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const t=this.getCellByPosition(e);if(!t)return e;const n=t.getColSpanningList();return n.length===1?e:{rowIndex:e.rowIndex,column:Ot(n),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=this.gridOptionsService.isGroupRowsSticky(),n=this.rowModel.getRow(e.rowIndex);!(t&&(n==null?void 0:n.sticky))&&$e(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};kn([W("mouseEventService")],an.prototype,"mouseEventService",void 0);kn([W("paginationProxy")],an.prototype,"paginationProxy",void 0);kn([W("focusService")],an.prototype,"focusService",void 0);kn([xt("rangeService")],an.prototype,"rangeService",void 0);kn([W("columnModel")],an.prototype,"columnModel",void 0);kn([W("rowModel")],an.prototype,"rowModel",void 0);kn([W("ctrlsService")],an.prototype,"ctrlsService",void 0);kn([W("rowRenderer")],an.prototype,"rowRenderer",void 0);kn([W("headerNavigationService")],an.prototype,"headerNavigationService",void 0);kn([W("rowPositionUtils")],an.prototype,"rowPositionUtils",void 0);kn([W("cellNavigationService")],an.prototype,"cellNavigationService",void 0);kn([W("pinnedRowModel")],an.prototype,"pinnedRowModel",void 0);kn([Re],an.prototype,"postConstruct",null);an=kn([Be("navigationService")],an);var tG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Hh extends nu{constructor(e){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=e}postConstruct(){this.gridOptionsService.setDomData(this.getGui(),Hh.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,n=s=>{jp(this.gridOptionsService,s,t.node,t.column,!0)||t.onKeyDown(s)};this.addManagedListener(e,"keydown",n)}}Hh.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper";tG([Re],Hh.prototype,"postConstruct",null);class iG extends Qe{constructor(e,t,n,s,o){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.getColumn(),this.rowNode=t.getRowNode(),this.rowCtrl=t.getRowCtrl(),this.eRow=s,this.setTemplate(`<div comp-id="${this.getCompId()}"/>`);const r=this.getGui();this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a=(c,u,d)=>{const h=d||r;u!=null&&u!=""?h.setAttribute(c,u):h.removeAttribute(c)},l={addOrRemoveCssClass:(c,u)=>this.addOrRemoveCssClass(c,u),setUserStyles:c=>qb(r,c),getFocusableElement:()=>this.getFocusableElement(),setTabIndex:c=>a("tabindex",c.toString()),setRole:c=>Gi(r,c),setColId:c=>a("col-id",c),setTitle:c=>a("title",c),setIncludeSelection:c=>this.includeSelection=c,setIncludeRowDrag:c=>this.includeRowDrag=c,setIncludeDndSource:c=>this.includeDndSource=c,setRenderDetails:(c,u,d)=>this.setRenderDetails(c,u,d),setEditDetails:(c,u,d)=>this.setEditDetails(c,u,d),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};this.cellCtrl=t,t.setComp(l,this.getGui(),this.eCellWrapper,n,o)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,t,n){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(n||o)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,n){e?this.createCellEditorInstance(e,t,n):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,n=t||this.forceWrapper,s=n&&this.eCellWrapper==null;s&&(this.eCellWrapper=Ui('<div class="ag-cell-wrapper" role="presentation"></div>'),this.getGui().appendChild(this.eCellWrapper));const o=!n&&this.eCellWrapper!=null;o&&(or(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!n);const r=!e&&n,a=r&&this.eCellValue==null;a&&(this.eCellValue=Ui('<span class="ag-cell-value" role="presentation"></span>'),this.eCellWrapper.appendChild(this.eCellValue));const l=!r&&this.eCellValue!=null;l&&(or(this.eCellValue),this.eCellValue=void 0);const c=s||o||a||l;return c&&this.removeControls(),e||t&&this.addControls(),c}addControls(){this.includeRowDrag&&this.rowDraggingComp==null&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&this.dndSourceComp==null&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,t,n){const s=this.editorVersion,o=e.newAgStackInstance();if(!o)return;const{params:r}=e;o.then(l=>this.afterCellEditorCreated(s,l,r,t,n)),$e(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();Zn(t);const n=e!=null?Mo(e):null;n!=null&&(t.innerHTML=n)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),or(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),or(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const n=!this.beans.gridOptionsService.is("suppressAnimationFrame"),s=this.rendererVersion,{componentClass:o}=e,r=()=>{if(this.rendererVersion!==s||!this.isAlive())return;const l=e.newAgStackInstance(),c=this.afterCellRendererCreated.bind(this,s,o);l&&l.then(c)};n&&this.firstRender?this.beans.animationFrameService.createTask(r,this.rowNode.rowIndex,"createTasksP2"):r()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,t,n){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(n);return}if(this.cellRenderer=n,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){const o=this.getParentOfValue();Zn(o),o.appendChild(this.cellRendererGui)}}afterCellEditorCreated(e,t,n,s,o){if(e!==this.editorVersion){this.beans.context.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){this.beans.context.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),this.beans.context.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=s||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(n,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached&&t.afterGuiAttached()}refreshEditStyles(e,t){var n;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),(n=this.rowCtrl)===null||n===void 0||n.setInlineEditingCss(e)}addInCellEditor(){const e=this.getGui(),t=this.beans.gridOptionsService.getDocument();e.contains(t.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){this.beans.gridOptionsService.get("editType")==="fullRow"&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const n=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Hh(e));const s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);const o=this.beans.popupService,r=this.beans.gridOptionsService.is("stopEditingWhenCellsLoseFocus"),a=t??(n.getPopupPosition?n.getPopupPosition():"over"),l=this.beans.gridOptionsService.is("enableRtl"),c={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:a,alignSide:l?"right":"left",keepWithinBounds:!0},u=o.positionPopupByComponent.bind(o,c),d=this.beans.localeService.getLocaleTextFunc(),h=o.addPopup({modal:r,eChild:s,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:d("ariaLabelCellEditor","Cell Editor")});h&&(this.hideEditorPopup=h.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const e=this.getGui(),t=this.beans.gridOptionsService.getDocument();e.contains(t.activeElement)&&Qg()&&e.focus({preventScroll:!0}),Zn(this.getParentOfValue())}}class nG extends Qe{constructor(e,t,n){super(),this.cellComps={},this.beans=t,this.rowCtrl=e,this.setTemplate(`<div comp-id="${this.getCompId()}" style="${this.getInitialStyle(n)}"/>`);const s=this.getGui(),o=s.style,r={setDomOrder:a=>this.domOrder=a,setCellCtrls:a=>this.setCellCtrls(a),showFullWidth:a=>this.showFullWidth(a),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(a,l)=>this.addOrRemoveCssClass(a,l),setUserStyles:a=>qb(s,a),setTop:a=>o.top=a,setTransform:a=>o.transform=a,setRowIndex:a=>s.setAttribute("row-index",a),setRole:a=>Gi(s,a),setRowId:a=>s.setAttribute("row-id",a),setRowBusinessKey:a=>s.setAttribute("row-business-key",a),setTabIndex:a=>s.setAttribute("tabindex",a.toString())};e.setComp(r,this.getGui(),n),this.addDestroyFunc(()=>{e.unsetComp(n)})}getInitialStyle(e){const t=this.rowCtrl.getInitialTransform(e),n=this.rowCtrl.getInitialRowTop(e);return t?`transform: ${t}`:`top: ${n}`}showFullWidth(e){const t=s=>{if(this.isAlive()){const o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s)}else this.beans.context.destroyBean(s)},n=e.newAgStackInstance();n&&n.then(t)}setCellCtrls(e){const t=Object.assign({},this.cellComps);e.forEach(s=>{const o=s.getInstanceId();this.cellComps[o]==null?this.newCellComp(s):t[o]=null});const n=Io(t).filter(s=>s!=null);this.destroyCells(n),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];e.forEach(n=>{const s=this.cellComps[n.getInstanceId()];s&&t.push(s.getGui())}),Yb(this.getGui(),t)}newCellComp(e){const t=new iG(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const e=Io(this.cellComps).filter(t=>t!=null);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(e){e.forEach(t=>{if(!t)return;const n=t.getCtrl().getInstanceId();this.cellComps[n]===t&&(t.detach(),t.destroy(),this.cellComps[n]=null)})}}var lu=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};function sG(){const i=Qe.elementGettingCreated.getAttribute("name"),e=Ls.getRowContainerCssClasses(i);let t;const n=i===Ce.CENTER,s=i===Ce.TOP_CENTER||i===Ce.STICKY_TOP_CENTER||i===Ce.BOTTOM_CENTER;return n?t=`<div class="${e.wrapper}" ref="eWrapper" role="presentation">
<div class="${e.viewport}" ref="eViewport" role="presentation">
<div class="${e.container}" ref="eContainer"></div>
</div>
</div>`:s?t=`<div class="${e.viewport}" ref="eViewport" role="presentation">
<div class="${e.container}" ref="eContainer"></div>
</div>`:t=`<div class="${e.container}" ref="eContainer"></div>`,t}class Ll extends Qe{constructor(){super(sG()),this.rowComps={},this.name=Qe.elementGettingCreated.getAttribute("name"),this.type=XV(this.name)}postConstruct(){const e={setViewportHeight:n=>this.eViewport.style.height=n,setRowCtrls:n=>this.setRowCtrls(n),setDomOrder:n=>{this.domOrder=n},setContainerWidth:n=>this.eContainer.style.width=n};this.createManagedBean(new Ls(this.name)).setComp(e,this.eContainer,this.eViewport,this.eWrapper)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){const t=Object.assign({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;const n=s=>{const o=s.getInstanceId(),r=t[o];if(r)this.rowComps[o]=r,delete t[o],this.ensureDomOrder(r.getGui());else{if(!s.getRowNode().displayed)return;const a=new nG(s,this.beans,this.type);this.rowComps[o]=a,this.appendRow(a.getGui())}};e.forEach(n),Io(t).forEach(s=>{this.eContainer.removeChild(s.getGui()),s.destroy()}),Gi(this.eContainer,e.length?"rowgroup":"presentation")}appendRow(e){this.domOrder?hA(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(Kb(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}}lu([W("beans")],Ll.prototype,"beans",void 0);lu([Ae("eViewport")],Ll.prototype,"eViewport",void 0);lu([Ae("eContainer")],Ll.prototype,"eContainer",void 0);lu([Ae("eWrapper")],Ll.prototype,"eWrapper",void 0);lu([Re],Ll.prototype,"postConstruct",null);lu([Hi],Ll.prototype,"preDestroy",null);var QA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Ew{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gridOptionsService.is("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(n=>{n.isPrimary()&&(n.isAnyFunctionActive()||(n.isAllowValue()?this.columnsToAggregate.push(n):n.isAllowRowGroup()?this.columnsToGroup.push(n):n.isAllowPivot()&&this.columnsToPivot.push(n)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?bt.ICON_PINNED:bt.ICON_MOVE:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}}QA([W("columnModel")],Ew.prototype,"columnModel",void 0);QA([W("gridOptionsService")],Ew.prototype,"gridOptionsService",void 0);var Bh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class cu{constructor(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.eContainer=t,this.centerContainer=!ye(e)}init(){this.ctrlsService.whenReady(()=>{this.gridBodyCon=this.ctrlsService.getGridBodyCtrl()})}getIconName(){return this.pinned?bt.ICON_PINNED:bt.ICON_MOVE}onDragEnter(e){const t=e.dragItem.columns;if(e.dragSource.type===Sn.ToolPanel)this.setColumnsVisible(t,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,o=(t||[]).filter(r=>s[r.getId()]);this.setColumnsVisible(o,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,n="api"){if(e){const s=e.filter(o=>!o.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,t,n)}}setColumnsPinned(e,t,n="api"){if(e){const s=e.filter(o=>!o.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,t,n)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}normaliseX(e){return this.gridOptionsService.is("enableRtl")&&(e=this.eContainer.clientWidth-e),this.centerContainer&&(e+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e}checkCenterForScrolling(e){if(this.centerContainer){const t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),n=t+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.is("enableRtl")?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>n-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>n-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,t=!1,n=!1,s=!1){var o;if(s){if(this.lastMovedInfo){const{columns:u,toIndex:d}=this.lastMovedInfo;this.moveColumns(u,d,"uiColumnMoved",!0)}return}if(this.lastDraggingEvent=e,$e(e.hDirection))return;const r=this.normaliseX(e.x);t||this.checkCenterForScrolling(r);const a=this.normaliseDirection(e.hDirection),l=e.dragSource.type,c=((o=e.dragSource.getDragItem().columns)===null||o===void 0?void 0:o.filter(u=>u.getColDef().lockPinned?u.getPinned()==this.pinned:!0))||[];this.attemptMoveColumns({dragSourceType:l,allMovingColumns:c,hDirection:a,mouseX:r,fromEnter:t,fakeEvent:n})}normaliseDirection(e){if(this.gridOptionsService.is("enableRtl"))switch(e){case _o.Left:return _o.Right;case _o.Right:return _o.Left;default:console.error(`AG Grid: Unknown direction ${e}`)}else return e}attemptMoveColumns(e){const{dragSourceType:t,hDirection:n,mouseX:s,fromEnter:o,fakeEvent:r}=e,a=n===_o.Left,l=n===_o.Right;let{allMovingColumns:c}=e;if(t===Sn.HeaderCell){let C=[];c.forEach(m=>{let w=null,E=m.getParent();for(;E!=null&&E.getDisplayedLeafColumns().length===1;)w=E,E=E.getParent();w!=null?w.getProvidedColumnGroup().getLeafColumns().forEach(O=>{C.includes(O)||C.push(O)}):C.includes(m)||C.push(m)}),c=C}const u=c.slice();this.columnModel.sortColumnsLikeGridColumns(u);const d=this.calculateValidMoves(u,l,s),h=this.calculateOldIndex(u);if(d.length===0)return;const f=d[0];let g=h!==null&&!o;if(t==Sn.HeaderCell&&(g=h!==null),g&&!r&&(a&&f>=h||l&&f<=h))return;const p=this.columnModel.getAllDisplayedColumns();let v=[],y=null;for(let C=0;C<d.length;C++){const m=d[C],w=this.columnModel.getProposedColumnOrder(u,m);if(!this.columnModel.doesOrderPassRules(w))continue;const E=w.filter(O=>p.includes(O));if(y===null)y=E;else if(!ze.areEqual(E,y))break;const R=this.groupFragCount(w);v.push({move:m,fragCount:R})}v.length!==0&&(v.sort((C,m)=>C.fragCount-m.fragCount),this.moveColumns(c,v[0].move,"uiColumnMoved",!1))}calculateOldIndex(e){const t=this.columnModel.getAllGridColumns(),n=Px(e.map(l=>t.indexOf(l))),s=n[0];return Ot(n)-s!==n.length-1?null:s}moveColumns(e,t,n,s){this.columnModel.moveColumns(e,t,n,s),this.lastMovedInfo=s?null:{columns:e,toIndex:t}}groupFragCount(e){function t(s){let o=[],r=s.getOriginalParent();for(;r!=null;)o.push(r),r=r.getOriginalParent();return o}let n=0;for(let s=0;s<e.length-1;s++){let o=t(e[s]),r=t(e[s+1]);[o,r]=o.length>r.length?[o,r]:[r,o],o.forEach(a=>{r.indexOf(a)===-1&&n++})}return n}calculateValidMoves(e,t,n){if(this.gridOptionsService.is("suppressMovableColumns")||e.some(p=>p.getColDef().suppressMovable))return[];const o=this.columnModel.getDisplayedColumns(this.pinned),r=this.columnModel.getAllGridColumns(),a=o.filter(p=>Ss(e,p)),l=o.filter(p=>!Ss(e,p)),c=r.filter(p=>!Ss(e,p));let u=0,d=n;if(t){let p=0;a.forEach(v=>p+=v.getActualWidth()),d-=p}if(d>0){for(let p=0;p<l.length;p++){const v=l[p];if(d-=v.getActualWidth(),d<0)break;u++}t&&u++}let h;if(u>0){const p=l[u-1];h=c.indexOf(p)+1}else h=c.indexOf(l[0]),h===-1&&(h=0);const f=[h],g=(p,v)=>p-v;if(t){let p=h+1;const v=r.length-1;for(;p<=v;)f.push(p),p++;f.sort(g)}else{let p=h;const v=r.length-1;let y=r[p];for(;p<=v&&this.isColumnHidden(o,y);)p++,f.push(p),y=r[p];p=h-1;const C=0;for(;p>=C;)f.push(p),p--;f.sort(g).reverse()}return f}isColumnHidden(e,t){return e.indexOf(t)<0}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(bt.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(bt.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(bt.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*5,e>100&&(e=100);let t=null;const n=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=n.scrollHorizontally(-e):this.needToMoveRight&&(t=n.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const o=this.lastDraggingEvent.dragItem.columns.filter(r=>!r.getColDef().lockPinned);if(o.length>0&&(this.dragAndDropService.setGhostIcon(bt.ICON_PINNED),this.failedMoveAttempts>7)){const r=this.needToMoveLeft?"left":"right";this.setColumnsPinned(o,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}}}Bh([W("columnModel")],cu.prototype,"columnModel",void 0);Bh([W("dragAndDropService")],cu.prototype,"dragAndDropService",void 0);Bh([W("gridOptionsService")],cu.prototype,"gridOptionsService",void 0);Bh([W("ctrlsService")],cu.prototype,"ctrlsService",void 0);Bh([Re],cu.prototype,"init",null);var Wh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class uu extends be{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.leftRowContainerCtrl.getContainerElement()],[e.bottomLeftRowContainerCtrl.getContainerElement()],[e.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.rightRowContainerCtrl.getContainerElement()],[e.bottomRightRowContainerCtrl.getContainerElement()],[e.topRightRowContainerCtrl.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.centerRowContainerCtrl.getViewportElement()],[e.bottomCenterRowContainerCtrl.getViewportElement()],[e.topCenterRowContainerCtrl.getViewportElement()]];break}})}isInterestedIn(e){return e===Sn.HeaderCell||e===Sn.ToolPanel&&this.gridOptionsService.is("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new cu(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new Ew(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&e.dragSource.type===Sn.ToolPanel}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}}Wh([W("dragAndDropService")],uu.prototype,"dragAndDropService",void 0);Wh([W("columnModel")],uu.prototype,"columnModel",void 0);Wh([W("ctrlsService")],uu.prototype,"ctrlsService",void 0);Wh([Re],uu.prototype,"postConstruct",null);Wh([Re],uu.prototype,"init",null);class ZA{static getHeaderClassesFromColDef(e,t,n,s){return $e(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,t,n,s)}static getToolPanelClassesFromColDef(e,t,n,s){return $e(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,t,n,s)}static getClassParams(e,t,n,s){return{colDef:e,column:n,columnGroup:s,api:t.api,columnApi:t.columnApi,context:t.context}}static getColumnClassesFromCollDef(e,t,n,s,o){if($e(e))return[];let r;if(typeof e=="function"){const a=this.getClassParams(t,n,s,o);r=e(a)}else r=e;return typeof r=="string"?[r]:Array.isArray(r)?[...r]:[]}}var cm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ba extends mw{constructor(e){super(ba.TEMPLATE,e),this.headerCompVersion=0,this.column=e.getColumnGroupChild(),this.pinned=e.getPinned()}postConstruct(){const e=this.getGui(),t=(o,r,a)=>{const l=a||e;r!=null&&r!=""?l.setAttribute(o,r):l.removeAttribute(o)},n={setWidth:o=>e.style.width=o,addOrRemoveCssClass:(o,r)=>this.addOrRemoveCssClass(o,r),setColId:o=>t("col-id",o),setTitle:o=>t("title",o),setAriaDescription:o=>zx(e,o),setAriaSort:o=>o?tA(e,o):iA(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper);const s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(n=>this.afterCompCreated(t,n))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}}ba.TEMPLATE=`<div class="ag-header-cell" role="columnheader" tabindex="-1">
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
<div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>
</div>`;cm([Ae("eResize")],ba.prototype,"eResize",void 0);cm([Ae("eHeaderCompWrapper")],ba.prototype,"eHeaderCompWrapper",void 0);cm([Re],ba.prototype,"postConstruct",null);cm([Hi],ba.prototype,"destroyHeaderComp",null);var _w=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Fl extends mw{constructor(e){super(Fl.TEMPLATE,e)}postConstruct(){const e=this.getGui(),t=(s,o)=>o!=null?e.setAttribute(s,o):e.removeAttribute(s),n={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setResizableDisplayed:s=>mt(this.eResize,s),setWidth:s=>e.style.width=s,setColId:s=>e.setAttribute("col-id",s),setAriaExpanded:s=>t("aria-expanded",s),setTitle:s=>t("title",s),setUserCompDetails:s=>this.setUserCompDetails(s)};this.ctrl.setComp(n,e,this.eResize)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const n=this.getGui(),s=e.getGui();n.appendChild(s),this.addDestroyFunc(t),this.ctrl.setDragSource(n)}}Fl.TEMPLATE=`<div class="ag-header-group-cell" role="columnheader" tabindex="-1">
<div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>
</div>`;_w([W("userComponentFactory")],Fl.prototype,"userComponentFactory",void 0);_w([Ae("eResize")],Fl.prototype,"eResize",void 0);_w([Re],Fl.prototype,"postConstruct",null);var JA=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ji;(function(i){i.COLUMN_GROUP="group",i.COLUMN="column",i.FLOATING_FILTER="filter"})(ji||(ji={}));class Rw extends Qe{constructor(e){super(),this.headerComps={};const t=e.getType()==ji.COLUMN_GROUP?"ag-header-row-column-group":e.getType()==ji.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";this.setTemplate(`<div class="ag-header-row ${t}" role="row"></div>`),this.ctrl=e}init(){const e={setTransform:t=>this.getGui().style.transform=t,setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:t=>this.setHeaderCtrls(t),setWidth:t=>this.getGui().style.width=t,setAriaRowIndex:t=>kb(this.getGui(),t)};this.ctrl.setComp(e)}destroyHeaderCtrls(){this.setHeaderCtrls([])}setHeaderCtrls(e){if(!this.isAlive())return;const t=this.headerComps;this.headerComps={},e.forEach(o=>{const r=o.getInstanceId();let a=t[r];delete t[r],a==null&&(a=this.createHeaderComp(o),this.getGui().appendChild(a.getGui())),this.headerComps[r]=a}),Qt(t,(o,r)=>{this.getGui().removeChild(r.getGui()),this.destroyBean(r)});const n=this.gridOptionsService.is("ensureDomOrder"),s=this.gridOptionsService.isDomLayout("print");if(n||s){const o=Io(this.headerComps);o.sort((a,l)=>{const c=a.getCtrl().getColumnGroupChild().getLeft(),u=l.getCtrl().getColumnGroupChild().getLeft();return c-u});const r=o.map(a=>a.getGui());Yb(this.getGui(),r)}}createHeaderComp(e){let t;switch(this.ctrl.getType()){case ji.COLUMN_GROUP:t=new Fl(e);break;case ji.FLOATING_FILTER:t=new _r(e);break;default:t=new ba(e);break}return this.createBean(t),t.setParentComponent(this),t}}JA([Re],Rw.prototype,"init",null);JA([Hi],Rw.prototype,"destroyHeaderCtrls",null);var Tw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let oG=0;class $o extends be{constructor(e,t){super(),this.lastFocusEvent=null,this.columnGroupChild=e,this.parentRowCtrl=t,this.instanceId=e.getUniqueId()+"-"+oG++}shouldStopEventPropagation(e){const{headerRowIndex:t,column:n}=this.focusService.getFocusedHeader();return CA(this.gridOptionsService,e,t,n)}getWrapperHasFocus(){return this.gridOptionsService.getDocument().activeElement===this.eGui}setGui(e){this.eGui=e,this.addDomData()}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case ge.PAGE_DOWN:case ge.PAGE_UP:case ge.PAGE_HOME:case ge.PAGE_END:t&&e.preventDefault()}}addDomData(){const e=$o.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,e,this),this.addDestroyFunc(()=>this.gridOptionsService.setDomData(this.eGui,e,null))}getGui(){return this.eGui}focus(e){return this.eGui?(this.lastFocusEvent=e||null,this.eGui.focus(),!0):!1}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}}$o.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";Tw([W("focusService")],$o.prototype,"focusService",void 0);Tw([W("beans")],$o.prototype,"beans",void 0);Tw([W("userComponentFactory")],$o.prototype,"userComponentFactory",void 0);var rG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class um extends be{constructor(e,t,n,s){super(),this.columnOrGroup=e,this.eCell=t,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=n}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning?Ot(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,qe.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gridOptionsService.is("suppressColumnMoveAnimation"),t=ye(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=e.getLeft(),n=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,n),o=this.modifyLeftForPrintLayout(e,t);this.setLeft(s),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){if(!this.beans.gridOptionsService.isDomLayout("print")||e.getPinned()==="left")return t;const s=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){const o=this.beans.columnModel.getBodyContainerWidth();return s+o+t}return s+t}setLeft(e){ye(e)&&(this.eCell.style.left=`${e}px`);let t;if(this.columnOrGroup instanceof qe)t=this.columnOrGroup;else{const o=this.columnOrGroup.getLeafColumns();if(!o.length)return;o.length>1&&eA(this.ariaEl,o.length),t=o[0]}const n=this.beans.columnModel.getAriaColumnIndex(t);Vb(this.ariaEl,n)}}rG([Re],um.prototype,"postConstruct",null);var eD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Uh extends be{constructor(e,t){super(),this.columns=e,this.element=t}postConstruct(){this.gridOptionsService.is("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}}eD([W("columnHoverService")],Uh.prototype,"columnHoverService",void 0);eD([Re],Uh.prototype,"postConstruct",null);var xw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class dm extends $o{constructor(e,t){super(e,t),this.iconCreated=!1,this.column=e}setComp(e,t,n,s){super.setGui(t),this.comp=e,this.eButtonShowMainFilter=n,this.eFloatingFilterBody=s,this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,qe.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}setupActive(){const e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=gi("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new is(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();pa(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gridOptionsService.getDocument().activeElement===this.eGui)return;const o=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(o){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),o.focus();return}const r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.columnModel;let n=this.column;do if(n=e?t.getDisplayedColBefore(n):t.getDisplayedColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case ge.UP:case ge.DOWN:t||e.preventDefault();case ge.LEFT:case ge.RIGHT:if(t)return;e.stopPropagation();case ge.ENTER:t&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case ge.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const n=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&ol(e.relatedTarget,"ag-floating-filter");if(n&&s&&e.target===this.eGui){const r=this.lastFocusEvent,a=!!(r&&r.key===ge.TAB);if(r&&a){const l=r.shiftKey;this.focusService.focusInto(this.eGui,l)}}const o=this.getRowIndex();this.beans.focusService.setFocusedHeader(o,this.column)}setupHover(){this.createManagedBean(new Uh([this.column],this.eGui));const e=()=>{if(!this.gridOptionsService.is("columnHoverHighlight"))return;const t=this.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,N.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new um(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){const e=this.column.getColDef();this.suppressFilterButton=e.floatingFilterComponentParams?!!e.floatingFilterComponentParams.suppressFilterButton:!1}setupUserComp(){if(!this.active)return;const e=this.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])}setupSyncWithFilter(){if(!this.active)return;const e=t=>{const n=this.comp.getFloatingFilterComp();n&&n.then(s=>{if(s){const o=this.filterManager.getCurrentFloatingFilterParentModel(this.column);s.onParentModelChanged(o,t)}})};this.destroySyncListener=this.addManagedListener(this.column,qe.EVENT_FILTER_CHANGED,e),this.filterManager.isFilterActive(this.column)&&e(null)}setupWidth(){const e=()=>{const t=`${this.column.getActualWidth()}px`;this.comp.setWidth(t)};this.addManagedListener(this.column,qe.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,qe.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))}updateFilterButton(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))}onColDefChanged(){var e,t;const n=this.active;this.setupActive();const s=!n&&this.active;n&&!this.active&&((e=this.destroySyncListener)===null||e===void 0||e.call(this),(t=this.destroyFilterChangedListener)===null||t===void 0||t.call(this));const o=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!o?this.updateCompDetails(o,s):r.then(a=>{var l;(!a||((l=this.userCompDetails)===null||l===void 0?void 0:l.componentClass)!==o.componentClass)&&this.updateCompDetails(o,s)})}updateCompDetails(e,t){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())}}xw([W("filterManager")],dm.prototype,"filterManager",void 0);xw([W("columnHoverService")],dm.prototype,"columnHoverService",void 0);xw([W("menuFactory")],dm.prototype,"menuFactory",void 0);var Aw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class hm extends be{constructor(e,t,n,s,o){super(),this.pinned=e,this.column=t,this.eResize=n,this.comp=s,this.ctrl=o}postConstruct(){const e=this.column.getColDef(),t=[];let n,s;const o=()=>{if(mt(this.eResize,n),!n)return;const l=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(t.push(l),s){const c=this.gridOptionsService.is("skipHeaderOnAutoSize"),u=()=>{this.columnModel.autoSizeColumn(this.column,c,"uiColumnResized")};this.eResize.addEventListener("dblclick",u);const d=new li(this.eResize);d.addEventListener(li.EVENT_DOUBLE_TAP,u),this.addDestroyFunc(()=>{this.eResize.removeEventListener("dblclick",u),d.removeEventListener(li.EVENT_DOUBLE_TAP,u),d.destroy()})}},r=()=>{t.forEach(l=>l()),t.length=0},a=()=>{const l=this.column.isResizable(),c=!this.gridOptionsService.is("suppressAutoSize")&&!e.suppressAutoSize;(l!==n||c!==s)&&(n=l,s=c,r(),o())};a(),this.addDestroyFunc(r),this.ctrl.addRefreshFunction(a)}onResizing(e,t){const n=this.normaliseResizeAmount(t),s=[{key:this.column,newWidth:this.resizeStartWidth+n}];this.columnModel.setColumnWidths(s,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)}normaliseResizeAmount(e){let t=e;const n=this.pinned!=="left",s=this.pinned==="right";return this.gridOptionsService.is("enableRtl")?n&&(t*=-1):s&&(t*=-1),t}}Aw([W("horizontalResizeService")],hm.prototype,"horizontalResizeService",void 0);Aw([W("columnModel")],hm.prototype,"columnModel",void 0);Aw([Re],hm.prototype,"postConstruct",null);var fm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class jh extends be{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e;const t=e.getColDef();this.filteredOnly=!!(t!=null&&t.headerCheckboxSelectionFilteredOnly),this.currentPageOnly=!!(t!=null&&t.headerCheckboxSelectionCurrentPageOnly)}onSpaceKeyDown(e){const t=this.cbSelectAll,n=this.gridOptionsService.getDocument();t.isDisplayed()&&!t.getGui().contains(n.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new sa),this.cbSelectAll.addCssClass("ag-header-select-all"),Gi(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,N.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,sa.EVENT_CHANGED,this.onCbSelectAll.bind(this)),Yg(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.filteredOnly,this.currentPageOnly);this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),n=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",`${s} (${n})`):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(`${s} (${n})`),this.headerCellCtrl.refreshAriaDescription()}checkRightRowModelType(e){const t=this.rowModel.getType();return t==="clientSide"||t==="serverSide"?!0:(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue();let t="uiSelectAll";this.currentPageOnly?t="uiSelectAllCurrentPage":this.filteredOnly&&(t="uiSelectAllFiltered");const n={source:t,justFiltered:this.filteredOnly,justCurrentPage:this.currentPageOnly};e?this.selectionService.selectAllRowNodes(n):this.selectionService.deselectAllRowNodes(n)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){const t=e,n={column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi,context:this.gridOptionsService.context};e=t(n)}return e?this.checkRightRowModelType("headerCheckboxSelection"):!1}}fm([W("gridApi")],jh.prototype,"gridApi",void 0);fm([W("columnApi")],jh.prototype,"columnApi",void 0);fm([W("rowModel")],jh.prototype,"rowModel",void 0);fm([W("selectionService")],jh.prototype,"selectionService",void 0);var tD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ec;(function(i){i.TAB_GUARD="ag-tab-guard",i.TAB_GUARD_TOP="ag-tab-guard-top",i.TAB_GUARD_BOTTOM="ag-tab-guard-bottom"})(Ec||(Ec={}));class Dw extends be{constructor(e){super(),this.skipTabGuardFocus=!1;const{comp:t,eTopGuard:n,eBottomGuard:s,focusInnerElement:o,onFocusIn:r,onFocusOut:a,shouldStopEventPropagation:l,onTabKeyDown:c,handleKeyDown:u,eFocusableElement:d}=e;this.comp=t,this.eTopGuard=n,this.eBottomGuard=s,this.providedFocusInnerElement=o,this.eFocusableElement=d,this.providedFocusIn=r,this.providedFocusOut=a,this.providedShouldStopEventPropagation=l,this.providedOnTabKeyDown=c,this.providedHandleKeyDown=u}postConstruct(){this.createManagedBean(new is(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){const e=this.gridOptionsService.getNum("tabIndex")||0;this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}onFocusIn(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()}onFocusOut(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const n=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,t.focus()}}tD([W("focusService")],Dw.prototype,"focusService",void 0);tD([Re],Dw.prototype,"postConstruct",null);var co=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Xi;let mi=Xi=class extends be{static addKeyboardModeEvents(e,t){const n=Xi.instancesMonitored.get(e);n&&n.length>0?n.indexOf(t)===-1&&n.push(t):(Xi.instancesMonitored.set(e,[t]),e.addEventListener("keydown",Xi.toggleKeyboardMode),e.addEventListener("mousedown",Xi.toggleKeyboardMode))}static removeKeyboardModeEvents(e,t){const n=Xi.instancesMonitored.get(e);let s=[];n&&n.length&&(s=[...n].filter(o=>o!==t),Xi.instancesMonitored.set(e,s)),s.length===0&&(e.removeEventListener("keydown",Xi.toggleKeyboardMode),e.removeEventListener("mousedown",Xi.toggleKeyboardMode))}static toggleKeyboardMode(e){const t=Xi.keyboardModeActive,n=e.type==="keydown";if(n&&(e.ctrlKey||e.metaKey||e.altKey)||t&&n||!t&&!n)return;Xi.keyboardModeActive=n;const s=e.target.ownerDocument;if(!s)return;const o=Xi.instancesMonitored.get(s);o&&o.forEach(r=>{r.dispatchEvent({type:n?N.EVENT_KEYBOARD_FOCUS:N.EVENT_MOUSE_FOCUS})})}init(){const e=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_GROUP_OPENED,e),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl;const n=this.gridOptionsService.getDocument();Xi.addKeyboardModeEvents(n,this.gridCtrl),this.addDestroyFunc(()=>this.unregisterGridCompController(this.gridCtrl))})}unregisterGridCompController(e){const t=this.gridOptionsService.getDocument();Xi.removeKeyboardModeEvents(t,e)}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const e=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(e.getId());e!==t&&this.clearFocusedCell()}isKeyboardMode(){return Xi.keyboardModeActive}getFocusCellToUseAfterRefresh(){const e=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(e.activeElement,no.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){const e=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(e.activeElement,$o.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(e,t){let n=e;for(;n;){if(this.gridOptionsService.getDomData(n,t))return!1;n=n.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(e){return this.isCellRestoreFocused(e)?(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0):!1}isCellRestoreFocused(e){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.restoredFocusedCellPosition)}setRestoreFocusedCell(e){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=e)}getFocusEventParams(){const{rowIndex:e,rowPinned:t,column:n}=this.focusedCellPosition,s={rowIndex:e,rowPinned:t,column:n,isFullWidthCell:!1},o=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:t});return o&&(s.isFullWidthCell=o.isFullWidth()),s}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition==null)return;const e=Object.assign({type:N.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(e)}setFocusedCell(e){const{column:t,rowIndex:n,rowPinned:s,forceBrowserFocus:o=!1,preventScrollOnBrowserFocus:r=!1}=e,a=this.columnModel.getGridColumn(t);if(!a){this.focusedCellPosition=null;return}this.focusedCellPosition=a?{rowIndex:n,rowPinned:Qr(s),column:a}:null;const l=Object.assign(Object.assign({type:N.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:o,preventScrollOnBrowserFocus:r,floating:null});this.eventService.dispatchEvent(l)}isCellFocused(e){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(e,this.focusedCellPosition)}isRowNodeFocused(e){return this.isRowFocused(e.rowIndex,e.rowPinned)}isHeaderWrapperFocused(e){if(this.focusedHeaderPosition==null)return!1;const t=e.getColumnGroupChild(),n=e.getRowIndex(),s=e.getPinned(),{column:o,headerRowIndex:r}=this.focusedHeaderPosition;return t===o&&n===r&&s==o.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(e,t){this.focusedHeaderPosition={headerRowIndex:e,column:t}}focusHeaderPosition(e){const{direction:t,fromTab:n,allowUserOverride:s,event:o}=e;let{headerPosition:r}=e;if(s){const c=this.getFocusedHeader(),u=this.headerNavigationService.getHeaderRowCount();if(n){const d=this.gridOptionsService.getCallback("tabToNextHeader");d&&(r=d({backwards:t==="Before",previousHeaderPosition:c,nextHeaderPosition:r,headerRowCount:u}))}else{const d=this.gridOptionsService.getCallback("navigateToNextHeader");if(d&&o){const h={key:o.key,previousHeaderPosition:c,nextHeaderPosition:r,headerRowCount:u,event:o};r=d(h)}}}return r?r.headerRowIndex===-1?this.focusGridView(r.column):(this.headerNavigationService.scrollToColumn(r.column,t),this.ctrlsService.getHeaderRowContainerCtrl(r.column.getPinned()).focusHeader(r.headerRowIndex,r.column,o)):!1}focusFirstHeader(){let e=this.columnModel.getAllDisplayedColumns()[0];return e?(e.getParent()&&(e=this.columnModel.getColumnGroupAtLevel(e,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:e}})):!1}focusLastHeader(e){const t=this.headerNavigationService.getHeaderRowCount()-1,n=Ot(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:n},event:e})}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(e,t){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===e&&this.focusedCellPosition.rowPinned===Qr(t)}findFocusableElements(e,t,n=!1){const s=uA;let o=Ub;t&&(o+=", "+t),n&&(o+=', [tabindex="-1"]');const r=Array.prototype.slice.apply(e.querySelectorAll(s)),a=Array.prototype.slice.apply(e.querySelectorAll(o));return a.length?((c,u)=>c.filter(d=>u.indexOf(d)===-1))(r,a):r}focusInto(e,t=!1,n=!1){const s=this.findFocusableElements(e,null,n),o=t?Ot(s):s[0];return o?(o.focus({preventScroll:!0}),!0):!1}findFocusableElementBeforeTabGuard(e,t){if(!t)return null;const n=this.findFocusableElements(e),s=n.indexOf(t);if(s===-1)return null;let o=-1;for(let r=s-1;r>=0;r--)if(n[r].classList.contains(Ec.TAB_GUARD_TOP)){o=r;break}return o<=0?null:n[o-1]}findNextFocusableElement(e=this.eGridDiv,t,n){const s=this.findFocusableElements(e,t?':not([tabindex="-1"])':null),r=this.gridOptionsService.getDocument().activeElement;let a;t?a=s.findIndex(c=>c.contains(r)):a=s.indexOf(r);const l=a+(n?-1:1);return l<0||l>=s.length?null:s[l]}isTargetUnderManagedComponent(e,t){if(!t)return!1;const n=e.querySelectorAll(`.${is.FOCUS_MANAGED_CLASS}`);if(!n.length)return!1;for(let s=0;s<n.length;s++)if(n[s].contains(t))return!0;return!1}findTabbableParent(e,t=5){let n=0;for(;e&&Up(e)===null&&++n<=t;)e=e.parentElement;return Up(e)===null?null:e}focusGridView(e,t){if(this.gridOptionsService.is("suppressCellFocus"))return t?this.focusLastHeader():this.focusNextGridCoreContainer(!1);const n=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!n)return!1;const{rowIndex:s,rowPinned:o}=n,r=this.getFocusedHeader();if(!e&&r&&(e=r.column),s==null||!e)return!1;if(this.navigationService.ensureCellVisible({rowIndex:s,column:e,rowPinned:o}),this.setFocusedCell({rowIndex:s,column:e,rowPinned:Qr(o),forceBrowserFocus:!0}),this.rangeService){const a={rowIndex:s,rowPinned:o,column:e};this.rangeService.setRangeToCell(a)}return!0}focusNextGridCoreContainer(e,t=!1){return!t&&this.gridCtrl.focusNextInnerContainer(e)?!0:((t||!e&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(e),!1)}};mi.AG_KEYBOARD_FOCUS="ag-keyboard-focus";mi.keyboardModeActive=!1;mi.instancesMonitored=new Map;co([W("eGridDiv")],mi.prototype,"eGridDiv",void 0);co([W("columnModel")],mi.prototype,"columnModel",void 0);co([W("headerNavigationService")],mi.prototype,"headerNavigationService",void 0);co([W("rowRenderer")],mi.prototype,"rowRenderer",void 0);co([W("rowPositionUtils")],mi.prototype,"rowPositionUtils",void 0);co([W("cellPositionUtils")],mi.prototype,"cellPositionUtils",void 0);co([xt("rangeService")],mi.prototype,"rangeService",void 0);co([W("navigationService")],mi.prototype,"navigationService",void 0);co([W("ctrlsService")],mi.prototype,"ctrlsService",void 0);co([Re],mi.prototype,"init",null);mi=Xi=co([Be("focusService")],mi);var Tr=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class zo extends $o{constructor(e,t){super(e,t),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,t,n,s){super.setGui(t),this.comp=e,this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterCss(),this.setupColId(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.createManagedBean(new hm(this.getPinned(),this.column,n,e,this)),this.createManagedBean(new Uh([this.column],t)),this.createManagedBean(new um(this.column,t,this.beans)),this.createManagedBean(new is(t,{shouldStopEventPropagation:o=>this.shouldStopEventPropagation(o),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addMouseDownListenerIfNeeded(t),this.addManagedListener(this.column,qe.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addMouseDownListenerIfNeeded(e){if(!xs())return;const t=["mousedown","touchstart"],n=this.gridOptionsService.getDocument();t.forEach(s=>{this.addManagedListener(e,s,o=>{const r=n.activeElement;r!==e&&!e.contains(r)&&(e.focus(),mi.toggleKeyboardMode(o))})})}setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)}createParams(){const e=this.column.getColDef();return{column:this.column,displayName:this.displayName,enableSorting:e.sortable,enableMenu:this.menuEnabled,showColumnMenu:n=>{this.gridApi.showColumnMenuAfterButtonClick(this.column,n)},progressSort:n=>{this.sortController.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,s)=>{this.sortController.setSortForColumn(this.column,n,!!s,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()}}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new jh(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===ge.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===ge.ENTER&&this.onEnterKeyDown(e)}onEnterKeyDown(e){const t=this.comp.getUserCompInstance();if(t){if(e.ctrlKey||e.metaKey)this.menuEnabled&&t.showMenu&&(e.preventDefault(),t.showMenu());else if(this.sortable){const n=e.shiftKey;this.sortController.progressSort(this.column,n,"uiColumnSorted")}}}isMenuEnabled(){return this.menuEnabled}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column)}this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(){const e={getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>this.eGui,getLocation:()=>"header",getTooltipValue:()=>this.column.getColDef().headerTooltip},t=this.createManagedBean(new vw(e,this.beans));t.setComp(this.comp),this.refreshFunctions.push(()=>t.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),n=ZA.getHeaderClassesFromColDef(t,this.gridOptionsService,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(n),n.forEach(o=>{s.has(o)?s.delete(o):this.comp.addOrRemoveCssClass(o,!0)}),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const t=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");this.moveDragSource={type:Sn.HeaderCell,eElement:e,defaultIconName:t?bt.ICON_HIDE:bt.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(),dragItemName:this.displayName,onDragStarted:()=>this.column.setMoving(!0,"uiColumnMoved"),onDragStopped:()=>this.column.setMoving(!1,"uiColumnMoved"),onGridEnter:n=>{var s;if(t){const o=((s=n==null?void 0:n.columns)===null||s===void 0?void 0:s.filter(r=>!r.getColDef().lockVisible))||[];this.columnModel.setColumnsVisible(o,!0,"uiColumnMoved")}},onGridExit:n=>{var s;if(t){const o=((s=n==null?void 0:n.columns)===null||s===void 0?void 0:s.filter(r=>!r.getColDef().lockVisible))||[];this.columnModel.setColumnsVisible(o,!1,"uiColumnMoved")}}},this.dragAndDropService.addDragSource(this.moveDragSource,!0)}createDragItem(){const e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}}removeDragSource(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)}onColDefChanged(){this.refresh()}updateState(){const e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gridOptionsService.is("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const t=this.column.getActualWidth();this.comp.setWidth(`${t}px`)};this.addManagedListener(this.column,qe.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,qe.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,qe.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,qe.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.addRefreshFunction(e)}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:n,columnModel:s,gridOptionsService:o}=this;if(!t.isSpanHeaderHeight())return;const{numberOfParents:r,isSpanningTotal:a}=this.getColumnGroupPaddingInfo();if(n.addOrRemoveCssClass("ag-header-span-height",r>0),r===0)return;n.addOrRemoveCssClass("ag-header-span-total",a);const c=o.is("pivotMode")?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight(),u=s.getColumnHeaderRowHeight(),d=r*c;e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${u+d}px`)}getColumnGroupPaddingInfo(){let e=this.column.getParent();if(!e||!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}}setupAutoHeight(e){const t=l=>{if(!this.isAlive())return;const{paddingTop:c,paddingBottom:u,borderBottomWidth:d,borderTopWidth:h}=ma(this.getGui()),f=c+u+d+h,p=e.offsetHeight+f;if(l<5){const v=this.beans.gridOptionsService.getDocument(),y=!v||!v.contains(e),C=p==0;if(y||C){this.beans.frameworkOverrides.setTimeout(()=>t(l+1),0);return}}this.columnModel.setColumnHeaderHeight(this.column,p)};let n=!1,s;const o=()=>{const l=this.column.isAutoHeaderHeight();l&&!n&&r(),!l&&n&&a()},r=()=>{n=!0,t(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),s=this.resizeObserverService.observeResize(e,()=>t(0))},a=()=>{n=!1,s&&s(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),s=void 0};o(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,qe.EVENT_WIDTH_CHANGED,()=>n&&t(0)),this.addManagedListener(this.eventService,qe.EVENT_SORT_CHANGED,()=>{n&&this.beans.frameworkOverrides.setTimeout(()=>t(0))}),this.addRefreshFunction(o)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),t=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Ux(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}refreshAriaDescription(){const e=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(e.length?e.join(" "):void 0)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaDescription()}addColumnHoverListener(){const e=()=>{if(!this.gridOptionsService.is("columnHoverHighlight"))return;const t=this.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",t)};this.addManagedListener(this.eventService,N.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupFilterCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-filtered",this.column.isFilterActive())};this.addManagedListener(this.column,qe.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupColId(){this.comp.setColId(this.column.getColId())}addActiveHeaderMouseListeners(){const e=t=>this.setActiveHeader(t.type==="mouseenter");this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e)}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}}Tr([W("columnModel")],zo.prototype,"columnModel",void 0);Tr([W("columnHoverService")],zo.prototype,"columnHoverService",void 0);Tr([W("sortController")],zo.prototype,"sortController",void 0);Tr([W("menuFactory")],zo.prototype,"menuFactory",void 0);Tr([W("dragAndDropService")],zo.prototype,"dragAndDropService",void 0);Tr([W("resizeObserverService")],zo.prototype,"resizeObserverService",void 0);Tr([W("gridApi")],zo.prototype,"gridApi",void 0);Tr([W("columnApi")],zo.prototype,"columnApi",void 0);Tr([Hi],zo.prototype,"removeDragSource",null);var pm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class $h extends be{constructor(e,t,n,s){super(),this.eResize=t,this.comp=e,this.pinned=n,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gridOptionsService.is("suppressAutoSize")){const t=this.gridOptionsService.is("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const n=[];this.columnGroup.getDisplayedLeafColumns().forEach(o=>{o.getColDef().suppressAutoSize||n.push(o.getColId())}),n.length>0&&this.columnModel.autoSizeColumns({columns:n,skipHeader:t,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){this.calculateInitialValues();let t=null;if(e&&(t=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),t){const n=t.getDisplayedLeafColumns();this.resizeTakeFromCols=n.filter(s=>s.isResizable()),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach(s=>this.resizeTakeFromStartWidth+=s.getActualWidth()),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach(s=>this.resizeTakeFromRatios.push(s.getActualWidth()/this.resizeTakeFromStartWidth))}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)}onResizing(e,t,n="uiColumnResized"){const s=this.normaliseDragChange(t),o=this.resizeStartWidth+s;this.resizeColumns(o,n,e)}resizeLeafColumnsToFit(e){const t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues(),t>this.resizeStartWidth&&this.resizeColumns(t,e,!0)}resizeColumns(e,t,n=!0){const s=[];if(s.push({columns:this.resizeCols,ratios:this.resizeRatios,width:e}),this.resizeTakeFromCols){const o=e-this.resizeStartWidth;s.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-o})}this.columnModel.resizeColumnSets({resizeSets:s,finished:n,source:t}),n&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)}calculateInitialValues(){const e=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=e.filter(t=>t.isResizable()),this.resizeStartWidth=0,this.resizeCols.forEach(t=>this.resizeStartWidth+=t.getActualWidth()),this.resizeRatios=[],this.resizeCols.forEach(t=>this.resizeRatios.push(t.getActualWidth()/this.resizeStartWidth))}normaliseDragChange(e){let t=e;return this.gridOptionsService.is("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}}pm([W("horizontalResizeService")],$h.prototype,"horizontalResizeService",void 0);pm([W("autoWidthCalculator")],$h.prototype,"autoWidthCalculator",void 0);pm([W("columnModel")],$h.prototype,"columnModel",void 0);pm([Re],$h.prototype,"postConstruct",null);var aG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class iD extends be{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,Bt.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.addEventListener("widthChanged",e),t.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.removeEventListener("widthChanged",e),t.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}}aG([Re],iD.prototype,"postConstruct",null);var gm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class zh extends $o{constructor(e,t){super(e,t),this.columnGroup=e}setComp(e,t,n){super.setGui(t),this.comp=e,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.addAttributes(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();const s=this.getParentRowCtrl().getPinned(),o=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new Uh(o,t)),this.createManagedBean(new um(this.columnGroup,t,this.beans)),this.createManagedBean(new iD(e,this.columnGroup)),this.groupResizeFeature=this.createManagedBean(new $h(e,n,s,this.columnGroup)),this.createManagedBean(new is(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}resizeLeafColumnsToFit(e){this.groupResizeFeature&&this.groupResizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){let e=this.displayName;const t={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:s=>{this.columnModel.setColumnGroupOpened(this.columnGroup.getProvidedColumnGroup(),s,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};if(!e){let s=this.columnGroup;const o=s.getLeafColumns();for(;s.getParent()&&s.getParent().getLeafColumns().length===o.length;)s=s.getParent();const r=s.getColGroupDef();r&&(e=r.headerName),e||(e=o?this.columnModel.getDisplayNameForColumn(o[0],"header",!0):"")}const n=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(n)}setupTooltip(){const e=this.columnGroup.getColGroupDef(),t={getColumn:()=>this.columnGroup,getGui:()=>this.eGui,getLocation:()=>"headerGroup",getTooltipValue:()=>e&&e.headerTooltip};e&&(t.getColDef=()=>e),this.createManagedBean(new vw(t,this.beans)).setComp(this.comp)}setupExpandable(){const e=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,It.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,It.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.columnGroup;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)}addAttributes(){this.comp.setColId(this.columnGroup.getUniqueId())}addClasses(){const e=this.columnGroup.getColGroupDef(),t=ZA.getHeaderClassesFromColDef(e,this.gridOptionsService,null,this.columnGroup);this.columnGroup.isPadding()?(t.push("ag-header-group-cell-no-group"),this.columnGroup.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&t.push("ag-header-span-height")):t.push("ag-header-group-cell-with-group"),t.forEach(n=>this.comp.addOrRemoveCssClass(n,!0))}setupMovingCss(){const t=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),n=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.columnGroup.isMoving());t.forEach(s=>{this.addManagedListener(s,qe.EVENT_MOVING_CHANGED,n)}),n()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.columnGroup)}}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===ge.ENTER){const n=this.columnGroup,s=!n.isExpanded();this.columnModel.setColumnGroupOpened(n.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){if(this.isSuppressMoving())return;const t=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),n=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),s={type:Sn.HeaderCell,eElement:e,defaultIconName:n?bt.ICON_HIDE:bt.ICON_NOT_ALLOWED,dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:()=>t.forEach(o=>o.setMoving(!0,"uiColumnDragged")),onDragStopped:()=>t.forEach(o=>o.setMoving(!1,"uiColumnDragged")),onGridEnter:o=>{var r;if(n){const a=((r=o==null?void 0:o.columns)===null||r===void 0?void 0:r.filter(l=>!l.getColDef().lockVisible))||[];this.columnModel.setColumnsVisible(a,!0,"uiColumnMoved")}},onGridExit:o=>{var r;if(n){const a=((r=o==null?void 0:o.columns)===null||r===void 0?void 0:r.filter(l=>!l.getColDef().lockVisible))||[];this.columnModel.setColumnsVisible(a,!1,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(s,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(s))}getDragItemForGroup(){const e=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),t={};e.forEach(s=>t[s.getId()]=s.isVisible());const n=[];return this.columnModel.getAllDisplayedColumns().forEach(s=>{e.indexOf(s)>=0&&(n.push(s),tn(e,s))}),e.forEach(s=>n.push(s)),{columns:n,visibleState:t}}isSuppressMoving(){let e=!1;return this.columnGroup.getLeafColumns().forEach(n=>{(n.getColDef().suppressMovable||n.getColDef().lockPosition)&&(e=!0)}),e||this.gridOptionsService.is("suppressMovableColumns")}}gm([W("columnModel")],zh.prototype,"columnModel",void 0);gm([W("dragAndDropService")],zh.prototype,"dragAndDropService",void 0);gm([W("gridApi")],zh.prototype,"gridApi",void 0);gm([W("columnApi")],zh.prototype,"columnApi",void 0);var nD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let lG=0;class fd extends be{constructor(e,t,n){super(),this.instanceId=lG++,this.headerCellCtrls={},this.rowIndex=e,this.pinned=t,this.type=n}getInstanceId(){return this.instanceId}setComp(e){this.comp=e,this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addEventListeners(),xs()&&this.comp.setTransform("translateZ(0)"),e.setAriaRowIndex(this.rowIndex+1)}addEventListeners(){this.addManagedListener(this.eventService,N.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){return sl(this.headerCellCtrls).find(t=>t.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){return this.gridOptionsService.isDomLayout("print")?this.pinned!=null?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null):this.columnModel.getContainerWidth(this.pinned)}onRowHeightChanged(){let e=this.columnModel.getHeaderRowCount();const t=[];let n=0;this.columnModel.hasFloatingFilters()&&(e++,n=1);const s=this.columnModel.getColumnGroupHeaderRowHeight(),o=this.columnModel.getColumnHeaderRowHeight(),r=1+n,a=e-r;for(let u=0;u<a;u++)t.push(s);t.push(o);for(let u=0;u<n;u++)t.push(this.columnModel.getFloatingFiltersHeight());let l=0;for(let u=0;u<this.rowIndex;u++)l+=t[u];const c=t[this.rowIndex]+"px";this.comp.setTop(l+"px"),this.comp.setHeight(c)}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(){const e=this.headerCellCtrls;this.headerCellCtrls={},this.getColumnsInViewport().forEach(o=>{if(o.isEmptyGroup())return;const r=o.getUniqueId();let a=e[r];if(delete e[r],a&&a.getColumnGroupChild()!=o&&(this.destroyBean(a),a=void 0),a==null)switch(this.type){case ji.FLOATING_FILTER:a=this.createBean(new dm(o,this));break;case ji.COLUMN_GROUP:a=this.createBean(new zh(o,this));break;default:a=this.createBean(new zo(o,this));break}this.headerCellCtrls[r]=a});const n=o=>this.focusService.isHeaderWrapperFocused(o)?this.columnModel.isDisplayed(o.getColumnGroupChild()):!1;Qt(e,(o,r)=>{n(r)?this.headerCellCtrls[o]=r:this.destroyBean(r)});const s=Io(this.headerCellCtrls);this.comp.setHeaderCtrls(s)}getColumnsInViewport(){return this.gridOptionsService.isDomLayout("print")?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth();return["left",null,"right"].forEach(n=>{const s=this.columnModel.getVirtualHeaderGroupRow(n,t);e=e.concat(s)}),e}getActualDepth(){return this.type==ji.FLOATING_FILTER?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,t){const s=Io(this.headerCellCtrls).find(o=>o.getColumnGroupChild()==e);return s?(s.focus(t),!0):!1}destroy(){Qt(this.headerCellCtrls,(e,t)=>{this.destroyBean(t)}),this.headerCellCtrls={},super.destroy()}}nD([W("columnModel")],fd.prototype,"columnModel",void 0);nD([W("focusService")],fd.prototype,"focusService",void 0);var Kh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class du extends be{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,t){this.comp=e,this.eViewport=t,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,N.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const t=new uu(this.pinned,e);this.createManagedBean(t)}refresh(e=!1){const t=new Fc,n=this.focusService.getFocusHeaderToUseAfterRefresh(),s=()=>{const l=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let c=0;c<l;c++){const u=this.createBean(new fd(t.next(),this.pinned,ji.COLUMN_GROUP));this.groupsRowCtrls.push(u)}},o=()=>{const l=t.next(),c=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.getRowIndex()!==l);(c||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),c&&(this.columnsRowCtrl=this.createBean(new fd(l,this.pinned,ji.COLUMN)))},r=()=>{this.includeFloatingFilter=this.columnModel.hasFloatingFilters()&&!this.hidden;const l=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){l();return}const c=t.next();if(this.filtersRowCtrl){const u=this.filtersRowCtrl.getRowIndex()!==c;(!e||u)&&l()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new fd(c,this.pinned,ji.FLOATING_FILTER)))};s(),o(),r();const a=this.getAllCtrls();this.comp.setCtrls(a),this.restoreFocusOnHeader(n)}restoreFocusOnHeader(e){e==null||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.columnModel.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new au(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(this.pinned==null)return;const e=this.pinned==="left",t=this.pinned==="right";this.hidden=!0;const n=()=>{const s=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(s==null)return;const o=s==0,r=this.hidden!==o,a=this.gridOptionsService.is("enableRtl"),l=this.gridOptionsService.getScrollbarWidth(),u=this.scrollVisibleService.isVerticalScrollShowing()&&(a&&e||!a&&t)?s+l:s;this.comp.setPinnedContainerWidth(`${u}px`),this.comp.setDisplayed(!o),r&&(this.hidden=o,this.refresh())};this.addManagedListener(this.eventService,N.EVENT_LEFT_PINNED_WIDTH_CHANGED,n),this.addManagedListener(this.eventService,N.EVENT_RIGHT_PINNED_WIDTH_CHANGED,n),this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,n),this.addManagedListener(this.eventService,N.EVENT_SCROLLBAR_WIDTH_CHANGED,n)}getHeaderCtrlForColumn(e){if(e instanceof qe)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(this.groupsRowCtrls.length!==0)for(let t=0;t<this.groupsRowCtrls.length;t++){const n=this.groupsRowCtrls[t].getHeaderCellCtrl(e);if(n)return n}}getHtmlElementForColumnHeader(e){const t=this.getHeaderCtrlForColumn(e);return t?t.getGui():null}getRowType(e){const n=this.getAllCtrls()[e];return n?n.getType():void 0}focusHeader(e,t,n){const o=this.getAllCtrls()[e];return o?o.focusHeader(t,n):!1}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}}Kh([W("ctrlsService")],du.prototype,"ctrlsService",void 0);Kh([W("scrollVisibleService")],du.prototype,"scrollVisibleService",void 0);Kh([W("pinnedWidthService")],du.prototype,"pinnedWidthService",void 0);Kh([W("columnModel")],du.prototype,"columnModel",void 0);Kh([W("focusService")],du.prototype,"focusService",void 0);var Ow=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Jn extends Qe{constructor(e){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=e}init(){this.selectAndSetTemplate();const e={setDisplayed:n=>this.setDisplayed(n),setCtrls:n=>this.setCtrls(n),setCenterWidth:n=>this.eCenterContainer.style.width=n,setViewportScrollLeft:n=>this.getGui().scrollLeft=n,setPinnedContainerWidth:n=>{const s=this.getGui();s.style.width=n,s.style.maxWidth=n,s.style.minWidth=n}};this.createManagedBean(new du(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",n=e?Jn.PINNED_LEFT_TEMPLATE:t?Jn.PINNED_RIGHT_TEMPLATE:Jn.CENTER_TEMPLATE;this.setTemplate(n),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let n;const s=o=>{const r=o.getGui();r.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(r),n&&Kb(this.eRowContainer,r,n),n=r};e.forEach(o=>{const r=o.getInstanceId(),a=t[r];delete t[r];const l=a||this.createBean(new Rw(o));this.headerRowComps[r]=l,this.rowCompsList.push(l),s(l)}),Io(t).forEach(o=>this.destroyRowComp(o))}}Jn.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"></div>';Jn.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"></div>';Jn.CENTER_TEMPLATE=`<div class="ag-header-viewport" role="presentation">
<div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>
</div>`;Ow([Ae("eCenterContainer")],Jn.prototype,"eCenterContainer",void 0);Ow([Re],Jn.prototype,"init",null);Ow([Hi],Jn.prototype,"destroyRowComps",null);var Yh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},Ro;(function(i){i[i.UP=0]="UP",i[i.DOWN=1]="DOWN",i[i.LEFT=2]="LEFT",i[i.RIGHT=3]="RIGHT"})(Ro||(Ro={}));let vl=class extends be{postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,t,n){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;const{headerRowIndex:s,column:o}=t,r=this.getHeaderRowCount(),a=e===Ro.UP;let{nextRow:l,nextFocusColumn:c}=a?this.headerPositionUtils.getColumnVisibleParent(o,s):this.headerPositionUtils.getColumnVisibleChild(o,s),u=!1;return l<0&&(l=0,c=o,u=!0),l>=r&&(l=-1),!u&&!c?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:c},allowUserOverride:!0,event:n})}navigateHorizontally(e,t=!1,n){const s=this.focusService.getFocusedHeader(),o=e===Ro.LEFT,r=this.gridOptionsService.is("enableRtl");let a,l;return o!==r?(l="Before",a=this.headerPositionUtils.findHeader(s,l)):(l="After",a=this.headerPositionUtils.findHeader(s,l)),a||!t?this.focusService.focusHeaderPosition({headerPosition:a,direction:l,fromTab:t,allowUserOverride:!0,event:n}):this.focusNextHeaderRow(s,l,n)}focusNextHeaderRow(e,t,n){const s=e.headerRowIndex;let o=null,r;return t==="Before"?s>0&&(r=s-1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=s+1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),this.focusService.focusHeaderPosition({headerPosition:o,direction:t,fromTab:!0,allowUserOverride:!0,event:n})}scrollToColumn(e,t="After"){if(e.getPinned())return;let n;if(e instanceof Bt){const s=e.getDisplayedLeafColumns();n=t==="Before"?Ot(s):s[0]}else n=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(n)}};Yh([W("focusService")],vl.prototype,"focusService",void 0);Yh([W("headerPositionUtils")],vl.prototype,"headerPositionUtils",void 0);Yh([W("ctrlsService")],vl.prototype,"ctrlsService",void 0);Yh([Re],vl.prototype,"postConstruct",null);vl=Yh([Be("headerNavigationService")],vl);var mm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class qh extends be{setComp(e,t,n){this.comp=e,this.eGui=t,this.createManagedBean(new is(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_GRID_STYLES_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let t=0,n=e.getHeaderRowCount(),s;e.hasFloatingFilters()&&(n++,t=1);const r=this.columnModel.getColumnGroupHeaderRowHeight(),a=this.columnModel.getColumnHeaderRowHeight(),l=1+t,c=n-l;if(s=t*e.getFloatingFiltersHeight(),s+=c*r,s+=a,this.headerHeight===s)return;this.headerHeight=s;const u=`${s+1}px`;this.comp.setHeightAndMinHeight(u),this.eventService.dispatchEvent({type:N.EVENT_HEADER_HEIGHT_CHANGED})}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const t=this.columnModel.getAllDisplayedColumns().some(n=>n.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",t)}onTabKeyDown(e){const t=this.gridOptionsService.is("enableRtl"),n=e.shiftKey!==t?Ro.LEFT:Ro.RIGHT;(this.headerNavigationService.navigateHorizontally(n,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let t=null;switch(e.key){case ge.LEFT:t=Ro.LEFT;case ge.RIGHT:ye(t)||(t=Ro.RIGHT),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case ge.UP:t=Ro.UP;case ge.DOWN:ye(t)||(t=Ro.DOWN),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const t=this.gridOptionsService.getDocument(),{relatedTarget:n}=e;!n&&this.eGui.contains(t.activeElement)||this.eGui.contains(n)||this.focusService.clearFocusedHeader()}}mm([W("headerNavigationService")],qh.prototype,"headerNavigationService",void 0);mm([W("focusService")],qh.prototype,"focusService",void 0);mm([W("columnModel")],qh.prototype,"columnModel",void 0);mm([W("ctrlsService")],qh.prototype,"ctrlsService",void 0);var cG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Xh extends Qe{constructor(){super(Xh.TEMPLATE)}postConstruct(){const e={addOrRemoveCssClass:(s,o)=>this.addOrRemoveCssClass(s,o),setHeightAndMinHeight:s=>{this.getGui().style.height=s,this.getGui().style.minHeight=s}};this.createManagedBean(new qh).setComp(e,this.getGui(),this.getFocusableElement());const n=s=>{this.createManagedBean(s),this.appendChild(s)};n(new Jn("left")),n(new Jn(null)),n(new Jn("right"))}}Xh.TEMPLATE='<div class="ag-header" role="presentation"/>';cG([Re],Xh.prototype,"postConstruct",null);var Pw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let jd=class extends be{addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(t),()=>this.dragService.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const n=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(n)}setResizeIcons(){const e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.getGridCtrl();e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};Pw([W("dragService")],jd.prototype,"dragService",void 0);Pw([W("ctrlsService")],jd.prototype,"ctrlsService",void 0);jd=Pw([Be("horizontalResizeService")],jd);var Qh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Cl=class extends be{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,t){this.showPopup(e,n=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:n})},"columnMenu",t.target)}showMenuAfterButtonClick(e,t,n){this.showPopup(e,s=>{this.popupService.positionPopupByComponent({type:n,eventSource:t,ePopup:s,keepWithinBounds:!0,position:"under",column:e})},n,t)}showPopup(e,t,n,s){const o=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU");if(!o)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const r=document.createElement("div");Gi(r,"presentation"),r.classList.add("ag-menu"),this.tabListener=this.addManagedListener(r,"keydown",f=>this.trapFocusWithin(f,r)),o.guiPromise.then(f=>r.appendChild(f));let a;const l=()=>{var f;return(f=o.filterPromise)===null||f===void 0?void 0:f.then(g=>{var p;return(p=g==null?void 0:g.afterGuiDetached)===null||p===void 0?void 0:p.call(g)})},c=s||this.ctrlsService.getGridBodyCtrl().getGui(),u=f=>{e.setMenuVisible(!1,"contextMenu");const g=f instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),g&&s&&Er(s)){const p=this.focusService.findTabbableParent(s);p&&p.focus()}l()},d=this.localeService.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:r,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(r),anchorToElement:c,ariaLabel:d("ariaLabelColumnMenu","Column Menu")});h&&(this.hidePopup=a=h.hideFunc),o.filterPromise.then(f=>{t(r),f.afterGuiAttached&&f.afterGuiAttached({container:n,hidePopup:a})}),e.setMenuVisible(!0,"contextMenu")}trapFocusWithin(e,t){e.key!==ge.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(t,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(t,e.shiftKey))}isMenuEnabled(e){return e.isFilterAllowed()&&e.getMenuTabs(["filterMenuTab"]).includes("filterMenuTab")}};Qh([W("filterManager")],Cl.prototype,"filterManager",void 0);Qh([W("popupService")],Cl.prototype,"popupService",void 0);Qh([W("focusService")],Cl.prototype,"focusService",void 0);Qh([W("ctrlsService")],Cl.prototype,"ctrlsService",void 0);Cl=Qh([Be("menuFactory")],Cl);var vm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class hu extends Qe{constructor(e){super(hu.getTemplate(e.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=e,e.items&&e.items.forEach(t=>this.addItem(t))}postConstruct(){this.createManagedBean(new is(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),this.addDestroyFunc(()=>{var e,t,n;return(n=(t=(e=this.activeItem)===null||e===void 0?void 0:e.tabbedItem)===null||t===void 0?void 0:t.afterDetachedCallback)===null||n===void 0?void 0:n.call(t)})}static getTemplate(e){return`<div class="ag-tabs ${e}">
<div ref="eHeader" role="tablist" class="ag-tabs-header ${e?`${e}-header`:""}"></div>
<div ref="eBody" role="presentation" class="ag-tabs-body ${e?`${e}-body`:""}"></div>
</div>`}handleKeyDown(e){const t=this.gridOptionsService.getDocument();switch(e.key){case ge.RIGHT:case ge.LEFT:if(!this.eHeader.contains(t.activeElement))return;const n=e.key===ge.RIGHT,s=this.gridOptionsService.is("enableRtl"),o=this.items.indexOf(this.activeItem),r=n!==s?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===r)return;e.preventDefault();const a=this.items[r];this.showItemWrapper(a),a.eHeaderButton.focus();break;case ge.UP:case ge.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{focusService:t,eHeader:n,eBody:s,activeItem:o}=this,a=this.gridOptionsService.getDocument().activeElement,l=e.target;if(e.preventDefault(),n.contains(a)){t.focusInto(s,e.shiftKey);return}let c=null;t.isTargetUnderManagedComponent(s,l)&&(e.shiftKey&&(c=this.focusService.findFocusableElementBeforeTabGuard(s,l)),c||(c=o.eHeaderButton)),!c&&s.contains(a)&&(c=t.findNextFocusableElement(s,!1,e.shiftKey),c||(c=o.eHeaderButton)),c&&c.focus()}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=document.createElement("span");Gi(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(e.title),t.classList.add("ag-tab"),this.eHeader.appendChild(t),pa(t,e.titleLabel);const n={tabbedItem:e,eHeaderButton:t};this.items.push(n),t.addEventListener("click",this.showItemWrapper.bind(this,n))}showItem(e){const t=this.items.find(n=>n.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){var t,n;const{tabbedItem:s,eHeaderButton:o}=e;if(this.params.onItemClicked&&this.params.onItemClicked({item:s}),this.activeItem===e){Rx(this.params.onActiveItemClicked);return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),Zn(this.eBody),s.bodyPromise.then(r=>{this.eBody.appendChild(r);const a=!this.focusService.isKeyboardMode();if(this.focusService.focusInto(this.eBody,!1,a),s.afterAttachedCallback&&s.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const l=s.getScrollableContainer&&s.getScrollableContainer()||r;this.lastScrollListener=this.addManagedListener(l,"scroll",()=>{this.tabbedItemScrollMap.set(s.name,l.scrollTop)});const c=this.tabbedItemScrollMap.get(s.name);c!==void 0&&setTimeout(()=>{l.scrollTop=c},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),(n=(t=this.activeItem.tabbedItem).afterDetachedCallback)===null||n===void 0||n.call(t)),o.classList.add("ag-tab-selected"),this.activeItem=e}}vm([W("focusService")],hu.prototype,"focusService",void 0);vm([Ae("eHeader")],hu.prototype,"eHeader",void 0);vm([Ae("eBody")],hu.prototype,"eBody",void 0);vm([Re],hu.prototype,"postConstruct",null);var uG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const dG=50;let YC=class extends be{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,t){const n=this.gridOptionsService.getWindow(),s=()=>{const l=new n.ResizeObserver(t);return l.observe(e),()=>l.disconnect()},o=()=>{let l=$C(e),c=jC(e),u=!0;const d=()=>{if(u){const h=$C(e),f=jC(e);(h!==l||f!==c)&&(l=h,c=f,t()),this.doNextPolyfillTurn(d)}};return d(),()=>u=!1},r=this.gridOptionsService.is("suppressBrowserResizeObserver");return!!n.ResizeObserver&&!r?s():o()}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){if(this.polyfillScheduled)return;const e=()=>{const t=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],t.forEach(n=>n())};this.polyfillScheduled=!0,this.getFrameworkOverrides().setTimeout(e,dG)}};YC=uG([Be("resizeObserverService")],YC);var Cm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Gc=class extends be{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const t=this.gridOptionsService.is("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,t&&e===0){const n=this.paginationProxy.getCurrentPage();n!==this.lastPage&&(this.lastPage=n,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gridOptionsService.is("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){this.useAnimationFrame===!1&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,t,n){this.verifyAnimationFrameOn(n);const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[n],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((n,s)=>n.index!==s.index?t*(s.index-n.index):s.createOrder-n.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,n=t.list,s=this.createTasksP2,o=s.list,r=this.destroyTasks,a=new Date().getTime();let l=new Date().getTime()-a;const c=e<=0,u=this.ctrlsService.getGridBodyCtrl();for(;c||l<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){let h;if(n.length)this.sortTaskList(t),h=n.pop().task;else if(o.length)this.sortTaskList(s),h=o.pop().task;else if(r.length)h=r.pop();else{this.cancelledTasks.clear();break}this.cancelledTasks.has(h)||h()}l=new Date().getTime()-a}n.length||o.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const t=this.gridOptionsService.getWindow();t.requestAnimationFrame?t.requestAnimationFrame(e):t.webkitRequestAnimationFrame?t.webkitRequestAnimationFrame(e):t.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let t=!1;return()=>{if(!this.isOn()){this.getFrameworkOverrides().setTimeout(e,0);return}t||(t=!0,this.addDestroyTask(()=>{t=!1,e()}))}}};Cm([W("ctrlsService")],Gc.prototype,"ctrlsService",void 0);Cm([W("paginationProxy")],Gc.prototype,"paginationProxy",void 0);Cm([Re],Gc.prototype,"init",null);Gc=Cm([Be("animationFrameService")],Gc);var Zh=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let yl=class extends be{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.centerRowContainerCtrl})}getPreferredWidthForColumn(e,t){const n=this.getHeaderCellForColumn(e);if(!n)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return t||s.push(n),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.addElementsToContainerAndGetWidth([t]):-1}addElementsToContainerAndGetWidth(e){const t=document.createElement("form");t.style.position="fixed";const n=this.centerRowContainerCtrl.getContainerElement();e.forEach(r=>this.cloneItemIntoDummy(r,t)),n.appendChild(t);const s=t.offsetWidth;n.removeChild(t);const o=this.getAutoSizePadding();return s+o}getAutoSizePadding(){const e=this.gridOptionsService.getNum("autoSizePadding");return e!=null&&e>=0?e:20}getHeaderCellForColumn(e){let t=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(n=>{const s=n.getHtmlElementForColumnHeader(e);s!=null&&(t=s)}),t}cloneItemIntoDummy(e,t){const n=e.cloneNode(!0);n.style.width="",n.style.position="static",n.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>n.classList.contains(l))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let a=e.parentElement;for(;a;){if(["ag-header-row","ag-row"].some(c=>a.classList.contains(c))){for(let c=0;c<a.classList.length;c++){const u=a.classList[c];u!="ag-row-position-absolute"&&o.add(u)}break}a=a.parentElement}s.appendChild(n),t.appendChild(s)}};Zh([W("rowRenderer")],yl.prototype,"rowRenderer",void 0);Zh([W("ctrlsService")],yl.prototype,"ctrlsService",void 0);Zh([W("rowCssClassCalculator")],yl.prototype,"rowCssClassCalculator",void 0);Zh([Re],yl.prototype,"postConstruct",null);yl=Zh([Be("autoWidthCalculator")],yl);var ym=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Jh extends be{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyRowCtrls=[],this.containerHeight=0}postConstruct(){this.isClientSide=this.rowModel.getType()==="clientSide",this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyRowCtrls(){return this.stickyRowCtrls}checkStickyRows(){let e=0;if(!this.gridOptionsService.isGroupRowsSticky()){this.refreshNodesAndContainerHeight([],e);return}const t=[],n=this.rowRenderer.getFirstVisibleVerticalPixel(),s=o=>{var r,a,l;t.push(o);let c;if(this.isClientSide){let d=o;for(;d.expanded;)if(d.master)d=d.detailNode;else if(d.childrenAfterSort){if(d.childrenAfterSort.length===0)break;d=Ot(d.childrenAfterSort)}c=d.rowTop+d.rowHeight}else if(o.master)c=o.detailNode.rowTop+o.detailNode.rowHeight;else{const d=(r=o.childStore)===null||r===void 0?void 0:r.getStoreBounds();c=((a=d==null?void 0:d.heightPx)!==null&&a!==void 0?a:0)+((l=d==null?void 0:d.topPx)!==null&&l!==void 0?l:0)}const u=n+e+o.rowHeight;c<u?o.stickyRowTop=e+(c-u):o.stickyRowTop=e,e=0,t.forEach(d=>{const h=d.stickyRowTop+d.rowHeight;e<h&&(e=h)})};for(;;){const o=n+e,r=this.rowModel.getRowIndexAtPixel(o),a=this.rowModel.getRow(r);if(a==null||a.level<0)break;const l=[];let c=a.parent;for(;c.level>=0;)l.push(c),c=c.parent;const u=l.reverse().find(d=>t.indexOf(d)<0&&d.displayed);if(u){s(u);continue}if(a.isExpandable()&&a.expanded&&a.rowTop<o){s(a);continue}break}this.refreshNodesAndContainerHeight(t,e)}refreshStickyNode(e){const t=[];for(let n=0;n<this.stickyRowCtrls.length;n++){const s=this.stickyRowCtrls[n].getRowNode();s!==e&&t.push(s)}this.refreshNodesAndContainerHeight(t,this.containerHeight),this.checkStickyRows()}refreshNodesAndContainerHeight(e,t){const n=this.stickyRowCtrls.filter(a=>e.indexOf(a.getRowNode())===-1),s=e.filter(a=>this.stickyRowCtrls.findIndex(l=>l.getRowNode()===a)===-1),o={};n.forEach(a=>{o[a.getRowNode().id]=a,this.stickyRowCtrls=this.stickyRowCtrls.filter(l=>l!==a)});for(const a of Object.values(o))a.getRowNode().sticky=!1;this.destroyRowCtrls(o,!1);const r=s.map(a=>(a.sticky=!0,this.createRowCon(a,!1,!1)));this.stickyRowCtrls.push(...r),this.stickyRowCtrls.forEach(a=>a.setRowTop(a.getRowNode().stickyRowTop)),this.stickyRowCtrls.sort((a,l)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex),this.containerHeight!==t&&(this.containerHeight=t,this.gridBodyCtrl.setStickyTopHeight(t))}}ym([W("rowModel")],Jh.prototype,"rowModel",void 0);ym([W("rowRenderer")],Jh.prototype,"rowRenderer",void 0);ym([W("ctrlsService")],Jh.prototype,"ctrlsService",void 0);ym([Re],Jh.prototype,"postConstruct",null);var uo=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const hG=10;let es=class extends be{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1}postConstruct(){this.ctrlsService.whenReady(()=>{this.gridBodyCtrl=this.ctrlsService.getGridBodyCtrl(),this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,N.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,N.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,N.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListener("domLayout",this.onDomLayoutChanged.bind(this)),this.addManagedPropertyListener("rowClass",this.redrawRows.bind(this)),this.gridOptionsService.isGroupRowsSticky()){const e=this.rowModel.getType();(e==="clientSide"||e==="serverSide")&&(this.stickyRowFeature=this.createManagedBean(new Jh(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gridOptionsService.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gridOptionsService.is("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gridOptionsService.is("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new fG(t)}}getKeepDetailRowsCount(){const e=this.gridOptionsService.getNum("keepDetailRowsCount");return ye(e)&&e>0?e:hG}getRowCtrls(){return this.allRowCtrls}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyRowCtrls():[]}updateAllRowCtrls(){const e=Io(this.rowCtrlsByRowIndex),t=this.gridOptionsService.is("ensureDomOrder"),n=this.gridOptionsService.isDomLayout("print");(t||n)&&e.sort((r,a)=>r.getRowNode().rowIndex-a.getRowNode.rowIndex);const s=Io(this.zombieRowCtrls),o=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];this.allRowCtrls=[...e,...s,...o]}onCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,N.EVENT_CELL_FOCUSED,t=>{this.onCellFocusChanged(t)}),this.addManagedListener(this.eventService,N.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,N.EVENT_FLASH_CELLS,t=>{this.getAllCellCtrls().forEach(n=>n.onFlashCells(t))}),this.addManagedListener(this.eventService,N.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onColumnHover())}),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(t=>t.onLeftChanged())}),this.gridOptionsService.isEnableRangeSelection()&&(this.addManagedListener(this.eventService,N.EVENT_RANGE_SELECTION_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onRangeSelectionChanged())}),this.addManagedListener(this.eventService,N.EVENT_COLUMN_MOVED,()=>{this.getAllCellCtrls().forEach(t=>t.updateRangeBordersIfRangeCount())}),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PINNED,()=>{this.getAllCellCtrls().forEach(t=>t.updateRangeBordersIfRangeCount())}),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VISIBLE,()=>{this.getAllCellCtrls().forEach(t=>t.updateRangeBordersIfRangeCount())})),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,N.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.columnModel.getAllGridColumns();e&&e.forEach(t=>{const n=c=>{this.getAllCellCtrls().forEach(u=>{u.getColumn()===t&&c(u)})},s=()=>{n(c=>c.onLeftChanged())},o=()=>{n(c=>c.onWidthChanged())},r=()=>{n(c=>c.onFirstRightPinnedChanged())},a=()=>{n(c=>c.onLastLeftPinnedChanged())},l=()=>{n(c=>c.onColDefChanged())};t.addEventListener("leftChanged",s),t.addEventListener("widthChanged",o),t.addEventListener("firstRightPinnedChanged",r),t.addEventListener("lastLeftPinnedChanged",a),t.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.removeEventListener("leftChanged",s),t.removeEventListener("widthChanged",o),t.removeEventListener("firstRightPinnedChanged",r),t.removeEventListener("lastLeftPinnedChanged",a),t.removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=this.gridOptionsService.isDomLayout("print"),t=e||this.gridOptionsService.is("embedFullWidthRows"),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsForColumn(e){const t=[];return this.getAllRowCtrls().forEach(n=>{const s=n.getCellElement(e);s&&t.push(s)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,t){e.forEach(n=>{n.destroyFirstPass(),n.destroySecondPass()}),e.length=0,t&&t.forEach(n=>{const s=new no(n,this.beans,!1,!1,this.printLayout);e.push(s)})}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}getRenderedIndexesForRowNodes(e){const t=[];return $e(e)||Qt(this.rowCtrlsByRowIndex,(n,s)=>{const o=s.getRowNode();e.indexOf(o)>=0&&t.push(n)}),t}redrawRows(e){const t=e!=null&&e.length>0;if(t){const n=this.getRenderedIndexesForRowNodes(e);this.removeRowCtrls(n)}this.redrawAfterModelUpdate({recycleRows:t})}getCellToRestoreFocusToAfterRefresh(e){const t=e!=null&&e.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(t==null)return null;const s=this.gridOptionsService.getDocument().activeElement,o=this.gridOptionsService.getDomData(s,io.DOM_DATA_KEY_CELL_CTRL),r=this.gridOptionsService.getDomData(s,no.DOM_DATA_KEY_ROW_CTRL);return o||r?t:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const n=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&this.gridOptionsService.isAnimateRows(),o=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,n=this.gridOptionsService.is("suppressScrollOnNewData");t&&!n&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}let e=this.paginationProxy.getCurrentPageHeight();e===0&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,api:this.beans.gridApi,columnApi:this.beans.columnApi,context:this.beans.gridOptionsService.context,type:"mock"}))}stopEditing(e=!1){this.getAllRowCtrls().forEach(t=>{t.stopEditing(e)})}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),n=t.length;for(let s=0;s<n;s++){const o=t[s].getAllCellCtrls(),r=o.length;for(let a=0;a<r;a++)e.push(o[a])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[],t=[...this.topRowCtrls,...this.bottomRowCtrls,...e];for(const n of Object.keys(this.rowCtrlsByRowIndex))t.push(this.rowCtrlsByRowIndex[n]);return t}addRenderedRowListener(e,t,n){const s=this.rowCtrlsByRowIndex[t];s&&s.addEventListener(e,n)}flashCells(e={}){const{flashDelay:t,fadeDelay:n}=e;this.getCellCtrls(e.rowNodes,e.columns).forEach(s=>s.flashCell({flashDelay:t,fadeDelay:n}))}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(n=>{if(n.refreshShouldDestroy()){const s=n.getRowCtrl();s&&s.refreshCell(n)}else n.refreshCell(t)}),this.refreshFullWidthRows(e.rowNodes)}getCellRendererInstances(e){var t;const n=this.getCellCtrls(e.rowNodes,e.columns).map(r=>r.getCellRenderer()).filter(r=>r!=null);if(!((t=e.columns)===null||t===void 0)&&t.length)return n;const s=[],o=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(r=>{if(o&&!this.isRowInMap(r.getRowNode(),o)||!r.isFullWidth())return;const a=r.getFullWidthCellRenderer();a&&s.push(a)}),[...s,...n]}getCellEditorInstances(e){const t=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(n=>{const s=n.getCellEditor();s&&t.push(s)}),t}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(t=>{if(t.isEditing()){const n=t.getCellPosition();e.push(n)}}),e}mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(n=>{const s=n.id;n.rowPinned==="top"?t.top[s]=n:n.rowPinned==="bottom"?t.bottom[s]=n:t.normal[s]=n}),t}isRowInMap(e,t){const n=e.id,s=e.rowPinned;return s==="bottom"?t.bottom[n]!=null:s==="top"?t.top[n]!=null:t.normal[n]!=null}getCellCtrls(e,t){const n=this.mapRowNodes(e),s=[];let o;ye(t)&&(o={},t.forEach(a=>{const l=this.columnModel.getGridColumn(a);ye(l)&&(o[l.getId()]=!0)}));const r=a=>{const l=a.getRowNode();n!=null&&!this.isRowInMap(l,n)||a.getAllCellCtrls().forEach(c=>{const u=c.getColumn().getId();o&&!o[u]||s.push(c)})};return this.getAllRowCtrls().forEach(a=>r(a)),s}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}getRowsToRecycle(){const e=[];Qt(this.rowCtrlsByRowIndex,(n,s)=>{s.getRowNode().id==null&&e.push(n)}),this.removeRowCtrls(e);const t={};return Qt(this.rowCtrlsByRowIndex,(n,s)=>{const o=s.getRowNode();t[o.id]=s}),this.rowCtrlsByRowIndex={},t}removeRowCtrls(e){e.forEach(t=>{const n=this.rowCtrlsByRowIndex[t];n&&(n.destroyFirstPass(),n.destroySecondPass()),delete this.rowCtrlsByRowIndex[t]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw()}redraw(e=!0){let t;if(this.stickyRowFeature&&Qg()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0),this.getLockOnRefresh(),this.recycleRows(null,!1,e),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(e),t!=null){const n=this.getCellToRestoreFocusToAfterRefresh();t!=null&&n==null&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e){const t={};e.forEach(o=>t[o]=!0);const s=Object.keys(this.rowCtrlsByRowIndex).filter(o=>!t[o]);this.removeRowCtrls(s)}calculateIndexesToDraw(e){let t=cA(this.firstRenderedRow,this.lastRenderedRow);const n=(s,o)=>{const r=o.getRowNode().rowIndex;r!=null&&(r<this.firstRenderedRow||r>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(o)&&t.push(r)};return Qt(this.rowCtrlsByRowIndex,n),Qt(e,n),t.sort((s,o)=>s-o),t=t.filter(s=>{const o=this.paginationProxy.getRow(s);return o&&!o.sticky}),t}recycleRows(e,t=!1,n=!1){this.rowContainerHeightService.updateOffset(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows();const s=this.calculateIndexesToDraw(e);this.removeRowCompsNotToDraw(s),this.printLayout&&(t=!1),s.forEach(o=>{this.createOrUpdateRowCtrl(o,e,t,n)}),e&&(n&&!this.gridOptionsService.is("suppressAnimationFrame")&&!this.printLayout?this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){const t={type:N.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),t=this.columnModel.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const n=t.getRowNode().rowIndex;e.push(n.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw()}getFullWidthRowCtrls(e){const t=this.mapRowNodes(e);return this.getAllRowCtrls().filter(n=>{if(!n.isFullWidth())return!1;const s=n.getRowNode();return!(t!=null&&!this.isRowInMap(s,t))})}refreshFullWidthRow(e){this.refreshFullWidthRows([e])}refreshFullWidthRows(e){const t=this.getFullWidthRowCtrls(e);let n=!1;const s=[];t.forEach(o=>{if(o.refreshFullWidth())return;const a=o.getRowNode();a.sticky?this.stickyRowFeature.refreshStickyNode(a):s.push(a.rowIndex),n=!0}),s.length>0&&this.removeRowCtrls(s),n&&this.redraw(!1)}createOrUpdateRowCtrl(e,t,n,s){let o,r=this.rowCtrlsByRowIndex[e];if(r||(o=this.paginationProxy.getRow(e),ye(o)&&ye(t)&&t[o.id]&&o.alreadyRendered&&(r=t[o.id],t[o.id]=null)),!r)if(o||(o=this.paginationProxy.getRow(e)),ye(o))r=this.createRowCon(o,n,s);else return;return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,t){const n=[];Qt(e,(s,o)=>{if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);return}o.destroyFirstPass(),t?(this.zombieRowCtrls[o.getInstanceId()]=o,n.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[o.getInstanceId()]})):o.destroySecondPass()}}),t&&(n.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),Ex(n))}getRowBuffer(){let e=this.gridOptionsService.getNum("rowBuffer");return typeof e=="number"?e<0&&(yt(()=>console.warn("AG Grid: rowBuffer should not be negative"),"warn rowBuffer negative"),e=0,this.gridOptionsService.set("rowBuffer",0)):e=10,e}getRowBufferInPixels(){const e=this.getRowBuffer(),t=this.gridOptionsService.getRowHeightAsNumber();return e*t}workOutFirstAndLastRowsToRender(){let e,t;if(!this.paginationProxy.isRowsToRender())e=0,t=-1;else if(this.printLayout)e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{const l=this.getRowBufferInPixels(),c=this.ctrlsService.getGridBodyCtrl(),u=this.gridOptionsService.is("suppressRowVirtualisation");let d=!1,h,f;do{const C=this.paginationProxy.getPixelOffset(),{pageFirstPixel:m,pageLastPixel:w}=this.paginationProxy.getCurrentPagePixelRange(),E=this.rowContainerHeightService.getDivStretchOffset(),R=c.getScrollFeature().getVScrollPosition(),O=R.top,A=R.bottom;u?(h=m+E,f=w+E):(h=Math.max(O+C-l,m)+E,f=Math.min(A+C+l,w)+E),this.firstVisibleVPixel=Math.max(O+C,m)+E,d=this.ensureAllRowsInRangeHaveHeightsCalculated(h,f)}while(d);let g=this.paginationProxy.getRowIndexAtPixel(h),p=this.paginationProxy.getRowIndexAtPixel(f);const v=this.paginationProxy.getPageFirstRow(),y=this.paginationProxy.getPageLastRow();g<v&&(g=v),p>y&&(p=y),e=g,t=p}const n=this.gridOptionsService.isDomLayout("normal"),s=this.gridOptionsService.is("suppressMaxRenderedRowRestriction"),o=Math.max(this.getRowBuffer(),500);n&&!s&&t-e>o&&(t=e+o);const r=e!==this.firstRenderedRow,a=t!==this.lastRenderedRow;if(r||a){this.firstRenderedRow=e,this.lastRenderedRow=t;const l={type:N.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t};this.eventService.dispatchEvent(l)}}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:N.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const n=this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1);return n&&this.updateContainerHeights(),n}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const s=e.getRowNode(),o=this.focusService.isRowNodeFocused(s),r=e.isEditing(),a=s.detail;return o||r||a?!!this.paginationProxy.isRowPresent(s):!1}createRowCon(e,t,n){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const o=this.gridOptionsService.is("suppressAnimationFrame"),r=n&&!o&&!this.printLayout;return new no(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){const e=this.rowCtrlsByRowIndex;return Object.keys(e).map(t=>e[t].getRowNode())}getRowByPosition(e){let t;const{rowIndex:n}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[n];break;case"bottom":t=this.bottomRowCtrls[n];break;default:t=this.rowCtrlsByRowIndex[n],t||(t=this.getStickyTopRowCtrls().find(s=>s.getRowNode().rowIndex===n)||null);break}return t}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const s=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!s}};uo([W("animationFrameService")],es.prototype,"animationFrameService",void 0);uo([W("paginationProxy")],es.prototype,"paginationProxy",void 0);uo([W("columnModel")],es.prototype,"columnModel",void 0);uo([W("pinnedRowModel")],es.prototype,"pinnedRowModel",void 0);uo([W("rowModel")],es.prototype,"rowModel",void 0);uo([W("focusService")],es.prototype,"focusService",void 0);uo([W("beans")],es.prototype,"beans",void 0);uo([W("rowContainerHeightService")],es.prototype,"rowContainerHeightService",void 0);uo([W("ctrlsService")],es.prototype,"ctrlsService",void 0);uo([Re],es.prototype,"postConstruct",null);es=uo([Be("rowRenderer")],es);class fG{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.getRowNode()!=e?null:t):null}removeFromCache(e){const t=e.getRowNode().id;delete this.entriesMap[t],tn(this.entriesList,e)}getEntries(){return this.entriesList}}var sD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Kp=class extends be{formatValue(e,t,n,s,o=!0){let r=null,a;const l=e.getColDef();if(s?a=s:o&&(a=l.valueFormatter),a){const c={value:n,node:t,data:t?t.data:null,colDef:l,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};typeof a=="function"?r=a(c):r=this.expressionService.evaluate(a,c)}else if(l.refData)return l.refData[n]||"";return r==null&&Array.isArray(n)&&(r=n.join(", ")),r}};sD([W("expressionService")],Kp.prototype,"expressionService",void 0);Kp=sD([Be("valueFormatterService")],Kp);var Iw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let $d=class extends be{init(){this.setPinnedTopRowData(this.gridOptionsService.get("pinnedTopRowData")),this.setPinnedBottomRowData(this.gridOptionsService.get("pinnedBottomRowData"))}isEmpty(e){const t=e==="top"?this.pinnedTopRows:this.pinnedBottomRows;return Kn(t)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,t){const n=t==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(Kn(n))return 0;for(let s=0;s<n.length;s++){const o=n[s];if(o.rowTop+o.rowHeight-1>=e)return s}return n.length-1}setPinnedTopRowData(e){this.pinnedTopRows=this.createNodesFromData(e,!0);const t={type:N.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}setPinnedBottomRowData(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);const t={type:N.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(t)}createNodesFromData(e,t){const n=[];if(e){let s=0;e.forEach((o,r)=>{const a=new xe(this.beans);a.data=o;const l=t?xe.ID_PREFIX_TOP_PINNED:xe.ID_PREFIX_BOTTOM_PINNED;a.id=l+r,a.rowPinned=t?"top":"bottom",a.setRowTop(s),a.setRowHeight(this.gridOptionsService.getRowHeightForNode(a).height),a.setRowIndex(r),s+=a.rowHeight,n.push(a)})}return n}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){Kn(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){Kn(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||e.length===0)return 0;const t=Ot(e);return t.rowTop+t.rowHeight}};Iw([W("beans")],$d.prototype,"beans",void 0);Iw([Re],$d.prototype,"init",null);$d=Iw([Be("pinnedRowModel")],$d);var c_;(function(i){i.Applied="Applied",i.StoreNotFound="StoreNotFound",i.StoreLoading="StoreLoading",i.StoreWaitingToLoad="StoreWaitingToLoad",i.StoreLoadingFailed="StoreLoadingFailed",i.StoreWrongType="StoreWrongType",i.Cancelled="Cancelled"})(c_||(c_={}));class Mw{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,t){if(e.children)for(let n=0;n<e.children.length;n++)this.depthFirstSearchChangedPath(e.children[n],t);t(e.rowNode)}depthFirstSearchEverything(e,t,n){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],t,n):n&&t(o)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,n=!1){this.active&&!n?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,n=0;for(;!this.mapToItems[t.id];){const s={rowNode:t,children:null};this.mapToItems[t.id]=s,n++,t=t.parent}return n}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let n=e;for(;n;)this.nodeIdsToColumns[n.id]||(this.nodeIdsToColumns[n.id]={}),t.forEach(s=>this.nodeIdsToColumns[n.id][s.getId()]=!0),n=n.parent}linkPathItems(e,t){let n=e;for(let s=0;s<t;s++){const o=this.mapToItems[n.id],r=this.mapToItems[n.parent.id];r.children||(r.children=[]),r.children.push(o),n=n.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const n=this.createPathItems(e);this.linkPathItems(e,n),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const n=this.nodeIdsToColumns[e.id];return t.filter(o=>n[o.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const n=this.nodeIdsToColumns[e.id];return t.filter(o=>!n[o.getId()])}}class Cn extends be{constructor(e){super(),this.state=Cn.STATE_WAITING_TO_LOAD,this.version=0,this.id=e}getId(){return this.id}load(){this.state=Cn.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=Cn.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state=Cn.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(e,t){this.successCommon(e,t)}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){const t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(e)&&(this.state=Cn.STATE_LOADED,this.processServerResult(t))}dispatchLoadCompleted(e=!0){const t={type:Cn.EVENT_LOAD_COMPLETE,success:e,block:this};this.dispatchEvent(t)}}Cn.EVENT_LOAD_COMPLETE="loadComplete";Cn.STATE_WAITING_TO_LOAD="needsLoading";Cn.STATE_LOADING="loading";Cn.STATE_LOADED="loaded";Cn.STATE_FAILED="failed";var bm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},pG=function(i,e){return function(t,n){e(t,n,i)}},gp;let ra=gp=class extends be{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const e=this.gridOptionsService.getNum("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=ze.debounce(this.performCheckBlocksToLoad.bind(this),e))}setBeans(e){this.logger=e.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){const e=this.gridOptionsService.getNum("maxConcurrentDatasourceRequests");if(e==null)return 2;if(!(e<=0))return e}addBlock(e){this.blocks.push(e),e.addEventListener(Cn.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){ze.removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:gp.BLOCK_LOADED_EVENT}),this.activeBlockLoadsCount==0&&this.dispatchEvent({type:gp.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}const e=this.getAvailableLoadingCount(),t=this.blocks.filter(n=>n.getState()===Cn.STATE_WAITING_TO_LOAD).slice(0,e);this.registerLoads(t.length),t.forEach(n=>n.load()),this.printCacheStatus()}getBlockState(){if(this.gridOptionsService.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const e={};return this.blocks.forEach(t=>{const{id:n,state:s}=t.getBlockStateJson();e[n]=s}),e}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(e){this.activeBlockLoadsCount+=e}getAvailableLoadingCount(){return this.maxConcurrentRequests!==void 0?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};ra.BLOCK_LOADED_EVENT="blockLoaded";ra.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished";bm([W("rowModel")],ra.prototype,"rowModel",void 0);bm([Re],ra.prototype,"postConstruct",null);bm([pG(0,bn("loggerFactory"))],ra.prototype,"setBeans",null);ra=gp=bm([Be("rowNodeBlockLoader")],ra);var Lw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let zd=class extends be{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gridOptionsService.is("pagination"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,N.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationPageSizeChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPaginationPageSizeChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,t,n,s){const o=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o}isPaginateChildRows(){return this.gridOptionsService.is("groupRemoveSingleChildren")||this.gridOptionsService.is("groupRemoveLowestSingleChildren")?!0:this.gridOptionsService.is("paginateChildRows")}onModelUpdated(e){this.calculatePages();const t={type:N.EVENT_PAGINATION_CHANGED,animate:e?e.animate:!1,newData:e?e.newData:!1,newPage:e?e.newPage:!1,keepRenderedRows:e?e.keepRenderedRows:!1};this.eventService.dispatchEvent(t)}onPaginationPageSizeChanged(){this.active=this.gridOptionsService.is("pagination"),this.calculatePages();const e={type:N.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,keepRenderedRows:!0};this.eventService.dispatchEvent(e)}goToPage(e){if(!this.active||this.currentPage===e||typeof this.currentPage!="number")return;this.currentPage=e;const t={type:N.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0};this.onModelUpdated(t)}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return $e(this.topRowBounds)||$e(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){const e=this.topRowBounds?this.topRowBounds.rowTop:0,t=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:e,pageLastPixel:t}}isRowPresent(e){return this.rowModel.isRowPresent(e)?e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex:!1}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const t=this.getPageFirstRow(),n=this.getPageLastRow();for(let s=t;s<=n;s++){const o=this.getRow(s);o&&e(o)}}getType(){return this.rowModel.getType()}getRowBounds(e){const t=this.rowModel.getRowBounds(e);return t.rowIndex=e,t}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const t=this.getPageForIndex(e);this.goToPage(t)}isRowInPage(e){return this.active?this.getPageForIndex(e.rowIndex)===this.currentPage:!0}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPageSize(){this.pageSize=this.gridOptionsService.getNum("paginationPageSize"),(this.pageSize==null||this.pageSize<1)&&(this.pageSize=100)}calculatePages(){this.active?(this.setPageSize(),this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly()):this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(ye(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:N.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();const t=this.pageSize*this.currentPage;let n=this.pageSize*(this.currentPage+1)-1;if(n>e&&(n=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(t),n===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const s=this.rowModel.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),this.masterRowCount===0){this.setZeroRows();return}const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.pageSize=this.rowModel.getRowCount(),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};Lw([W("rowModel")],zd.prototype,"rowModel",void 0);Lw([Re],zd.prototype,"postConstruct",null);zd=Lw([Be("paginationProxy")],zd);var oD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Yp=class extends be{processAllCellClasses(e,t,n,s){this.processClassRules(e.cellClassRules,t,n,s),this.processStaticCellClasses(e,t,n)}processClassRules(e,t,n,s){if(e==null)return;const o=Object.keys(e),r={},a={};for(let l=0;l<o.length;l++){const c=o[l],u=e[c];let d;typeof u=="string"?d=this.expressionService.evaluate(u,t):typeof u=="function"&&(d=u(t)),c.split(" ").forEach(h=>{h==null||h.trim()==""||(d?r[h]=!0:a[h]=!0)})}s&&Object.keys(a).forEach(s),Object.keys(r).forEach(n)}getStaticCellClasses(e,t){const{cellClass:n}=e;if(!n)return[];let s;return typeof n=="function"?s=n(t):s=n,typeof s=="string"&&(s=[s]),s||[]}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(o=>{n(o)})}};oD([W("expressionService")],Yp.prototype,"expressionService",void 0);Yp=oD([Be("stylingService")],Yp);class gG extends sa{constructor(e){super(e,"ag-toggle-button")}setValue(e,t){return super.setValue(e,t),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}}class mG extends Ys{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}}class vG extends Dl{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=xs();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){document.activeElement===this.eInput&&e.preventDefault()}setMin(e){var t;const n=e instanceof Date?(t=Es(e??null,!1))!==null&&t!==void 0?t:void 0:e;return this.min===n?this:(this.min=n,Zr(this.eInput,"min",n),this)}setMax(e){var t;const n=e instanceof Date?(t=Es(e??null,!1))!==null&&t!==void 0?t:void 0:e;return this.max===n?this:(this.max=n,Zr(this.eInput,"max",n),this)}setStep(e){return this.step===e?this:(this.step=e,Zr(this.eInput,"step",e),this)}getDate(){var e;if(this.eInput.validity.valid)return(e=ro(this.getValue()))!==null&&e!==void 0?e:void 0}setDate(e,t){this.setValue(Es(e??null,!1),t)}}class CG extends Ys{constructor(e){super(e,"ag-range-field","range")}postConstruct(){super.postConstruct();const{min:e,max:t,step:n}=this.config;e!=null&&this.setMinValue(e),t!=null&&this.setMaxValue(t),this.setStep(n||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{const t=e.target.value;this.setValue(t)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,t){this.min!=null&&(e=Math.max(parseFloat(e),this.min).toString()),this.max!=null&&(e=Math.min(parseFloat(e),this.max).toString());const n=super.setValue(e,t);return this.eInput.value=e,n}}var wm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class wa extends rw{constructor(e){super(e,wa.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field")}onValueChange(e){const t=Lo.EVENT_CHANGED;return this.addManagedListener(this.eText,t,()=>{const n=parseFloat(this.eText.getValue());this.eSlider.setValue(n.toString(),!0),e(n||0)}),this.addManagedListener(this.eSlider,t,()=>{const n=this.eSlider.getValue();this.eText.setValue(n,!0),e(parseFloat(n))}),this}setSliderWidth(e){return this.eSlider.setWidth(e),this}setTextFieldWidth(e){return this.eText.setWidth(e),this}setMinValue(e){return this.eSlider.setMinValue(e),this.eText.setMin(e),this}setMaxValue(e){return this.eSlider.setMaxValue(e),this.eText.setMax(e),this}getValue(){return this.eText.getValue()}setValue(e){return this.getValue()===e?this:(this.eText.setValue(e,!0),this.eSlider.setValue(e,!0),this.dispatchEvent({type:Lo.EVENT_CHANGED}),this)}setStep(e){return this.eSlider.setStep(e),this.eText.setStep(e),this}}wa.TEMPLATE=`<div class="ag-slider">
<label ref="eLabel"></label>
<div class="ag-wrapper ag-slider-wrapper">
<ag-input-range ref="eSlider"></ag-input-range>
<ag-input-number-field ref="eText"></ag-input-number-field>
</div>
</div>`;wm([Ae("eLabel")],wa.prototype,"eLabel",void 0);wm([Ae("eSlider")],wa.prototype,"eSlider",void 0);wm([Ae("eText")],wa.prototype,"eText",void 0);wm([Re],wa.prototype,"init",null);var Sa=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class En extends Qe{constructor(e={}){super(En.getTemplate(e)),this.suppressEnabledCheckbox=!0,this.suppressOpenCloseIcons=!1;const{title:t,enabled:n,items:s,suppressEnabledCheckbox:o,suppressOpenCloseIcons:r}=e;this.title=t,this.cssIdentifier=e.cssIdentifier||"default",this.enabled=n??!0,this.items=s||[],this.alignItems=e.alignItems||"center",o!=null&&(this.suppressEnabledCheckbox=o),r!=null&&(this.suppressOpenCloseIcons=r)}static getTemplate(e){const t=e.cssIdentifier||"default",n=e.direction||"vertical";return`<div class="ag-group ag-${t}-group" role="presentation">
<div class="ag-group-title-bar ag-${t}-group-title-bar ag-unselectable" ref="eTitleBar" role="button">
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>
<span class="ag-group-title-bar-icon ag-${t}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>
<span ref="eTitle" class="ag-group-title ag-${t}-group-title"></span>
</div>
<div ref="eToolbar" class="ag-group-toolbar ag-${t}-group-toolbar">
<ag-checkbox ref="cbGroupEnabled"></ag-checkbox>
</div>
<div ref="eContainer" class="ag-group-container ag-group-container-${n} ag-${t}-group-container"></div>
</div>`}postConstruct(){if(this.items.length){const t=this.items;this.items=[],this.addItems(t)}const e=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(e("enabled","Enabled")),this.title&&this.setTitle(this.title),this.enabled&&this.setEnabled(this.enabled),this.setAlignItems(this.alignItems),this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract(),this.refreshAriaStatus(),this.refreshChildDisplay()}setupExpandContract(){this.eGroupClosedIcon.appendChild(ms("columnSelectClosed",this.gridOptionsService,null)),this.eGroupOpenedIcon.appendChild(ms("columnSelectOpen",this.gridOptionsService,null)),this.addManagedListener(this.eTitleBar,"click",()=>this.toggleGroupExpand()),this.addManagedListener(this.eTitleBar,"keydown",e=>{switch(e.key){case ge.ENTER:case ge.SPACE:e.preventDefault(),this.toggleGroupExpand();break;case ge.RIGHT:case ge.LEFT:e.preventDefault(),this.toggleGroupExpand(e.key===ge.RIGHT);break}})}refreshAriaStatus(){this.suppressOpenCloseIcons||Ks(this.eTitleBar,this.expanded)}refreshChildDisplay(){const e=!this.suppressOpenCloseIcons;mt(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),mt(this.eGroupOpenedIcon,e&&this.expanded),mt(this.eGroupClosedIcon,e&&!this.expanded)}isExpanded(){return this.expanded}setAlignItems(e){this.alignItems!==e&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=e;const t=`ag-group-item-alignment-${this.alignItems}`;return this.addCssClass(t),this}toggleGroupExpand(e){return this.suppressOpenCloseIcons?(this.expanded=!0,this.refreshChildDisplay(),mt(this.eContainer,!0),this):(e=e??!this.expanded,this.expanded===e?this:(this.expanded=e,this.refreshAriaStatus(),this.refreshChildDisplay(),mt(this.eContainer,e),this.dispatchEvent({type:this.expanded?En.EVENT_EXPANDED:En.EVENT_COLLAPSED}),this))}addItems(e){e.forEach(t=>this.addItem(t))}addItem(e){const t=this.eContainer,n=e instanceof Qe?e.getGui():e;n.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),t.appendChild(n),this.items.push(n)}hideItem(e,t){const n=this.items[t];mt(n,!e)}setTitle(e){return this.eTitle.innerText=e,this}addCssClassToTitleBar(e){this.eTitleBar.classList.add(e)}setEnabled(e,t){return this.enabled=e,this.refreshDisabledStyles(),this.toggleGroupExpand(e),t||this.cbGroupEnabled.setValue(e),this}isEnabled(){return this.enabled}onEnableChange(e){return this.cbGroupEnabled.onValueChange(t=>{this.setEnabled(t,!0),e(t)}),this}hideEnabledCheckbox(e){return this.suppressEnabledCheckbox=e,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(e){return this.suppressOpenCloseIcons=e,e&&this.toggleGroupExpand(!0),this}refreshDisabledStyles(){this.addOrRemoveCssClass("ag-disabled",!this.enabled),this.suppressEnabledCheckbox&&!this.enabled?(this.eTitleBar.classList.add("ag-disabled-group-title-bar"),this.eTitleBar.removeAttribute("tabindex")):(this.eTitleBar.classList.remove("ag-disabled-group-title-bar"),this.eTitleBar.setAttribute("tabindex","0")),this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)}}En.EVENT_EXPANDED="expanded";En.EVENT_COLLAPSED="collapsed";Sa([Ae("eTitleBar")],En.prototype,"eTitleBar",void 0);Sa([Ae("eGroupOpenedIcon")],En.prototype,"eGroupOpenedIcon",void 0);Sa([Ae("eGroupClosedIcon")],En.prototype,"eGroupClosedIcon",void 0);Sa([Ae("eToolbar")],En.prototype,"eToolbar",void 0);Sa([Ae("cbGroupEnabled")],En.prototype,"cbGroupEnabled",void 0);Sa([Ae("eTitle")],En.prototype,"eTitle",void 0);Sa([Ae("eContainer")],En.prototype,"eContainer",void 0);Sa([Re],En.prototype,"postConstruct",null);class Sm extends Qe{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const t=[this.eTopGuard,this.eBottomGuard],n={setTabIndex:s=>{t.forEach(o=>s!=null?o.setAttribute("tabindex",s):o.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new Dw({comp:n,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation}))}createTabGuard(e){const t=document.createElement("div"),n=e==="top"?Ec.TAB_GUARD_TOP:Ec.TAB_GUARD_BOTTOM;return t.classList.add(Ec.TAB_GUARD,n),Gi(t,"presentation"),t}addTabGuards(e,t){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Zn(this.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t){Rh(e)||(e=e.getGui());const{eBottomGuard:n}=this;n?n.insertAdjacentElement("beforebegin",e):super.appendChild(e,t)}}var rD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class al extends Sm{constructor(e=1){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[]}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}onTabKeyDown(e){const t=this.getParentComponent(),n=t&&t.getGui();n&&n.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case ge.UP:case ge.RIGHT:case ge.DOWN:case ge.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case ge.ESCAPE:const t=this.findTopMenu();t&&this.focusService.focusInto(t.getGui());break}}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&e.forEach(t=>{t==="separator"?this.addSeparator():typeof t=="string"?console.warn(`AG Grid: unrecognised menu item ${t}`):this.addItem(t)})}addItem(e){const t=this.createManagedBean(new sn(Object.assign(Object.assign({},e),{isAnotherSubMenuOpen:()=>this.menuItems.some(n=>n.isSubMenuOpen())})));t.setParentComponent(this),qx(t.getGui(),this.level),this.menuItems.push(t),this.appendChild(t.getGui()),this.addManagedListener(t,sn.EVENT_MENU_ITEM_SELECTED,n=>{this.dispatchEvent(n)}),this.addManagedListener(t,sn.EVENT_MENU_ITEM_ACTIVATED,n=>{this.activeMenuItem&&this.activeMenuItem!==n.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=n.menuItem})}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}addSeparator(){const e=`
<div class="ag-menu-separator" aria-hidden="true">
<div class="ag-menu-separator-part"></div>
<div class="ag-menu-separator-part"></div>
<div class="ag-menu-separator-part"></div>
<div class="ag-menu-separator-part"></div>
</div>`;this.appendChild(Ui(e))}findTopMenu(){let e=this.getParentComponent();if(!e&&this instanceof al)return this;for(;;){const t=e&&e.getParentComponent&&e.getParentComponent();if(!t||!(t instanceof al||t instanceof sn))break;e=t}return e instanceof al?e:void 0}handleNavKey(e){switch(e){case ge.UP:case ge.DOWN:const n=this.findNextItem(e===ge.UP);n&&n!==this.activeMenuItem&&n.activate();return}const t=this.gridOptionsService.is("enableRtl")?ge.RIGHT:ge.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();t&&t instanceof sn&&(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus())}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=this.menuItems.filter(o=>!o.isDisabled());if(!t.length)return;if(!this.activeMenuItem)return e?Ot(t):t[0];e&&t.reverse();let n,s=!1;for(let o=0;o<t.length;o++){const r=t[o];if(!s){r===this.activeMenuItem&&(s=!0);continue}n=r;break}return n||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}}rD([W("focusService")],al.prototype,"focusService",void 0);rD([Re],al.prototype,"postConstruct",null);var yG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class aD extends Sm{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===ge.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}}yG([Re],aD.prototype,"postConstruct",null);var lD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class sn extends Qe{constructor(e){super(),this.params=e,this.isActive=!1,this.subMenuIsOpen=!1,this.setTemplate(`<div class="${this.getClassName()}" tabindex="-1" role="treeitem"></div>`)}init(){this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu(),this.addTooltip();const e=this.getGui();this.params.disabled?(this.addCssClass(this.getClassName("disabled")),Lb(e,!0)):(this.addGuiEventListener("click",t=>this.onItemSelected(t)),this.addGuiEventListener("keydown",t=>{(t.key===ge.ENTER||t.key===ge.SPACE)&&(t.preventDefault(),this.onItemSelected(t))}),this.addGuiEventListener("mousedown",t=>{t.stopPropagation(),t.preventDefault()}),this.addGuiEventListener("mouseenter",()=>this.onMouseEnter()),this.addGuiEventListener("mouseleave",()=>this.onMouseLeave())),this.params.cssClasses&&this.params.cssClasses.forEach(t=>this.addCssClass(t))}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1){if(this.closeSubMenu(),!this.params.subMenu)return;const t=Ui('<div class="ag-menu" role="presentation"></div>');let n;if(this.params.subMenu instanceof Array){const l=jx(this.getGui()),c=isNaN(l)?1:l+1,u=this.createBean(new al(c));u.setParentComponent(this),u.addMenuItems(this.params.subMenu),t.appendChild(u.getGui()),this.addManagedListener(u,sn.EVENT_MENU_ITEM_SELECTED,d=>this.dispatchEvent(d)),u.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),n=()=>this.destroyBean(u),e&&setTimeout(()=>u.activateFirstItem(),0)}else{const{subMenu:l}=this.params,c=this.createBean(new aD(l));c.setParentComponent(this);const u=c.getGui(),d="mouseenter",h=()=>this.cancelDeactivate();u.addEventListener(d,h),n=()=>u.removeEventListener(d,h),t.appendChild(u),l.afterGuiAttached&&setTimeout(()=>l.afterGuiAttached(),0)}const s=this.getGui(),o=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:s,ePopup:t}),r=this.localeService.getLocaleTextFunc(),a=this.popupService.addPopup({modal:!0,eChild:t,positionCallback:o,anchorToElement:s,ariaLabel:r("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=!0,Ks(s,!0),this.hideSubMenu=()=>{a&&a.hideFunc(),this.subMenuIsOpen=!1,Ks(s,!1),n()}}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,Ks(this.getGui(),!1))}isSubMenuOpen(){return this.subMenuIsOpen}activate(e){this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.addCssClass(this.getClassName("active")),this.getGui().focus(),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.removeCssClass(this.getClassName("active")),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}addIcon(){if(!this.params.checked&&!this.params.icon&&this.params.isCompact)return;const e=Ui(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(gi("check",this.gridOptionsService)):this.params.icon&&(Rh(this.params.icon)?e.appendChild(this.params.icon):typeof this.params.icon=="string"?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){if(!this.params.name&&this.params.isCompact)return;const e=Ui(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addTooltip(){this.params.tooltip&&(this.tooltip=this.params.tooltip,this.gridOptionsService.is("enableBrowserTooltips")?this.getGui().setAttribute("title",this.tooltip):this.createManagedBean(new fr(this)))}getTooltipParams(){return{location:"menu",value:this.tooltip}}addShortcut(){if(!this.params.shortcut&&this.params.isCompact)return;const e=Ui(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){if(!this.params.subMenu&&this.params.isCompact)return;const e=Ui(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),t=this.getGui();if(this.params.subMenu){const n=this.gridOptionsService.is("enableRtl")?"smallLeft":"smallRight";Ks(t,!1),e.appendChild(gi(n,this.gridOptionsService))}t.appendChild(e)}onItemSelected(e){if(this.params.action?this.params.action():this.openSubMenu(e&&e.type==="keydown"),this.params.subMenu&&!this.params.action)return;const t={type:sn.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:e};this.dispatchEvent(t)}onItemActivated(){const e={type:sn.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.params.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),sn.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),sn.ACTIVATION_DELAY):this.deactivate()}getClassName(e){const t=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return e?`${t}-${e}`:t}}sn.EVENT_MENU_ITEM_SELECTED="menuItemSelected";sn.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated";sn.ACTIVATION_DELAY=80;lD([W("popupService")],sn.prototype,"popupService",void 0);lD([Re],sn.prototype,"init",null);var ef=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ao extends Qe{constructor(e){super(ao.getTemplate(e)),this.closable=!0,this.config=e}static getTemplate(e){const t=e&&e.cssIdentifier||"default";return`<div class="ag-panel ag-${t}-panel" tabindex="-1">
<div ref="eTitleBar" class="ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable">
<span ref="eTitle" class="ag-panel-title-bar-title ag-${t}-panel-title-bar-title"></span>
<div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons"></div>
</div>
<div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${t}-panel-content-wrapper"></div>
</div>`}postConstruct(){const{component:e,closable:t,hideTitleBar:n,title:s,minWidth:o=250,width:r,minHeight:a=250,height:l,centered:c,popup:u,x:d,y:h}=this.config;this.positionableFeature=new Th(this.getGui(),{minWidth:o,width:r,minHeight:a,height:l,centered:c,x:d,y:h,popup:u,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const f=this.getGui();e&&this.setBodyComponent(e),n?mt(this.eTitleBar,!1):(s&&this.setTitle(s),this.setClosable(t??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",g=>{const p=this.gridOptionsService.getDocument();if(f.contains(g.relatedTarget)||f.contains(p.activeElement)||this.eTitleBarButtons.contains(g.target)){g.preventDefault();return}const v=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");v&&v.focus()}),!(u&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new Qe(ao.CLOSE_BTN_TEMPLATE);this.getContext().createBean(t);const n=t.getGui(),s=gi("close",this.gridOptionsService);s.classList.add("ag-panel-title-bar-button-icon"),n.appendChild(s),this.addTitleBarButton(t),t.addManagedListener(n,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const n=this.eTitleBarButtons,s=n.children,o=s.length;t==null&&(t=o),t=Math.max(0,Math.min(t,o)),e.addCssClass("ag-panel-title-bar-button");const r=e.getGui();t===0?n.insertAdjacentElement("afterbegin",r):t===o?n.insertAdjacentElement("beforeend",r):s[t-1].insertAdjacentElement("afterend",r),e.setParentComponent(this)}getBodyHeight(){return Eh(this.eContentWrapper)}getBodyWidth(){return Zg(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&e.offsetParent&&this.close(),super.destroy()}}ao.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';ef([Ae("eContentWrapper")],ao.prototype,"eContentWrapper",void 0);ef([Ae("eTitleBar")],ao.prototype,"eTitleBar",void 0);ef([Ae("eTitleBarButtons")],ao.prototype,"eTitleBarButtons",void 0);ef([Ae("eTitle")],ao.prototype,"eTitle",void 0);ef([Re],ao.prototype,"postConstruct",null);var bG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class cD extends ao{constructor(e){super(Object.assign(Object.assign({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){const e=this.getGui(),{movable:t,resizable:n,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",o=>{e.contains(o.relatedTarget)||this.popupService.bringPopupToFront(e)}),t&&this.setMovable(t),s&&this.setMaximizable(s),n&&this.setResizable(n)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:n,title:s}=this.config,o=this.localeService.getLocaleTextFunc(),r=this.popupService.addPopup({modal:n,eChild:e,closeOnEsc:!0,closedCallback:this.destroy.bind(this),alwaysOnTop:t,ariaLabel:s||o("ariaLabelDialog","Dialog")});r&&(this.close=r.hideFunc)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:n,width:s,height:o}=this.lastPosition;this.setWidth(s),this.setHeight(o),this.positionableFeature.offsetElement(t,n)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){mt(this.maximizeIcon,!this.isMaximized),mt(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const n=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),n.addManagedListener(n.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(n,0),this.maximizeListeners.push(this.addManagedListener(t,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new Qe('<div class="ag-dialog-button"></span>')),t=e.getGui();return this.maximizeIcon=gi("maximize",this.gridOptionsService),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=gi("minimize",this.gridOptionsService),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}}bG([W("popupService")],cD.prototype,"popupService",void 0);var tf=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},qC,Hr;(function(i){i[i.vertical=0]="vertical",i[i.horizontal=1]="horizontal"})(Hr||(Hr={}));let wG=0,aa=qC=class extends be{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridCtrl=e.gridCtrl,this.addManagedListener(this.gridCtrl,N.EVENT_KEYBOARD_FOCUS,()=>{this.popupList.forEach(t=>t.element.classList.add(mi.AG_KEYBOARD_FOCUS))}),this.addManagedListener(this.gridCtrl,N.EVENT_MOUSE_FOCUS,()=>{this.popupList.forEach(t=>t.element.classList.remove(mi.AG_KEYBOARD_FOCUS))})})}getPopupParent(){const e=this.gridOptionsService.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const t=e.eventSource.getBoundingClientRect(),n=this.getParentRect(),s=this.keepXYWithinBounds(e.ePopup,t.top-n.top,Hr.vertical),o=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;e.ePopup.style.minWidth=`${o}px`;const a=n.right-n.left-o;let l;this.gridOptionsService.is("enableRtl")?(l=u(),l<0&&(l=c()),l>a&&(l=0)):(l=c(),l>a&&(l=u()),l<0&&(l=0)),e.ePopup.style.left=`${l}px`,e.ePopup.style.top=`${s}px`;function c(){return t.right-n.left-2}function u(){return t.left-n.left-o}}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:n,nudgeY:s,skipObserver:o}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:s,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const t=e.eventSource.getBoundingClientRect(),n=e.alignSide||"left",s=e.position||"over",o=this.getParentRect(),r=()=>{let a=t.left-o.left;n==="right"&&(a-=e.ePopup.offsetWidth-t.width);const l=s==="over"?t.top-o.top:t.top-o.top+t.height;return{x:a,y:l}};this.positionPopup({ePopup:e.ePopup,nudgeX:e.nudgeX,nudgeY:e.nudgeY,keepWithinBounds:e.keepWithinBounds,updatePosition:r,postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,e.eventSource,null,e.column,e.rowNode)})}callPostProcessPopup(e,t,n,s,o,r){const a=this.gridOptionsService.getCallback("postProcessPopup");a&&a({column:o,rowNode:r,ePopup:t,type:e,eventSource:n,mouseEvent:s})}positionPopup(e){const{ePopup:t,keepWithinBounds:n,nudgeX:s,nudgeY:o,skipObserver:r,updatePosition:a}=e,l={width:0,height:0},c=(u=!1)=>{let{x:d,y:h}=a();u&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,s&&(d+=s),o&&(h+=o),n&&(d=this.keepXYWithinBounds(t,d,Hr.horizontal),h=this.keepXYWithinBounds(t,h,Hr.vertical)),t.style.left=`${d}px`,t.style.top=`${h}px`,e.postProcessCallback&&e.postProcessCallback())};if(c(),!r){const u=this.resizeObserverService.observeResize(t,()=>c(!0));setTimeout(()=>u(),qC.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(e=>e.element)}getPopupList(){return this.popupList}getParentRect(){const e=this.gridOptionsService.getDocument();let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),zb(t)}keepXYWithinBounds(e,t,n){const s=n===Hr.vertical,o=s?"clientHeight":"clientWidth",r=s?"top":"left",a=s?"offsetHeight":"offsetWidth",l=s?"scrollTop":"scrollLeft",c=this.gridOptionsService.getDocument(),u=c.documentElement,d=this.getPopupParent(),h=d.getBoundingClientRect(),f=c.documentElement.getBoundingClientRect(),g=d===c.body,p=e[a];let y=g?(s?$b:Jg)(u)+u[l]:d[o];g&&(y-=Math.abs(f[r]-h[r]));const C=y-p;return Math.min(Math.max(t,0),Math.abs(C))}addPopup(e){const t=this.gridOptionsService.getDocument(),{eChild:n,ariaLabel:s,alwaysOnTop:o,positionCallback:r,anchorToElement:a}=e;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const l=this.popupList.findIndex(d=>d.element===n);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(n);const c=this.createPopupWrapper(n,s,!!o),u=this.addEventListenersToPopup(Object.assign(Object.assign({},e),{wrapperEl:c}));return r&&r(),this.addPopupToPopupList(n,c,u,a),{hideFunc:u}}initialisePopupPosition(e){const n=this.getPopupParent().getBoundingClientRect();ye(e.style.top)||(e.style.top=`${n.top*-1}px`),ye(e.style.left)||(e.style.left=`${n.left*-1}px`)}createPopupWrapper(e,t,n){const s=this.getPopupParent(),o=document.createElement("div"),{allThemes:r}=this.environment.getTheme();return r.length&&o.classList.add(...r),o.classList.add("ag-popup"),e.classList.add(this.gridOptionsService.is("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Gi(e,"dialog"),pa(e,t),this.focusService.isKeyboardMode()&&e.classList.add(mi.AG_KEYBOARD_FOCUS),o.appendChild(e),s.appendChild(o),n?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),o}addEventListenersToPopup(e){const t=this.gridOptionsService.getDocument(),n=this.getPopupParent(),{wrapperEl:s,eChild:o,click:r,closedCallback:a,afterGuiAttached:l,closeOnEsc:c,modal:u}=e;let d=!1;const h=v=>{if(!s.contains(t.activeElement))return;v.key===ge.ESCAPE&&p({keyboardEvent:v})},f=v=>p({mouseEvent:v}),g=v=>p({touchEvent:v}),p=(v={})=>{const{mouseEvent:y,touchEvent:C,keyboardEvent:m}=v;this.isEventFromCurrentPopup({mouseEvent:y,touchEvent:C},o)||this.isEventSameChainAsOriginalEvent({originalMouseEvent:r,mouseEvent:y,touchEvent:C})||d||(d=!0,n.removeChild(s),t.removeEventListener("keydown",h),t.removeEventListener("mousedown",f),t.removeEventListener("touchstart",g),t.removeEventListener("contextmenu",f),this.eventService.removeEventListener(N.EVENT_DRAG_STARTED,f),a&&a(y||C||m),this.removePopupFromPopupList(o))};return l&&l({hidePopup:p}),window.setTimeout(()=>{c&&t.addEventListener("keydown",h),u&&(t.addEventListener("mousedown",f),this.eventService.addEventListener(N.EVENT_DRAG_STARTED,f),t.addEventListener("touchstart",g),t.addEventListener("contextmenu",f))},0),p}addPopupToPopupList(e,t,n,s){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:wG++,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(e,s)}setPopupPositionRelatedToElement(e,t){const n=this.popupList.find(o=>o.element===e);if(!n||(n.stopAnchoringPromise&&n.stopAnchoringPromise.then(o=>o&&o()),n.stopAnchoringPromise=void 0,n.isAnchored=!1,!t))return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:n.hideFunc});return n.stopAnchoringPromise=s,n.isAnchored=!0,s}removePopupFromPopupList(e){this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:s,ePopup:o}=e,r=s.getBoundingClientRect(),a=n.top-r.top,l=n.left-r.left;let c=a,u=l;const d=o.style.top,h=parseInt(d.substring(0,d.length-1),10),f=o.style.left,g=parseInt(f.substring(0,f.length-1),10);return new vn(p=>{this.getFrameworkOverrides().setInterval(()=>{const v=t.getBoundingClientRect(),y=s.getBoundingClientRect();if(y.top==0&&y.left==0&&y.height==0&&y.width==0){e.hidePopup();return}const m=v.top-y.top;if(m!=c){const E=this.keepXYWithinBounds(o,h+a-m,Hr.vertical);o.style.top=`${E}px`}c=m;const w=v.left-y.left;if(w!=u){const E=this.keepXYWithinBounds(o,g+l-w,Hr.horizontal);o.style.left=`${E}px`}u=w},200).then(v=>{p(()=>{v!=null&&window.clearInterval(v)})})})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:n,touchEvent:s}=e,o=n||s;if(!o)return!1;const r=this.popupList.findIndex(a=>a.element===t);if(r===-1)return!1;for(let a=r;a<this.popupList.length;a++){const l=this.popupList[a];if(Bp(l.element,o))return!0}return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(e){const t=this.gridOptionsService.getDocument();for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}isEventSameChainAsOriginalEvent(e){const{originalMouseEvent:t,mouseEvent:n,touchEvent:s}=e;let o=null;if(n?o=n:s&&(o=s.touches[0]),o&&t){const r=n?n.screenX:0,a=n?n.screenY:0,l=Math.abs(t.screenX-r)<5,c=Math.abs(t.screenY-a)<5;if(l&&c)return!0}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const n=this.getWrapper(e);n&&(n.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){const t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),s=n.length,o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),r=o.length,a=this.getWrapper(e);if(!a||s<=1||!t.contains(e))return;const l=n.indexOf(a),c=a.querySelectorAll("div"),u=[];for(c.forEach(h=>{h.scrollTop!==0&&u.push([h,h.scrollTop])}),r?a.classList.contains("ag-always-on-top")?l!==s-1&&Ot(o).insertAdjacentElement("afterend",a):l!==s-r-1&&o[0].insertAdjacentElement("beforebegin",a):l!==s-1&&Ot(n).insertAdjacentElement("afterend",a);u.length;){const h=u.pop();h[0].scrollTop=h[1]}const d={type:"popupToFront",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,eWrapper:a};this.eventService.dispatchEvent(d)}};aa.WAIT_FOR_POPUP_CONTENT_RESIZE=200;tf([W("focusService")],aa.prototype,"focusService",void 0);tf([W("ctrlsService")],aa.prototype,"ctrlsService",void 0);tf([W("resizeObserverService")],aa.prototype,"resizeObserverService",void 0);tf([Re],aa.prototype,"postConstruct",null);aa=qC=tf([Be("popupService")],aa);var Fw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class nf extends Sm{constructor(e="default",t="listbox",n){super(nf.getTemplate(e)),this.cssIdentifier=e,this.ariaRole=t,this.listName=n,this.renderedRows=new Map,this.rowHeight=20}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.setAriaProperties(),this.addManagedListener(this.eventService,N.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const t=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),n=this.eContainer;Gi(n,this.ariaRole),pa(n,t)}addResizeObserver(){const e=()=>this.drawVirtualRows(),t=this.resizeObserverService.observeResize(this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){this.focusRow(e?this.model.getRowCount()-1:0)}onFocusIn(e){const t=e.target;return t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=$x(t)-1),!1}onFocusOut(e){return this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null),!1}handleKeyDown(e){switch(e.key){case ge.UP:case ge.DOWN:this.navigate(e.key===ge.UP)&&e.preventDefault();break}}onTabKeyDown(e){this.navigate(e.shiftKey)?e.preventDefault():(hr(e),this.forceFocusOutOfContainer(e.shiftKey))}navigate(e){if(this.lastFocusedRowIndex==null)return!1;const t=this.lastFocusedRowIndex+(e?-1:1);return t<0||t>=this.model.getRowCount()?!1:(this.focusRow(t),!0)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.ensureIndexVisible(e),window.setTimeout(()=>{if(!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()},10)}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,n)=>e(t.rowComponent,n))}static getTemplate(e){return`
<div class="ag-virtual-list-viewport ag-${e}-virtual-list-viewport" role="presentation">
<div class="ag-virtual-list-container ag-${e}-virtual-list-container" ref="eContainer"></div>
</div>`}getItemHeight(){return this.environment.getListItemHeight()}ensureIndexVisible(e){const t=this.model.getRowCount();if(typeof e!="number"||e<0||e>=t){console.warn("AG Grid: invalid row index for ensureIndexVisible: "+e);return}const n=e*this.rowHeight,s=n+this.rowHeight,o=this.getGui(),r=o.scrollTop,a=o.offsetHeight,l=r+a,c=r>n,u=l<s;if(c)o.scrollTop=n;else if(u){const d=s-a;o.scrollTop=d}}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,Ab(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive())return;const t=this.getGui(),n=t.scrollTop,s=n+t.offsetHeight,o=Math.floor(n/this.rowHeight),r=Math.floor(s/this.rowHeight);this.ensureRowsRendered(o,r,e)}ensureRowsRendered(e,t,n){this.renderedRows.forEach((s,o)=>{(o<e||o>t)&&o!==this.lastFocusedRowIndex&&this.removeRow(o)}),n&&this.refreshRows();for(let s=e;s<=t;s++)this.renderedRows.has(s)||s<this.model.getRowCount()&&this.insertRow(s)}insertRow(e){const t=this.model.getRow(e),n=document.createElement("div");if(n.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),Gi(n,this.ariaRole==="tree"?"treeitem":"option"),Fb(n,this.model.getRowCount()),Nb(n,e+1),n.setAttribute("tabindex","-1"),typeof this.model.isRowSelected=="function"){const o=this.model.isRowSelected(e);Mc(n,!!o),nA(n,o)}n.style.height=`${this.rowHeight}px`,n.style.top=`${this.rowHeight*e}px`;const s=this.componentCreator(t,n);s.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),n.appendChild(s.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",n):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",n):this.eContainer.appendChild(n),this.renderedRows.set(e,{rowComponent:s,eDiv:n,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,n)=>{var s,o;if(n>=e)this.removeRow(n);else{const r=this.model.getRow(n);!((o=(s=this.model).areRowsEqual)===null||o===void 0)&&o.call(s,t.value,r)?this.componentUpdater(r,t.rowComponent):this.removeRow(n)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}}Fw([W("resizeObserverService")],nf.prototype,"resizeObserverService",void 0);Fw([Ae("eContainer")],nf.prototype,"eContainer",void 0);Fw([Re],nf.prototype,"postConstruct",null);const SG=["mouseover","mouseout","mouseenter","mouseleave","mousemove"],EG=["touchstart","touchend","touchmove","touchcancel"];class uD{constructor(){this.renderingEngine="vanilla",this.isOutsideAngular=e=>Ss(SG,e)}setTimeout(e,t){window.setTimeout(e,t)}setInterval(e,t){return new vn(n=>{n(window.setInterval(e,t))})}addEventListener(e,t,n,s){const o=Ss(EG,t);e.addEventListener(t,n,{capture:!!s,passive:o})}dispatchEvent(e,t,n=!1){t()}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}}var fu=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let la=class extends be{getNextCellToFocus(e,t,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const n=e===ge.UP,s=e===ge.DOWN,o=e===ge.LEFT;let r,a;if(n||s)a=n?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=t.column;else{const l=this.columnModel.getAllDisplayedColumns(),c=this.gridOptionsService.is("enableRtl");a=t.rowIndex,r=o!==c?l[0]:Ot(l)}return{rowIndex:a,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,t){let n=t,s=!1;for(;!s;){switch(e){case ge.UP:n=this.getCellAbove(n);break;case ge.DOWN:n=this.getCellBelow(n);break;case ge.RIGHT:this.gridOptionsService.is("enableRtl")?n=this.getCellToLeft(n):n=this.getCellToRight(n);break;case ge.LEFT:this.gridOptionsService.is("enableRtl")?n=this.getCellToRight(n):n=this.getCellToLeft(n);break;default:n=null,console.warn("AG Grid: unknown key for navigation "+e);break}n?s=this.isCellGoodToFocusOn(n):s=!0}return n}isCellGoodToFocusOn(e){const t=e.column;let n;switch(e.rowPinned){case"top":n=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":n=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:n=this.rowModel.getRow(e.rowIndex);break}return n?!t.isSuppressNavigable(n):!1}getCellToLeft(e){if(!e)return null;const t=this.columnModel.getDisplayedColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.columnModel.getDisplayedColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getRowBelow(e){const t=e.rowIndex,n=e.rowPinned;if(this.isLastRowInContainer(e))switch(n){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}const s=this.rowModel.getRow(e.rowIndex),o=this.getNextStickyPosition(s);return o||{rowIndex:t+1,rowPinned:n}}getNextStickyPosition(e,t){if(!this.gridOptionsService.isGroupRowsSticky()||!e||!e.sticky)return;const n=[...this.rowRenderer.getStickyTopRowCtrls()].sort((a,l)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex),s=t?-1:1,o=n.findIndex(a=>a.getRowNode().rowIndex===e.rowIndex),r=n[o+s];if(r)return{rowIndex:r.getRowNode().rowIndex,rowPinned:null}}getCellBelow(e){if(!e)return null;const t=this.getRowBelow(e);return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}isLastRowInContainer(e){const t=e.rowPinned,n=e.rowIndex;return t==="top"?this.pinnedRowModel.getPinnedTopRowData().length-1<=n:t==="bottom"?this.pinnedRowModel.getPinnedBottomRowData().length-1<=n:this.paginationProxy.getPageLastRow()<=n}getRowAbove(e){const t=e.rowIndex,n=e.rowPinned;if(n?t===0:t===this.paginationProxy.getPageFirstRow())return n==="top"?null:n?this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null:this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const o=this.rowModel.getRow(e.rowIndex),r=this.getNextStickyPosition(o,!0);return r||{rowIndex:t-1,rowPinned:n}}getCellAbove(e){if(!e)return null;const t=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return t?{rowIndex:t.rowIndex,column:e.column,rowPinned:t.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const t=this.columnModel.getAllDisplayedColumns();let n=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=t[0];const r=this.getRowBelow(e);if($e(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;n=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:n,column:o,rowPinned:s}}getNextTabbedCellBackwards(e){const t=this.columnModel.getAllDisplayedColumns();let n=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=Ot(t);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if($e(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;n=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:n,column:o,rowPinned:s}}};fu([W("columnModel")],la.prototype,"columnModel",void 0);fu([W("rowModel")],la.prototype,"rowModel",void 0);fu([W("rowRenderer")],la.prototype,"rowRenderer",void 0);fu([W("pinnedRowModel")],la.prototype,"pinnedRowModel",void 0);fu([W("paginationProxy")],la.prototype,"paginationProxy",void 0);la=fu([Be("cellNavigationService")],la);var sf=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},_G=function(i,e){return function(t,n){e(t,n,i)}};let bl=class extends be{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}init(){this.addManagedListener(this.eventService,N.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,N.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}fireEvent(e){if(this.consuming)return;const t=this.gridOptionsService.get("alignedGrids");t&&t.forEach(n=>{if(n.api){const s=n.api.__getAlignedGridService();e(s)}})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(t=>{t.onColumnEvent(e)})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent(t=>{t.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){const t=[];return e.columns?e.columns.forEach(n=>{t.push(n)}):e.column&&t.push(e.column),t}getColumnIds(e){const t=[];return e.columns?e.columns.forEach(n=>{t.push(n.getColId())}):e.column&&t.push(e.column.getColId()),t}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case N.EVENT_COLUMN_MOVED:case N.EVENT_COLUMN_VISIBLE:case N.EVENT_COLUMN_PINNED:case N.EVENT_COLUMN_RESIZED:const t=e;this.processColumnEvent(t);break;case N.EVENT_COLUMN_GROUP_OPENED:const n=e;this.processGroupOpenedEvent(n);break;case N.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.");break}})}processGroupOpenedEvent(e){const t=e.columnGroup;let n=null;if(t){const s=t.getGroupId();n=this.columnModel.getProvidedColumnGroup(s)}t&&!n||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+t.isExpanded()),this.columnModel.setColumnGroupOpened(n,t.isExpanded(),"alignedGridChanged"))}processColumnEvent(e){var t;const n=e.column;let s=null;if(n&&(s=this.columnModel.getPrimaryColumn(n.getColId())),n&&!s)return;const o=this.getMasterColumns(e);switch(e.type){case N.EVENT_COLUMN_MOVED:{const d=e,f=e.columnApi.getColumnState().map(g=>({colId:g.colId}));this.columnModel.applyColumnState({state:f,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${d.toIndex}`)}break;case N.EVENT_COLUMN_VISIBLE:{const d=e,f=e.columnApi.getColumnState().map(g=>({colId:g.colId,hide:g.hide}));this.columnModel.applyColumnState({state:f},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${d.visible}`)}break;case N.EVENT_COLUMN_PINNED:{const d=e,f=e.columnApi.getColumnState().map(g=>({colId:g.colId,pinned:g.pinned}));this.columnModel.applyColumnState({state:f},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${d.pinned}`)}break;case N.EVENT_COLUMN_RESIZED:const c=e,u={};o.forEach(d=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${d.getActualWidth()}`),u[d.getId()]={key:d.getColId(),newWidth:d.getActualWidth()}}),(t=c.flexColumns)===null||t===void 0||t.forEach(d=>{u[d.getId()]&&delete u[d.getId()]}),this.columnModel.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}const a=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing(),l=this.gridOptionsService.get("alignedGrids");l&&l.forEach(c=>{c.api&&c.api.setAlwaysShowVerticalScroll(a)})}};sf([W("columnModel")],bl.prototype,"columnModel",void 0);sf([W("ctrlsService")],bl.prototype,"ctrlsService",void 0);sf([_G(0,bn("loggerFactory"))],bl.prototype,"setBeans",null);sf([Re],bl.prototype,"init",null);bl=sf([Be("alignedGridsService")],bl);var of=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},RG=function(i,e){return function(t,n){e(t,n,i)}};let wl=class extends be{setBeans(e){this.logger=e.create("selectionService"),this.reset()}init(){this.groupSelectsChildren=this.gridOptionsService.is("groupSelectsChildren"),this.addManagedPropertyListener("groupSelectsChildren",e=>this.groupSelectsChildren=e.currentValue),this.rowSelection=this.gridOptionsService.get("rowSelection"),this.addManagedPropertyListener("rowSelection",e=>this.rowSelection=e.currentValue),this.addManagedListener(this.eventService,N.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}isMultiselect(){return this.rowSelection==="multiple"}setNodesSelected(e){var t;if(e.nodes.length===0)return 0;const{newValue:n,clearSelection:s,suppressFinishActions:o,rangeSelect:r,event:a,source:l="api"}=e;if(e.nodes.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const c=this.groupSelectsChildren&&e.groupSelectsFiltered===!0,u=e.nodes.map(h=>h.footer?h.sibling:h);if(r){if(e.nodes.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;const h=this.getLastSelectedNode();if(h){const f=u[0];if(h!==f&&this.isMultiselect()){const p=this.selectRange(f,h,e.newValue,l);return this.setLastSelectedNode(f),p}}}let d=0;for(let h=0;h<u.length;h++){const f=u[h];c&&f.group||f.selectThisNode(n,e.event,l)&&d++,this.groupSelectsChildren&&(!((t=f.childrenAfterGroup)===null||t===void 0)&&t.length)&&(d+=this.selectChildren(f,n,c,l))}if(!o){if(n&&(s||!this.isMultiselect())&&(d+=this.clearOtherNodes(u[0],l)),d>0){this.updateGroupsFromChildrenSelections(l);const f={type:N.EVENT_SELECTION_CHANGED,source:l};this.eventService.dispatchEvent(f)}n&&this.setLastSelectedNode(u[u.length-1])}return d}selectRange(e,t,n=!0,s){const o=this.rowModel.getNodesInRangeForSelection(e,t);let r=0;o.forEach(l=>{if(l.group&&this.groupSelectsChildren||n===!1&&e===l)return;l.selectThisNode(n,void 0,s)&&r++}),this.updateGroupsFromChildrenSelections(s);const a={type:N.EVENT_SELECTION_CHANGED,source:s};return this.eventService.dispatchEvent(a),r}selectChildren(e,t,n,s){const o=n?e.childrenAfterAggFilter:e.childrenAfterGroup;return ze.missing(o)?0:this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:n,source:s,nodes:o})}setLastSelectedNode(e){this.lastSelectedNode=e}getLastSelectedNode(){return this.lastSelectedNode}getSelectedNodes(){const e=[];return Qt(this.selectedNodes,(t,n)=>{n&&e.push(n)}),e}getSelectedRows(){const e=[];return Qt(this.selectedNodes,(t,n)=>{n&&n.data&&e.push(n.data)}),e}getSelectionCount(){return Object.values(this.selectedNodes).length}filterFromSelection(e){const t={};Object.entries(this.selectedNodes).forEach(([n,s])=>{s&&e(s)&&(t[n]=s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsChildren||this.rowModel.getType()!=="clientSide")return!1;const s=this.rowModel.getRootNode();t||(t=new Mw(!0,s),t.setInactive());let o=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const a=r.calculateSelectedFromChildren();o=r.selectThisNode(a===null?!1:a,void 0,e)||o}}),o}clearOtherNodes(e,t){const n={};let s=0;return Qt(this.selectedNodes,(o,r)=>{if(r&&r.id!==e.id){const a=this.selectedNodes[r.id];s+=a.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:t}),this.groupSelectsChildren&&r.parent&&(n[r.parent.id]=r.parent)}}),Qt(n,(o,r)=>{const a=r.calculateSelectedFromChildren();r.selectThisNode(a===null?!1:a,void 0,t)}),s}onRowSelected(e){const t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes[t.id]=t:delete this.selectedNodes[t.id])}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}syncInOldRowNode(e,t){if(ye(t)&&e.id!==t.id&&t){const s=t.id;this.selectedNodes[s]==e&&(this.selectedNodes[t.id]=t)}}syncInNewRowNode(e){ye(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)}reset(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null}getBestCostNodeSelection(){if(this.rowModel.getType()!=="clientSide")return;const t=this.rowModel.getTopLevelNodes();if(t===null)return;const n=[];function s(o){for(let r=0,a=o.length;r<a;r++){const l=o[r];if(l.isSelected())n.push(l);else{const c=l;c.group&&c.children&&s(c.children)}}}return s(t),n}isEmpty(){let e=0;return Qt(this.selectedNodes,(t,n)=>{n&&e++}),e===0}deselectAllRowNodes(e){const t=l=>l.selectThisNode(!1,void 0,s),n=this.rowModel.getType()==="clientSide",{source:s,justFiltered:o,justCurrentPage:r}=e;if(r||o){if(!n){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(o,r).forEach(t)}else Qt(this.selectedNodes,(l,c)=>{c&&t(c)}),this.reset();n&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s);const a={type:N.EVENT_SELECTION_CHANGED,source:s};this.eventService.dispatchEvent(a)}getSelectAllState(e,t){let n=0,s=0;const o=r=>{this.groupSelectsChildren&&r.group||(r.isSelected()?n++:r.selectable&&s++)};return this.getNodesToSelect(e,t).forEach(o),n===0&&s===0?!1:n>0&&s>0?null:n>0}getNodesToSelect(e=!1,t=!1){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const n=[];if(t)return this.paginationProxy.forEachNodeOnPage(o=>{if(!o.group){n.push(o);return}if(!o.expanded){const r=a=>{var l;n.push(a),!((l=a.childrenAfterFilter)===null||l===void 0)&&l.length&&a.childrenAfterFilter.forEach(r)};r(o);return}this.groupSelectsChildren||n.push(o)}),n;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(o=>{n.push(o)}),n):(s.forEachNode(o=>{n.push(o)}),n)}selectAllRowNodes(e){if(this.rowModel.getType()!=="clientSide")throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:t,justFiltered:n,justCurrentPage:s}=e,o=a=>a.selectThisNode(!0,void 0,t);this.getNodesToSelect(n,s).forEach(o),this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(t);const r={type:N.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(r)}getServerSideSelectionState(){return null}setServerSideSelectionState(e){}};of([W("rowModel")],wl.prototype,"rowModel",void 0);of([W("paginationProxy")],wl.prototype,"paginationProxy",void 0);of([RG(0,bn("loggerFactory"))],wl.prototype,"setBeans",null);of([Re],wl.prototype,"init",null);wl=of([Be("selectionService")],wl);var Nw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Kd=class{sizeColumnsToFit(e){typeof e>"u"&&console.error("AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)"),this.columnModel.sizeColumnsToFit(e,"api")}setColumnGroupOpened(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")}getColumnGroup(e,t){return this.columnModel.getColumnGroup(e,t)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""}getDisplayNameForColumnGroup(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,t){this.columnModel.setColumnVisible(e,t,"api")}setColumnsVisible(e,t){this.columnModel.setColumnsVisible(e,t,"api")}setColumnPinned(e,t){this.columnModel.setColumnPinned(e,t,"api")}setColumnsPinned(e,t){this.columnModel.setColumnsPinned(e,t,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,t){this.columnModel.moveColumn(e,t,"api")}moveColumnByIndex(e,t){this.columnModel.moveColumnByIndex(e,t,"api")}moveColumns(e,t){this.columnModel.moveColumns(e,t,"api")}moveRowGroupColumn(e,t){this.columnModel.moveRowGroupColumn(e,t)}setColumnAggFunc(e,t){this.columnModel.setColumnAggFunc(e,t)}setColumnWidth(e,t,n=!0,s){this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,n,s)}setColumnWidths(e,t=!0,n){this.columnModel.setColumnWidths(e,!1,t,n)}setPivotMode(e){this.columnModel.setPivotMode(e)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.columnModel.removeValueColumn(e,"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.columnModel.addValueColumn(e,"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.columnModel.removeRowGroupColumn(e,"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.columnModel.addRowGroupColumn(e,"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.columnModel.removePivotColumn(e,"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.columnModel.addPivotColumn(e,"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,t){return this.columnModel.autoSizeColumn(e,t,"api")}autoSizeColumns(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns(e,"api")}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid(){setTimeout(ze.removeAllReferences.bind(window,this,"Column API"),100)}getAllColumns(){return vs("28.0","getAllColumns","getColumns"),this.getColumns()}getPrimaryColumns(){return vs("28.0","getPrimaryColumns","getColumns"),this.getColumns()}getSecondaryColumns(){return vs("28.0","getSecondaryColumns","getPivotResultColumns"),this.getPivotResultColumns()}setSecondaryColumns(e){vs("28.0","setSecondaryColumns","setPivotResultColumns"),this.setPivotResultColumns(e)}getSecondaryPivotColumn(e,t){return vs("28.0","getSecondaryPivotColumn","getPivotResultColumn"),this.getPivotResultColumn(e,t)}};Nw([W("columnModel")],Kd.prototype,"columnModel",void 0);Nw([Hi],Kd.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null);Kd=Nw([Be("columnApi")],Kd);var pu=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ca=class extends be{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gridOptionsService.isRowModelType("serverSide"),this.cellExpressions=this.gridOptionsService.is("enableCellExpressions"),this.isTreeData=this.gridOptionsService.is("treeData"),this.initialised=!0,this.eventService.addEventListener(N.EVENT_CELL_VALUE_CHANGED,e=>this.callColumnCellValueChangedHandler(e),this.gridOptionsService.useAsyncEvents()),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValue(e,t,n=!1,s=!1){if(this.initialised||this.init(),!t)return;const o=e.getColDef(),r=o.field,a=e.getColId(),l=t.data;let c;const u=t.groupData&&t.groupData[a]!==void 0,d=!s&&t.aggData&&t.aggData[a]!==void 0,h=this.isSsrm&&s&&!!e.getColDef().aggFunc,f=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(n&&o.filterValueGetter?c=this.executeFilterValueGetter(o.filterValueGetter,l,e,t):this.isTreeData&&d?c=t.aggData[a]:this.isTreeData&&o.valueGetter?c=this.executeValueGetter(o.valueGetter,l,e,t):this.isTreeData&&r&&l?c=bc(l,r,e.isFieldContainsDots()):u?c=t.groupData[a]:d?c=t.aggData[a]:o.valueGetter?c=this.executeValueGetter(o.valueGetter,l,e,t):f?c=bc(l,t.field,e.isFieldContainsDots()):r&&l&&!h&&(c=bc(l,r,e.isFieldContainsDots())),this.cellExpressions&&typeof c=="string"&&c.indexOf("=")===0){const g=c.substring(1);c=this.executeValueGetter(g,l,e,t)}if(c==null){const g=this.getOpenedGroup(t,e);if(g!=null)return g}return c}getOpenedGroup(e,t){if(!this.gridOptionsService.is("showOpenedGroup")||!t.getColDef().showRowGroup)return;const s=t.getColDef().showRowGroup;let o=e.parent;for(;o!=null;){if(o.rowGroupColumn&&(s===!0||s===o.rowGroupColumn.getColId()))return o.key;o=o.parent}}setValue(e,t,n,s){const o=this.columnModel.getPrimaryColumn(t);if(!e||!o)return!1;$e(e.data)&&(e.data={});const{field:r,valueSetter:a}=o.getColDef();if($e(r)&&$e(a))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(o,n))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const l={node:e,data:e.data,oldValue:this.getValue(o,e),newValue:n,colDef:o.getColDef(),column:o,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};l.newValue=n;let c;if(ye(a)?typeof a=="function"?c=a(l):c=this.expressionService.evaluate(a,l):c=this.setValueUsingField(e.data,r,n,o.isFieldContainsDots()),c===void 0&&(c=!0),!c)return!1;e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),l.newValue=this.getValue(o,e);const u={type:N.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,api:l.api,columnApi:l.columnApi,colDef:l.colDef,context:l.context,data:e.data,node:e,oldValue:l.oldValue,newValue:l.newValue,value:l.newValue,source:s};return this.eventService.dispatchEvent(u),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})}setValueUsingField(e,t,n,s){if(!t)return!1;let o=!1;if(!s)o=e[t]==n,o||(e[t]=n);else{const r=t.split(".");let a=e;for(;r.length>0&&a;){const l=r.shift();r.length===0?(o=a[l]==n,o||(a[l]=n)):a=a[l]}}return!o}executeFilterValueGetter(e,t,n,s){const o={data:t,node:s,column:n,colDef:n.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,s)};return typeof e=="function"?e(o):this.expressionService.evaluate(e,o)}executeValueGetter(e,t,n,s){const o=n.getColId(),r=this.valueCache.getValue(s,o);if(r!==void 0)return r;const a={data:t,node:s,column:n,colDef:n.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,s)};let l;return typeof e=="function"?l=e(a):l=this.expressionService.evaluate(e,a),this.valueCache.setValue(s,o,l),l}getValueCallback(e,t){const n=this.columnModel.getPrimaryColumn(t);return n?this.getValue(n,e):null}getKeyForNode(e,t){const n=this.getValue(e,t),s=e.getColDef().keyCreator;let o=n;if(s){const r={value:n,colDef:e.getColDef(),column:e,node:t,data:t.data,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o=s(r)}return typeof o=="string"||o==null||(o=String(o),o==="[object Object]"&&yt(()=>{console.warn("AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")},"getKeyForNode - warn about [object,object]")),o}};pu([W("expressionService")],ca.prototype,"expressionService",void 0);pu([W("columnModel")],ca.prototype,"columnModel",void 0);pu([W("valueCache")],ca.prototype,"valueCache",void 0);pu([W("dataTypeService")],ca.prototype,"dataTypeService",void 0);pu([Re],ca.prototype,"init",null);ca=pu([Be("valueService")],ca);var dD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},TG=function(i,e){return function(t,n){e(t,n,i)}};let qp=class extends be{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(n){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Params =",t),console.log("Exception = "+n),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const t=this.createFunctionBody(e),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=n,n}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};dD([TG(0,bn("loggerFactory"))],qp.prototype,"setBeans",null);qp=dD([Be("expressionService")],qp);var xG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let XC=class extends be{constructor(){super(...arguments),this.templateCache={},this.waitingCallbacks={}}getTemplate(e,t){const n=this.templateCache[e];if(n)return n;let s=this.waitingCallbacks[e];const o=this;if(!s){s=[],this.waitingCallbacks[e]=s;const r=new XMLHttpRequest;r.onload=function(){o.handleHttpResult(this,e)},r.open("GET",e),r.send()}return t&&s.push(t),null}handleHttpResult(e,t){if(e.status!==200||e.response===null){console.warn(`AG Grid: Unable to get template error ${e.status} - ${t}`);return}this.templateCache[t]=e.response||e.responseText;const n=this.waitingCallbacks[t];for(let s=0;s<n.length;s++){const o=n[s];o()}}};XC=xG([Be("templateService")],XC);var hD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},AG=function(i,e){return function(t,n){e(t,n,i)}};let Xp=class extends be{setBeans(e){this.logging=e.is("debug")}create(e){return new QC(e,this.isLogging.bind(this))}isLogging(){return this.logging}};hD([AG(0,bn("gridOptionsService"))],Xp.prototype,"setBeans",null);Xp=hD([Be("loggerFactory")],Xp);class QC{constructor(e,t){this.name=e,this.isLoggingFunc=t}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}}var gu=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class Nl extends be{setComp(e,t,n){this.view=e,this.eGridHostDiv=t,this.eGui=n,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:o=>o===Sn.HeaderCell||o===Sn.ToolPanel,getIconName:()=>bt.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(t),this.createManagedBean(new om(this.view)),this.addRtlSupport(),this.addManagedListener(this,N.EVENT_KEYBOARD_FOCUS,()=>{this.view.addOrRemoveKeyboardFocusClass(!0)}),this.addManagedListener(this,N.EVENT_MOUSE_FOCUS,()=>{this.view.addOrRemoveKeyboardFocusClass(!1)});const s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.registerGridCtrl(this)}isDetailGrid(){var e;const t=this.focusService.findTabbableParent(this.getGui());return((e=t==null?void 0:t.getAttribute("row-id"))===null||e===void 0?void 0:e.startsWith("detail"))||!1}showDropZones(){return Pe.__isRegistered(We.RowGroupingModule,this.context.getGridId())}showSideBar(){return Pe.__isRegistered(We.SideBarModule,this.context.getGridId())}showStatusBar(){return Pe.__isRegistered(We.StatusBarModule,this.context.getGridId())}showWatermark(){return Pe.__isRegistered(We.EnterpriseCoreModule,this.context.getGridId())}onGridSizeChanged(){const e={type:N.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(e)}addRtlSupport(){const e=this.gridOptionsService.is("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.gridOptionsService.getDocument(),n=this.view.getFocusableContainers(),o=n.findIndex(r=>r.contains(t.activeElement))+(e?-1:1);return o<=0||o>=n.length?!1:this.focusService.focusInto(n[o])}focusInnerElement(e){const t=this.view.getFocusableContainers(),n=this.columnModel.getAllDisplayedColumns();if(e){if(t.length>1)return this.focusService.focusInto(Ot(t),!0);const s=Ot(n);if(this.focusService.focusGridView(s,!0))return!0}return this.gridOptionsService.getNum("headerHeight")===0?this.focusService.focusGridView(n[0]):this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}}gu([W("focusService")],Nl.prototype,"focusService",void 0);gu([W("resizeObserverService")],Nl.prototype,"resizeObserverService",void 0);gu([W("columnModel")],Nl.prototype,"columnModel",void 0);gu([W("ctrlsService")],Nl.prototype,"ctrlsService",void 0);gu([W("mouseEventService")],Nl.prototype,"mouseEventService",void 0);gu([W("dragAndDropService")],Nl.prototype,"dragAndDropService",void 0);var rf=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class mu extends Sm{constructor(e){super(),this.eGridDiv=e}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCssClass(n),addOrRemoveKeyboardFocusClass:n=>this.addOrRemoveCssClass(mi.AG_KEYBOARD_FOCUS,n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}};this.ctrl=this.createManagedBean(new Nl);const t=this.createTemplate();this.setTemplate(t),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.ctrl.focusInnerElement(n)})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(e,t){const n=this.eRootWrapperBody.classList;n.toggle(_i.AUTO_HEIGHT,t.autoHeight),n.toggle(_i.NORMAL,t.normal),n.toggle(_i.PRINT,t.print),this.addOrRemoveCssClass(_i.AUTO_HEIGHT,t.autoHeight),this.addOrRemoveCssClass(_i.NORMAL,t.normal),this.addOrRemoveCssClass(_i.PRINT,t.print)}createTemplate(){const e=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"",t=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"",n=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"",s=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";return`<div class="ag-root-wrapper" role="presentation">
${e}
<div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">
<ag-grid-body ref="gridBody"></ag-grid-body>
${t}
</div>
${n}
<ag-pagination></ag-pagination>
${s}
</div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(t=>Er(t))}}rf([W("loggerFactory")],mu.prototype,"loggerFactory",void 0);rf([Ae("gridBody")],mu.prototype,"gridBodyComp",void 0);rf([Ae("sideBar")],mu.prototype,"sideBarComp",void 0);rf([Ae("rootWrapperBody")],mu.prototype,"eRootWrapperBody",void 0);rf([Re],mu.prototype,"postConstruct",null);var fD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},mp;let Yd=mp=class extends be{progressSort(e,t,n){const s=this.getNextSortDirection(e);this.setSortForColumn(e,s,t,n)}setSortForColumn(e,t,n,s){t!=="asc"&&t!=="desc"&&(t=null);const o=this.gridOptionsService.isColumnsSortingCoupledToGroup();let r=[e];if(o&&e.getColDef().showRowGroup){const l=this.columnModel.getSourceColumnsForGroupColumn(e),c=l==null?void 0:l.filter(u=>u.getColDef().sortable);c&&(r=[e,...c])}r.forEach(l=>l.setSort(t,s)),(n||this.gridOptionsService.is("alwaysMultiSort"))&&!this.gridOptionsService.is("suppressMultiSort")||this.clearSortBarTheseColumns(r,s),this.updateSortIndex(e),this.dispatchSortChangedEvents(s)}updateSortIndex(e){const t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),n=this.columnModel.getGroupDisplayColumnForGroup(e.getId()),s=t&&n||e,o=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(l=>l.setSortIndex(null));const r=o.filter(l=>l!==s);(s.getSort()?[...r,s]:r).forEach((l,c)=>l.setSortIndex(c))}onSortChanged(e){this.dispatchSortChangedEvents(e)}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(n=>!!n.getSort());return t&&t.length>0}dispatchSortChangedEvents(e){const t={type:N.EVENT_SORT_CHANGED,source:e};this.eventService.dispatchEvent(t)}clearSortBarTheseColumns(e,t){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(n=>{e.includes(n)||n.setSort(void 0,t)})}getNextSortDirection(e){let t;if(e.getColDef().sortingOrder?t=e.getColDef().sortingOrder:this.gridOptionsService.get("sortingOrder")?t=this.gridOptionsService.get("sortingOrder"):t=mp.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it's ${t}`),null;const n=t.indexOf(e.getSort()),s=n<0,o=n==t.length-1;let r;return s||o?r=t[0]:r=t[n+1],mp.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("AG Grid: invalid sort type "+r),null):r}getIndexedSortMap(){let e=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(r=>!!r.getSort());if(this.columnModel.isPivotMode()){const r=this.gridOptionsService.isColumnsSortingCoupledToGroup();e=e.filter(a=>{const l=!!a.getAggFunc(),c=!a.isPrimary(),u=r?this.columnModel.getGroupDisplayColumnForGroup(a.getId()):a.getColDef().showRowGroup;return l||c||u})}const t=this.columnModel.getRowGroupColumns().filter(r=>!!r.getSort()),n=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!t.length;n&&(e=[...new Set(e.map(r=>{var a;return(a=this.columnModel.getGroupDisplayColumnForGroup(r.getId()))!==null&&a!==void 0?a:r}))]);const s={};e.forEach((r,a)=>s[r.getId()]=a),e.sort((r,a)=>{const l=r.getSortIndex(),c=a.getSortIndex();if(l!=null&&c!=null)return l-c;if(l==null&&c==null){const u=s[r.getId()],d=s[a.getId()];return u>d?1:-1}else return c==null?-1:1});const o=new Map;return e.forEach((r,a)=>o.set(r,a)),n&&t.forEach(r=>{const a=this.columnModel.getGroupDisplayColumnForGroup(r.getId());o.set(r,o.get(a))}),o}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([e,t],[n,s])=>t-s).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=this.gridOptionsService.isColumnsSortingCoupledToGroup(),n=!!e.getColDef().showRowGroup;return t&&n}getDisplaySortForColumn(e){const t=this.columnModel.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!(t!=null&&t.length))return e.getSort();const s=!!e.getColDef().field?[e,...t]:t,o=s[0].getSort();return s.every(a=>a.getSort()==o)?o:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}};Yd.DEFAULT_SORTING_ORDER=["asc","desc",null];fD([W("columnModel")],Yd.prototype,"columnModel",void 0);Yd=mp=fD([Be("sortController")],Yd);var DG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ZC=class extends be{setMouseOver(e){this.selectedColumns=e;const t={type:N.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)}clearMouseOver(){this.selectedColumns=null;const e={type:N.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(e)}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};ZC=DG([Be("columnHoverService")],ZC);var kw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let qd=class extends be{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active}start(){this.active||this.gridOptionsService.is("suppressColumnMoveAnimation")||this.gridOptionsService.is("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&(this.flush(),this.active=!1)}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(){const e=this.executeNextFuncs;this.executeNextFuncs=[];const t=this.executeLaterFuncs;this.executeLaterFuncs=[],!(e.length===0&&t.length===0)&&(window.setTimeout(()=>e.forEach(n=>n()),0),window.setTimeout(()=>t.forEach(n=>n()),300))}};kw([W("ctrlsService")],qd.prototype,"ctrlsService",void 0);kw([Re],qd.prototype,"postConstruct",null);qd=kw([Be("columnAnimationService")],qd);var Vw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Xd=class extends be{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCon=e.centerRowContainerCtrl,this.addManagedListener(this.eventService,N.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.checkPageSize()})}notActive(){return!this.gridOptionsService.is("paginationAutoPageSize")||this.centerRowContainerCon==null}checkPageSize(){if(this.notActive())return;const e=this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(e>0){const t=()=>{const n=this.gridOptionsService.getRowHeightAsNumber(),s=Math.floor(e/n);this.gridOptionsService.set("paginationPageSize",s)};this.isBodyRendered?xo(()=>t(),50)():(t(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};Vw([W("ctrlsService")],Xd.prototype,"ctrlsService",void 0);Vw([Re],Xd.prototype,"postConstruct",null);Xd=Vw([Be("paginationAutoPageSizeService")],Xd);var pD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Qp=class extends be{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gridOptionsService.is("valueCache"),this.neverExpires=this.gridOptionsService.is("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,n){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=n)}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}};pD([Re],Qp.prototype,"init",null);Qp=pD([Be("valueCache")],Qp);var Em=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const OG="paste";let Hc=class extends be{init(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,N.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){e.source!==OG&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,t){if(this.gridOptionsService.is("suppressChangeDetection"))return;const n=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gridOptionsService.is("aggregateOnlyChangedColumns"),o=new Mw(s,this.clientSideRowModel.getRootNode());o.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(o),o.forEachChangedNodeDepthFirst(r=>{n.push(r)})}this.rowRenderer.refreshCells({rowNodes:n})}};Em([W("rowModel")],Hc.prototype,"rowModel",void 0);Em([W("rowRenderer")],Hc.prototype,"rowRenderer",void 0);Em([Re],Hc.prototype,"init",null);Hc=Em([Be("changeDetectionService")],Hc);var gD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Zp=class extends be{adaptFunction(e,t){const n=this.componentMetadataProvider.retrieve(e);return n&&n.functionAdapter?n.functionAdapter(t):null}adaptCellRendererFunction(e){class t{refresh(s){return!1}getGui(){return this.eGui}init(s){const o=e(s),r=typeof o;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Ui("<span>"+o+"</span>");return}if(o==null){this.eGui=Ui("<span></span>");return}this.eGui=o}}return t}doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}};gD([W("componentMetadataProvider")],Zp.prototype,"componentMetadataProvider",void 0);Zp=gD([Be("agComponentUtils")],Zp);var Gw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Qd=class extends be{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}}retrieve(e){return this.componentMetaData[e]}};Gw([W("agComponentUtils")],Qd.prototype,"agComponentUtils",void 0);Gw([Re],Qd.prototype,"postConstruct",null);Qd=Gw([Be("componentMetadataProvider")],Qd);var Hw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const PG=25,u_=10,Ov=8,IG=4,Pv=4,Iv=6,MG={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:IG*5,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:Ov*7,headerCellMinWidth:48,listItemHeight:Ov*4,rowHeight:Ov*6,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:Pv*8,headerCellMinWidth:24,listItemHeight:Pv*6,rowHeight:Pv*7,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:Iv*8,headerCellMinWidth:36,listItemHeight:Iv*4,rowHeight:Iv*7,chartMenuPanelWidth:240}},d_={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]};let Zd=class extends be{constructor(){super(...arguments),this.calculatedSizes={}}postConstruct(){var e;const t=(e=this.getTheme().el)!==null&&e!==void 0?e:this.eGridDiv;this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(t||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){const e={type:N.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(e)}getSassVariable(e){const{themeFamily:t,el:n}=this.getTheme();if(!t||t.indexOf("ag-theme")!==0)return;this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[t]||(this.calculatedSizes[t]={});const s=this.calculatedSizes[t][e];return s??(this.calculatedSizes[t][e]=this.calculateValueForSassProperty(e,t,n),this.calculatedSizes[t][e])}calculateValueForSassProperty(e,t,n){const s="ag-theme-"+(t.match("material")?"material":t.match("balham")?"balham":t.match("alpine")?"alpine":"custom"),o=MG[s][e],r=this.gridOptionsService.getDocument();if(n||(n=this.eGridDiv),!d_[e])return o;const a=d_[e],l=r.createElement("div"),c=Array.from(n.classList);l.classList.add(t,...c),l.style.position="absolute";const u=a.reduce((h,f)=>{const g=r.createElement("div");return g.style.position="static",g.classList.add(f),h.appendChild(g),g},l);let d=0;if(r.body){r.body.appendChild(l);const h=e.toLowerCase().indexOf("height")!==-1?"height":"width";d=parseInt(window.getComputedStyle(u)[h],10),r.body.removeChild(l)}return d||o}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let t=this.eGridDiv,n=null,s=[];for(;t;)if(n=e.exec(t.className),!n)t=t.parentElement||void 0;else{const r=t.className.match(e);r&&(s=r);break}if(!n)return{allThemes:s};const o=n[0];return{theme:o,el:t,themeFamily:o.replace(/-dark$/,""),allThemes:s}}getFromTheme(e,t){var n;return(n=this.getSassVariable(t))!==null&&n!==void 0?n:e}getDefaultRowHeight(){return this.getFromTheme(PG,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}setRowHeightVariable(e){const t=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),n=`${e}px`;t!=n&&this.eGridDiv.style.setProperty("--ag-line-height",n)}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return ye(e)?Math.max(e,u_):u_}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};Hw([W("eGridDiv")],Zd.prototype,"eGridDiv",void 0);Hw([Re],Zd.prototype,"postConstruct",null);Zd=Hw([Be("environment")],Zd);var _m=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},LG=function(i,e){return function(t,n){e(t,n,i)}};let Bc=class extends be{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,N.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=sA(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,n=this.getUiBodyHeight();(t!==this.scrollY||n!==this.uiBodyHeight)&&(this.scrollY=t,this.uiBodyHeight=n,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:N.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventService.dispatchEvent({type:N.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition();return t.bottom-t.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),n=e/t;return this.maxScrollY*n}};_m([W("ctrlsService")],Bc.prototype,"ctrlsService",void 0);_m([LG(0,bn("loggerFactory"))],Bc.prototype,"agWire",null);_m([Re],Bc.prototype,"postConstruct",null);Bc=_m([Be("rowContainerHeightService")],Bc);var mD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Jp=class extends be{init(){this.groupSelectsChildren=this.gridOptionsService.is("groupSelectsChildren"),this.isRowSelectableFunc=this.gridOptionsService.get("isRowSelectable")}updateSelectableAfterGrouping(e){if(this.isRowSelectableFunc){const t=n=>n.childrenAfterGroup;this.recurseDown(e.childrenAfterGroup,t)}}recurseDown(e,t){e&&e.forEach(n=>{if(!n.group)return;n.hasChildren()&&this.recurseDown(t(n),t);let s;if(this.groupSelectsChildren){const o=(t(n)||[]).find(r=>r.selectable===!0);s=ye(o)}else s=this.isRowSelectableFunc?this.isRowSelectableFunc(n):!1;n.setRowSelectable(s)})}};mD([Re],Jp.prototype,"init",null);Jp=mD([Be("selectableService")],Jp);var Fs=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class ls extends Qe{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gridOptionsService.is("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:t,btPrevious:n,btNext:s,btLast:o}=this;this.activateTabIndex([t,n,s,o]),t.insertAdjacentElement("afterbegin",gi(e?"last":"first",this.gridOptionsService)),n.insertAdjacentElement("afterbegin",gi(e?"next":"previous",this.gridOptionsService)),s.insertAdjacentElement("afterbegin",gi(e?"previous":"next",this.gridOptionsService)),o.insertAdjacentElement("afterbegin",gi(e?"first":"last",this.gridOptionsService)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.onPaginationChanged()}onPaginationChanged(){const t=this.gridOptionsService.is("pagination")&&!this.gridOptionsService.is("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,N.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:n}=e;this.addManagedListener(t,"click",n),this.addManagedListener(t,"keydown",s=>{(s.key===ge.ENTER||s.key===ge.SPACE)&&(s.preventDefault(),n())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),n=e?t+1:0;this.lbCurrent.innerHTML=this.formatNumber(n)}formatNumber(e){const t=this.gridOptionsService.getCallback("paginationNumberFormatter");if(t)return t({value:e});const n=this.localeService.getLocaleTextFunc(),s=n("thousandSeparator",","),o=n("decimalSeparator",".");return Wb(e,s,o)}getTemplate(){const e=this.localeService.getLocaleTextFunc(),t=e("page","Page"),n=e("to","to"),s=e("of","of"),o=e("firstPage","First Page"),r=e("previousPage","Previous Page"),a=e("nextPage","Next Page"),l=e("lastPage","Last Page"),c=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${c}">
<span class="ag-paging-row-summary-panel" role="status">
<span id="ag-${c}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>
<span id="ag-${c}-to">${n}</span>
<span id="ag-${c}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>
<span id="ag-${c}-of">${s}</span>
<span id="ag-${c}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>
</span>
<span class="ag-paging-page-summary-panel" role="presentation">
<div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>
<div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>
<span class="ag-paging-description" role="status">
<span id="ag-${c}-start-page">${t}</span>
<span id="ag-${c}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>
<span id="ag-${c}-of-page">${s}</span>
<span id="ag-${c}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>
</span>
<div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${a}"></div>
<div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>
</span>
</div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),n=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay(),o=t&&e===n-1;this.nextButtonDisabled=o||s,this.lastButtonDisabled=!t||s||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Lb(e,t),e.classList.toggle("ag-disabled",t)}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.getPageSize(),n=this.paginationProxy.isLastPageFound(),s=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let o,r;if(this.isZeroPagesToDisplay()?o=r=0:(o=t*e+1,r=o+t-1,n&&r>s&&(r=s)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(o),this.rowNodeBlockLoader.isLoading()){const a=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=a("pageLastRowUnknown","?")}else this.lbLastRowOnPage.innerHTML=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&t===0}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),n=e?this.paginationProxy.getMasterRowCount():null;if(n===1){const s=this.paginationProxy.getRow(0);if(s&&s.group&&!(s.groupData||s.aggData)){this.setTotalLabelsToZero();return}}if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(n);else{const s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s,this.lbRecordCount.innerHTML=s}}setTotalLabelsToZero(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0),this.lbCurrent.innerHTML=this.formatNumber(0),this.lbLastRowOnPage.innerHTML=this.formatNumber(0),this.lbTotal.innerHTML=this.formatNumber(0),this.lbRecordCount.innerHTML=this.formatNumber(0)}}Fs([W("paginationProxy")],ls.prototype,"paginationProxy",void 0);Fs([W("rowNodeBlockLoader")],ls.prototype,"rowNodeBlockLoader",void 0);Fs([Ae("btFirst")],ls.prototype,"btFirst",void 0);Fs([Ae("btPrevious")],ls.prototype,"btPrevious",void 0);Fs([Ae("btNext")],ls.prototype,"btNext",void 0);Fs([Ae("btLast")],ls.prototype,"btLast",void 0);Fs([Ae("lbRecordCount")],ls.prototype,"lbRecordCount",void 0);Fs([Ae("lbFirstRowOnPage")],ls.prototype,"lbFirstRowOnPage",void 0);Fs([Ae("lbLastRowOnPage")],ls.prototype,"lbLastRowOnPage",void 0);Fs([Ae("lbCurrent")],ls.prototype,"lbCurrent",void 0);Fs([Ae("lbTotal")],ls.prototype,"lbTotal",void 0);Fs([Re],ls.prototype,"postConstruct",null);var vu=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},dc;(function(i){i[i.Loading=0]="Loading",i[i.NoRows=1]="NoRows"})(dc||(dc={}));class Ko extends Qe{constructor(){super(Ko.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1,this.manuallyDisplayed=!1}updateLayoutClasses(e,t){const n=this.eOverlayWrapper.classList;n.toggle(_i.AUTO_HEIGHT,t.autoHeight),n.toggle(_i.NORMAL,t.normal),n.toggle(_i.PRINT,t.print)}postConstruct(){this.createManagedBean(new om(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.addManagedListener(this.eventService,N.EVENT_ROW_DATA_UPDATED,this.onRowDataUpdated.bind(this)),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.gridOptionsService.isRowModelType("clientSide")&&!this.gridOptionsService.get("rowData")&&this.showLoadingOverlay(),this.gridApi.registerOverlayWrapperComp(this)}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;t.toggle("ag-overlay-loading-wrapper",e===dc.Loading),t.toggle("ag-overlay-no-rows-wrapper",e===dc.NoRows)}showLoadingOverlay(){if(this.gridOptionsService.is("suppressLoadingOverlay"))return;const e={},n=this.userComponentFactory.getLoadingOverlayCompDetails(e).newAgStackInstance();this.showOverlay(n,dc.Loading)}showNoRowsOverlay(){if(this.gridOptionsService.is("suppressNoRowsOverlay"))return;const e={},n=this.userComponentFactory.getNoRowsOverlayCompDetails(e).newAgStackInstance();this.showOverlay(n,dc.NoRows)}showOverlay(e,t){this.inProgress||(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.inProgress=!0,e&&e.then(n=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(n.getGui()),this.activeOverlay=n,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){if(this.inProgress){this.destroyRequested=!0;return}this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),Zn(this.eOverlayWrapper))}hideOverlay(){this.manuallyDisplayed=!1,this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),t=this.gridOptionsService.is("suppressNoRowsOverlay");e&&!t?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay()}}Ko.TEMPLATE=`
<div class="ag-overlay" aria-hidden="true">
<div class="ag-overlay-panel">
<div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>
</div>
</div>`;vu([W("userComponentFactory")],Ko.prototype,"userComponentFactory",void 0);vu([W("paginationProxy")],Ko.prototype,"paginationProxy",void 0);vu([W("gridApi")],Ko.prototype,"gridApi",void 0);vu([W("columnModel")],Ko.prototype,"columnModel",void 0);vu([Ae("eOverlayWrapper")],Ko.prototype,"eOverlayWrapper",void 0);vu([Re],Ko.prototype,"postConstruct",null);var Rm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Wc=class extends be{getFirstRow(){let e=0,t;return this.pinnedRowModel.getPinnedTopRowCount()?t="top":this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(t="bottom"),t===void 0?null:{rowIndex:e,rowPinned:t}}getLastRow(){let e,t=null;const n=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return n?(t="bottom",e=n-1):this.rowModel.getRowCount()?(t=null,e=this.paginationProxy.getPageLastRow()):s&&(t="top",e=s-1),e===void 0?null:{rowIndex:e,rowPinned:t}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}before(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(ye(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}rowMax(e){let t;return e.forEach(n=>{(t===void 0||this.before(t,n))&&(t=n)}),t}rowMin(e){let t;return e.forEach(n=>{(t===void 0||this.before(n,t))&&(t=n)}),t}};Rm([W("rowModel")],Wc.prototype,"rowModel",void 0);Rm([W("pinnedRowModel")],Wc.prototype,"pinnedRowModel",void 0);Rm([W("paginationProxy")],Wc.prototype,"paginationProxy",void 0);Wc=Rm([Be("rowPositionUtils")],Wc);var FG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let JC=class extends be{createId(e){const{rowIndex:t,rowPinned:n,column:s}=e;return this.createIdFromValues({rowIndex:t,column:s,rowPinned:n})}createIdFromValues(e){const{rowIndex:t,rowPinned:n,column:s}=e;return`${t}.${n??"null"}.${s.getId()}`}equals(e,t){const n=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return n&&s&&o}};JC=FG([Be("cellPositionUtils")],JC);class Xu{constructor(e){this.cellValueChanges=e}}class Mv extends Xu{constructor(e,t,n,s){super(e),this.initialRange=t,this.finalRange=n,this.ranges=s}}class Jd{constructor(e){this.actionStack=[],this.maxStackSize=e||Jd.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}}Jd.DEFAULT_STACK_SIZE=10;var Yo=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let As=class extends be{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&this.cellPositionUtils.equals(this.activeCellEdit,t),s=this.activeRowEdit!==null&&this.rowPositionUtils.sameRow(this.activeRowEdit,t);if(!(n||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:a,column:l,oldValue:c,value:u}=e,d={rowPinned:r,rowIndex:a,columnId:l.getColId(),newValue:u,oldValue:c};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gridOptionsService.is("undoRedoCellEditing"))return;const e=this.gridOptionsService.getNum("undoRedoCellEditingLimit");e<=0||(this.undoStack=new Jd(e),this.redoStack=new Jd(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,N.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,N.EVENT_MODEL_UPDATED,t=>{t.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,N.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(()=>{this.gridBodyCtrl=this.ctrlsService.getGridBodyCtrl()}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){const t={type:N.EVENT_UNDO_STARTED,source:e};this.eventService.dispatchEvent(t);const n=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo"),s={type:N.EVENT_UNDO_ENDED,source:e,operationPerformed:n};this.eventService.dispatchEvent(s)}redo(e){const t={type:N.EVENT_REDO_STARTED,source:e};this.eventService.dispatchEvent(t);const n=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo"),s={type:N.EVENT_REDO_ENDED,source:e,operationPerformed:n};this.eventService.dispatchEvent(s)}undoRedo(e,t,n,s,o){if(!e)return!1;const r=e.pop();return!r||!r.cellValueChanges?!1:(this.processAction(r,a=>a[s],o),r instanceof Mv?this.processRange(r.ranges||[r[n]]):this.processCell(r.cellValueChanges),t.push(r),!0)}processAction(e,t,n){e.cellValueChanges.forEach(s=>{const{rowIndex:o,rowPinned:r,columnId:a}=s,l={rowIndex:o,rowPinned:r},c=this.getRowNode(l);c.displayed&&c.setDataValue(a,t(s),n)})}processRange(e){let t;this.rangeService.removeAllCellRanges(!0),e.forEach((n,s)=>{if(!n)return;const o=n.startRow,r=n.endRow;s===e.length-1&&(t={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:n.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:n.startColumn,columns:n.columns};this.rangeService.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:n,rowPinned:s}=t,o={rowIndex:n,rowPinned:s},r=this.getRowNode(o),a={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(a,!!this.rangeService)}setLastFocusedCell(e,t){const{rowIndex:n,columnId:s,rowPinned:o}=e,r=this.gridBodyCtrl.getScrollFeature(),a=this.columnModel.getGridColumn(s);if(!a)return;r.ensureIndexVisible(n),r.ensureColumnVisible(a);const l={rowIndex:n,column:a,rowPinned:o};this.focusService.setFocusedCell(Object.assign(Object.assign({},l),{forceBrowserFocus:!0})),t&&this.rangeService.setRangeToCell(l)}addRowEditingListeners(){this.addManagedListener(this.eventService,N.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,N.EVENT_ROW_EDITING_STOPPED,()=>{const e=new Xu(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,N.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,N.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const n=new Xu(this.cellValueChanges);this.pushActionsToUndoStack(n)}})}addPasteListeners(){this.addManagedListener(this.eventService,N.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,N.EVENT_PASTE_END,()=>{const e=new Xu(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,N.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,N.EVENT_FILL_END,e=>{const t=new Mv(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,N.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,N.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;this.rangeService&&this.gridOptionsService.isEnableRangeSelection()?e=new Mv(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):e=new Xu(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}};Yo([W("focusService")],As.prototype,"focusService",void 0);Yo([W("ctrlsService")],As.prototype,"ctrlsService",void 0);Yo([W("rowModel")],As.prototype,"rowModel",void 0);Yo([W("pinnedRowModel")],As.prototype,"pinnedRowModel",void 0);Yo([W("cellPositionUtils")],As.prototype,"cellPositionUtils",void 0);Yo([W("rowPositionUtils")],As.prototype,"rowPositionUtils",void 0);Yo([W("columnModel")],As.prototype,"columnModel",void 0);Yo([xt("rangeService")],As.prototype,"rangeService",void 0);Yo([Re],As.prototype,"init",null);As=Yo([Be("undoRedoService")],As);var Bw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let eh=class extends be{findHeader(e,t){let n,s,o;if(e.column instanceof Bt?(s=`getDisplayedGroup${t}`,n=this.columnModel[s](e.column)):(o=`getDisplayedCol${t}`,n=this.columnModel[o](e.column)),!n)return;let{headerRowIndex:r}=e;if(this.getHeaderRowType(r)===ji.COLUMN_GROUP){const l=n;if(l.isPadding()&&this.isAnyChildSpanningHeaderHeight(l)){const{nextFocusColumn:c,nextRow:u}=this.getColumnVisibleChild(l,r,t);c&&(n=c,r=u)}}return{column:n,headerRowIndex:r}}isAnyChildSpanningHeaderHeight(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}getColumnVisibleParent(e,t){const n=this.getHeaderRowType(t),s=n===ji.FLOATING_FILTER,o=n===ji.COLUMN;let r=s?e:e.getParent(),a=t-1;if(o&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),a--;a<0&&(r=e,a=t)}return{nextFocusColumn:r,nextRow:a}}getColumnVisibleChild(e,t,n="After"){const s=this.getHeaderRowType(t);let o=e,r=t+1;if(s===ji.COLUMN_GROUP){const a=e.getLeafColumns(),l=n==="After"?a[0]:Ot(a);if(this.isAnyChildSpanningHeaderHeight(l.getParent())){o=l;let c=l.getParent();for(;c&&c!==e;)c=c.getParent(),r++}else o=e.getDisplayedChildren()[0]}return{nextFocusColumn:o,nextRow:r}}getHeaderRowType(e){const t=this.ctrlsService.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const n=this.columnModel.getAllDisplayedColumns(),s=n[t==="start"?0:n.length-1];if(!s)return;const r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);if(r==ji.COLUMN_GROUP){const a=this.columnModel.getColumnGroupAtLevel(s,e);return{headerRowIndex:e,column:a}}return{headerRowIndex:r==null?-1:e,column:s}}};Bw([W("columnModel")],eh.prototype,"columnModel",void 0);Bw([W("ctrlsService")],eh.prototype,"ctrlsService",void 0);eh=Bw([Be("headerPositionUtils")],eh);var NG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ey=class{buildColumnDefs(e,t,n){const s=[],o={};return e.forEach(r=>{const a=this.createDefFromColumn(r,t,n);let l=!0,c=a,u=r.getOriginalParent(),d=null;for(;u;){let h=null;if(u.isPadding()){u=u.getOriginalParent();continue}const f=o[u.getGroupId()];if(f){f.children.push(c),l=!1;break}if(h=this.createDefFromGroup(u),h&&(h.children=[c],o[h.groupId]=h,c=h,u=u.getOriginalParent()),u!=null&&d===u){l=!1;break}d=u}l&&s.push(c)}),s}createDefFromGroup(e){const t=Vp(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,n){const s=Vp(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?n.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=e.isVisible()?void 0:!0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,s.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,s}};ey=NG([Be("columnDefFactory")],ey);var Ww=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let th=class{getInitialRowClasses(e){const t=[];return ye(e.extraCssClass)&&t.push(e.extraCssClass),t.push("ag-row"),t.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&t.push("ag-opacity-zero"),t.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&t.push("ag-row-pinned"),e.rowNode.isSelected()&&t.push("ag-row-selected"),e.rowNode.footer&&t.push("ag-row-footer"),t.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&t.push("ag-row-loading"),e.fullWidthRow&&t.push("ag-full-width-row"),e.expandable&&(t.push("ag-row-group"),t.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&t.push("ag-row-dragging"),kC(t,this.processClassesFromGridOptions(e.rowNode)),kC(t,this.preProcessRowClassRules(e.rowNode)),t.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&t.push("ag-row-first"),e.lastRowOnPage&&t.push("ag-row-last"),e.fullWidthRow&&(e.pinned==="left"&&t.push("ag-cell-last-left-pinned"),e.pinned==="right"&&t.push("ag-cell-first-right-pinned")),t}processClassesFromGridOptions(e){const t=[],n=r=>{typeof r=="string"?t.push(r):Array.isArray(r)&&r.forEach(a=>t.push(a))},s=this.gridOptionsService.get("rowClass");if(s){if(typeof s=="function")return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];n(s)}const o=this.gridOptionsService.getCallback("getRowClass");if(o){const r={data:e.data,node:e,rowIndex:e.rowIndex},a=o(r);n(a)}return t}preProcessRowClassRules(e){const t=[];return this.processRowClassRules(e,n=>{t.push(n)},n=>{}),t}processRowClassRules(e,t,n){const s={data:e.data,node:e,rowIndex:e.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};this.stylingService.processClassRules(this.gridOptionsService.get("rowClassRules"),s,t,n)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};Ww([W("stylingService")],th.prototype,"stylingService",void 0);Ww([W("gridOptionsService")],th.prototype,"gridOptionsService",void 0);th=Ww([Be("rowCssClassCalculator")],th);var Tm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Uc=class extends be{init(){this.isAccentedSort=this.gridOptionsService.is("accentedSort"),this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup())}doFullSort(e,t){const n=(o,r)=>({currentPos:r,rowNode:o}),s=e.map(n);return s.sort(this.compareRowNodes.bind(this,t)),s.map(o=>o.rowNode)}compareRowNodes(e,t,n){const s=t.rowNode,o=n.rowNode;for(let r=0,a=e.length;r<a;r++){const l=e[r],c=l.sort==="desc",u=this.getValue(s,l.column),d=this.getValue(o,l.column);let h;const f=this.getComparator(l,s);if(f?h=f(u,d,s,o,c):h=ze.defaultComparator(u,d,this.isAccentedSort),!isNaN(h)&&h!==0)return l.sort==="asc"?h:h*-1}return t.currentPos-n.currentPos}getComparator(e,t){const n=e.column,s=n.getColDef().comparator;if(s!=null)return s;if(!n.getColDef().showRowGroup)return;const o=!t.group&&n.getColDef().field;if(!o)return;const r=this.columnModel.getPrimaryColumn(o);if(r)return r.getColDef().comparator}getValue(e,t){var n,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(t,e,!1,!1);if(e.rowGroupColumn===t){if(this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive())){if(t.getColDef().keyCreator)return e.key;const c=(n=e.allLeafChildren)===null||n===void 0?void 0:n[0];return c?this.valueService.getValue(t,c,!1,!1):void 0}const a=this.columnModel.getGroupDisplayColumnForGroup(t.getId());return a?(s=e.groupData)===null||s===void 0?void 0:s[a.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return this.valueService.getValue(t,e,!1,!1)}};Tm([W("valueService")],Uc.prototype,"valueService",void 0);Tm([W("columnModel")],Uc.prototype,"columnModel",void 0);Tm([Re],Uc.prototype,"init",null);Uc=Tm([Be("rowNodeSorter")],Uc);var kG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},ty;let eg=ty=class extends be{constructor(){super(...arguments),this.ready=!1,this.readyCallbacks=[]}checkReady(){if(this.ready=this.gridCtrl!=null&&this.gridBodyCtrl!=null&&this.centerRowContainerCtrl!=null&&this.leftRowContainerCtrl!=null&&this.rightRowContainerCtrl!=null&&this.bottomCenterRowContainerCtrl!=null&&this.bottomLeftRowContainerCtrl!=null&&this.bottomRightRowContainerCtrl!=null&&this.topCenterRowContainerCtrl!=null&&this.topLeftRowContainerCtrl!=null&&this.topRightRowContainerCtrl!=null&&this.stickyTopCenterRowContainerCtrl!=null&&this.stickyTopLeftRowContainerCtrl!=null&&this.stickyTopRightRowContainerCtrl!=null&&this.centerHeaderRowContainerCtrl!=null&&this.leftHeaderRowContainerCtrl!=null&&this.rightHeaderRowContainerCtrl!=null&&this.fakeHScrollComp!=null&&this.fakeVScrollComp!=null&&this.gridHeaderCtrl!=null,this.ready){const e=this.createReadyParams();this.readyCallbacks.forEach(t=>t(e)),this.readyCallbacks.length=0}}whenReady(e){this.ready?e(this.createReadyParams()):this.readyCallbacks.push(e)}createReadyParams(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollComp:this.fakeHScrollComp,fakeVScrollComp:this.fakeVScrollComp,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}}registerFakeHScrollComp(e){this.fakeHScrollComp=e,this.checkReady()}registerFakeVScrollComp(e){this.fakeVScrollComp=e,this.checkReady()}registerGridHeaderCtrl(e){this.gridHeaderCtrl=e,this.checkReady()}registerCenterRowContainerCtrl(e){this.centerRowContainerCtrl=e,this.checkReady()}registerLeftRowContainerCtrl(e){this.leftRowContainerCtrl=e,this.checkReady()}registerRightRowContainerCtrl(e){this.rightRowContainerCtrl=e,this.checkReady()}registerTopCenterRowContainerCtrl(e){this.topCenterRowContainerCtrl=e,this.checkReady()}registerTopLeftRowContainerCon(e){this.topLeftRowContainerCtrl=e,this.checkReady()}registerTopRightRowContainerCtrl(e){this.topRightRowContainerCtrl=e,this.checkReady()}registerStickyTopCenterRowContainerCtrl(e){this.stickyTopCenterRowContainerCtrl=e,this.checkReady()}registerStickyTopLeftRowContainerCon(e){this.stickyTopLeftRowContainerCtrl=e,this.checkReady()}registerStickyTopRightRowContainerCtrl(e){this.stickyTopRightRowContainerCtrl=e,this.checkReady()}registerBottomCenterRowContainerCtrl(e){this.bottomCenterRowContainerCtrl=e,this.checkReady()}registerBottomLeftRowContainerCtrl(e){this.bottomLeftRowContainerCtrl=e,this.checkReady()}registerBottomRightRowContainerCtrl(e){this.bottomRightRowContainerCtrl=e,this.checkReady()}registerHeaderContainer(e,t){switch(t){case"left":this.leftHeaderRowContainerCtrl=e;break;case"right":this.rightHeaderRowContainerCtrl=e;break;default:this.centerHeaderRowContainerCtrl=e;break}this.checkReady()}registerGridBodyCtrl(e){this.gridBodyCtrl=e,this.checkReady()}registerGridCtrl(e){this.gridCtrl=e,this.checkReady()}getFakeHScrollComp(){return this.fakeHScrollComp}getFakeVScrollComp(){return this.fakeVScrollComp}getGridHeaderCtrl(){return this.gridHeaderCtrl}getGridCtrl(){return this.gridCtrl}getCenterRowContainerCtrl(){return this.centerRowContainerCtrl}getTopCenterRowContainerCtrl(){return this.topCenterRowContainerCtrl}getBottomCenterRowContainerCtrl(){return this.bottomCenterRowContainerCtrl}getStickyTopCenterRowContainerCtrl(){return this.stickyTopCenterRowContainerCtrl}getGridBodyCtrl(){return this.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]}getHeaderRowContainerCtrl(e){switch(e){case"left":return this.leftHeaderRowContainerCtrl;case"right":return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}}};eg.NAME="ctrlsService";eg=ty=kG([Be(ty.NAME)],eg);var VG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let iy=class extends be{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const t=this.registry[e];if(t!=null)return new t}};iy=VG([Be("ctrlsFactory")],iy);var af=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class kl extends Qe{constructor(e,t){super(e),this.direction=t,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,N.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Bb()||ga())}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=wc(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=["mouseenter","mousedown","touchstart"],t=["mouseleave","touchend"],n=this.getGui();e.forEach(s=>this.addManagedListener(n,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),t.forEach(s=>this.addManagedListener(n,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,N.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(this.hideTimeout!==null&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,N.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const t=this.getViewport();Ab(()=>Er(t),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}}af([Ae("eViewport")],kl.prototype,"eViewport",void 0);af([Ae("eContainer")],kl.prototype,"eContainer",void 0);af([W("scrollVisibleService")],kl.prototype,"scrollVisibleService",void 0);af([W("ctrlsService")],kl.prototype,"ctrlsService",void 0);af([W("animationFrameService")],kl.prototype,"animationFrameService",void 0);var lf=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class xr extends kl{constructor(){super(xr.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",e),this.ctrlsService.registerFakeHScrollComp(this),this.createManagedBean(new au(t=>this.eContainer.style.width=`${t}px`))}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gridOptionsService.is("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleService.isVerticalScrollShowing();let t=this.columnModel.getDisplayedColumnsRightWidth();const n=!this.enableRtl&&e,s=this.gridOptionsService.getScrollbarWidth();n&&(t+=s),_s(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=s);let o=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&e&&(o+=s),_s(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){const e=this.scrollVisibleService.isHorizontalScrollShowing(),t=this.invisibleScrollbar,n=this.gridOptionsService.is("suppressHorizontalScroll"),s=e&&this.gridOptionsService.getScrollbarWidth()||0,r=n?0:s===0&&t?16:s;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),rl(this.getGui(),r),rl(this.eViewport,r),rl(this.eContainer,r),this.setDisplayed(e,{skipAriaHidden:!0})}getScrollPosition(){return Gd(this.getViewport(),this.enableRtl)}setScrollPosition(e){Er(this.getViewport())||this.attemptSettingScrollPosition(e),Hd(this.getViewport(),e,this.enableRtl)}}xr.TEMPLATE=`<div class="ag-body-horizontal-scroll" aria-hidden="true">
<div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>
<div class="ag-body-horizontal-scroll-viewport" ref="eViewport">
<div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>
</div>
<div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>
</div>`;lf([Ae("eLeftSpacer")],xr.prototype,"eLeftSpacer",void 0);lf([Ae("eRightSpacer")],xr.prototype,"eRightSpacer",void 0);lf([W("columnModel")],xr.prototype,"columnModel",void 0);lf([W("pinnedRowModel")],xr.prototype,"pinnedRowModel",void 0);lf([Re],xr.prototype,"postConstruct",null);var Uw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ih=class extends be{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gridOptionsService.isDomLayout("print"),t=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),n=e?0:this.columnModel.getDisplayedColumnsRightWidth();t!=this.leftWidth&&(this.leftWidth=t,this.eventService.dispatchEvent({type:N.EVENT_LEFT_PINNED_WIDTH_CHANGED})),n!=this.rightWidth&&(this.rightWidth=n,this.eventService.dispatchEvent({type:N.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};Uw([W("columnModel")],ih.prototype,"columnModel",void 0);Uw([Re],ih.prototype,"postConstruct",null);ih=Uw([Be("pinnedWidthService")],ih);var xm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let jc=class extends be{constructor(){super(...arguments),this.events=[]}postConstruct(){this.rowModel.getType()=="clientSide"&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e){if(this.clientSideRowModel==null){this.eventService.dispatchEvent(e);return}this.events.push(e);const t=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(n=>this.eventService.dispatchEvent(n)),this.events=[]};this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(t)),this.dispatchExpandedDebounced()}};xm([W("animationFrameService")],jc.prototype,"animationFrameService",void 0);xm([W("rowModel")],jc.prototype,"rowModel",void 0);xm([Re],jc.prototype,"postConstruct",null);jc=xm([Be("rowNodeEventThrottle")],jc);var Ea=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},h_=function(i,e){return function(t,n){e(t,n,i)}};function GG(i){if(typeof i=="number")return i;if(typeof i=="string")return parseInt(i,10)}function f_(i){return i===!0||i==="true"}let ko=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new oo}get context(){return this.gridOptions.context}agWire(e,t){this.gridOptions.api=e,this.gridOptions.columnApi=t,this.api=e,this.columnApi=t}init(){this.gridOptionLookup=new Set([...dt.ALL_PROPERTIES,...dt.EVENT_CALLBACKS]);const e=!this.is("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandler.bind(this),e),this.getScrollbarWidth()}destroy(){this.gridOptions.api=null,this.gridOptions.columnApi=null,this.destroyed=!0}is(e){return f_(this.gridOptions[e])}get(e){return this.gridOptions[e]}getNum(e){return GG(this.gridOptions[e])}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return ye(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(n=>{const s=n;return s.api=this.api,s.columnApi=this.columnApi,s.context=this.context,e(s)})}set(e,t,n=!1,s={}){if(this.gridOptionLookup.has(e)){const o=this.gridOptions[e];if(n||o!==t){this.gridOptions[e]=t;const r=Object.assign({type:e,currentValue:t,previousValue:o},s);this.propertyEventService.dispatchEvent(r)}}}addEventListener(e,t){this.propertyEventService.addEventListener(e,t)}removeEventListener(e,t){this.propertyEventService.removeEventListener(e,t)}globalEventHandler(e,t){if(this.destroyed)return;const n=dt.getCallbackForEvent(e);typeof this.gridOptions[n]=="function"&&this.gridOptions[n](t)}getGridId(){return this.api.getGridId()}getScrollbarWidth(){if(this.scrollbarWidth==null){const t=typeof this.gridOptions.scrollbarWidth=="number"&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:aA();t!=null&&(this.scrollbarWidth=t,this.eventService.dispatchEvent({type:N.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||e==="clientSide"&&$e(this.gridOptions.rowModelType)}isDomLayout(e){var t;return((t=this.gridOptions.domLayout)!==null&&t!==void 0?t:"normal")===e}isRowSelection(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"}useAsyncEvents(){return!this.is("suppressAsyncEvents")}isGetRowHeightFunction(){return typeof this.gridOptions.getRowHeight=="function"}getRowHeightForNode(e,t=!1,n){if(n==null&&(n=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if(t)return{height:n,estimated:!0};const o={node:e,data:e.data},r=this.getCallback("getRowHeight")(o);if(this.isNumeric(r))return r===0&&yt(()=>console.warn("AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),"invalidRowHeight"),{height:Math.max(1,r),estimated:!1}}return e.detail&&this.is("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:n,estimated:!1}}getMasterDetailRowHeight(){return this.is("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||$e(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.gridOptions.rowHeight;return e&&this.isNumeric(e)?(this.environment.setRowHeightVariable(e),e):(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,t){const n=e[this.getDomDataKey()];return n?n[t]:void 0}setDomData(e,t,n){const s=this.getDomDataKey();let o=e[s];$e(o)&&(o={},e[s]=o),o[t]=n}getDocument(){let e=null;return this.gridOptions.getDocument&&ye(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&ye(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getAsyncTransactionWaitMillis(){return ye(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return this.is("ensureDomOrder")?!1:this.is("animateRows")}isGroupRowsSticky(){return!(this.is("suppressGroupRowsSticky")||this.is("paginateChildRows")||this.is("groupHideOpenParents"))}isTreeData(){return this.is("treeData")&&Pe.__assertRegistered(We.RowGroupingModule,"Tree Data",this.api.getGridId())}isMasterDetail(){return this.is("masterDetail")&&Pe.__assertRegistered(We.MasterDetailModule,"masterDetail",this.api.getGridId())}isEnableRangeSelection(){return this.is("enableRangeSelection")&&Pe.__isRegistered(We.RangeSelectionModule,this.api.getGridId())}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return this.isRowModelType("clientSide")&&!(e!=null&&e.comparator)&&!this.isTreeData()}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;if(typeof e=="function")return this.getCallback("groupAggFiltering");if(f_(e))return()=>!0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?VC("multipleColumns",this.gridOptions.groupDisplayType):this.is("groupHideOpenParents")}isGroupUseEntireRow(e){return e?!1:this.gridOptions.groupDisplayType?VC("groupRows",this.gridOptions.groupDisplayType):!1}};Ea([W("gridOptions")],ko.prototype,"gridOptions",void 0);Ea([W("eventService")],ko.prototype,"eventService",void 0);Ea([W("environment")],ko.prototype,"environment",void 0);Ea([W("eGridDiv")],ko.prototype,"eGridDiv",void 0);Ea([h_(0,bn("gridApi")),h_(1,bn("columnApi"))],ko.prototype,"agWire",null);Ea([Re],ko.prototype,"init",null);Ea([Hi],ko.prototype,"destroy",null);ko=Ea([Be("gridOptionsService")],ko);var HG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ny=class extends be{getLocaleTextFunc(){const e=this.gridOptionsService.getCallback("getLocaleText");if(e)return(n,s,o)=>e({key:n,defaultValue:s,variableValues:o});const t=this.gridOptionsService.get("localeText");return(n,s,o)=>{let r=t&&t[n];if(r&&o&&o.length){let a=0;for(;!(a>=o.length||r.indexOf("${variable}")===-1);)r=r.replace("${variable}",o[a++])}return r??s}}};ny=HG([Be("localeService")],ny);var BG=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class cf extends kl{constructor(){super(cf.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new am(this.eContainer)),this.ctrlsService.registerFakeVScrollComp(this),this.addManagedListener(this.eventService,N.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const e=this.scrollVisibleService.isVerticalScrollShowing(),t=this.invisibleScrollbar,n=e&&this.gridOptionsService.getScrollbarWidth()||0,s=n===0&&t?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",t),_s(this.getGui(),s),_s(this.eViewport,s),_s(this.eContainer,s),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const t=this.ctrlsService.getGridBodyCtrl().getBodyViewportElement();this.eViewport.scrollTop!=t.scrollTop&&(this.eViewport.scrollTop=t.scrollTop)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(e){Er(this.getViewport())||this.attemptSettingScrollPosition(e),this.getViewport().scrollTop=e}}cf.TEMPLATE=`<div class="ag-body-vertical-scroll" aria-hidden="true">
<div class="ag-body-vertical-scroll-viewport" ref="eViewport">
<div class="ag-body-vertical-scroll-container" ref="eContainer"></div>
</div>
</div>`;BG([Re],cf.prototype,"postConstruct",null);var Vl=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};const p_={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},g_=["january","february","march","april","may","june","july","august","september","october","november","december"];let pr=class extends be{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gridOptionsService.is("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gridOptionsService.is("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",()=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs("gridOptionsChanged")})}processDataTypeDefinitions(){var e;const t=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(t).forEach(([s,o])=>{this.dataTypeDefinitions[s]=Object.assign(Object.assign({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})});const n=(e=this.gridOptionsService.get("dataTypeDefinitions"))!==null&&e!==void 0?e:{};this.dataTypeMatchers={},Object.entries(n).forEach(([s,o])=>{const r=this.processDataTypeDefinition(o,n,[s],t);r&&(this.dataTypeDefinitions[s]=r,o.dataTypeMatcher&&(this.dataTypeMatchers[s]=o.dataTypeMatcher))}),this.checkObjectValueHandlers(t),["dateString","text","number","boolean","date"].forEach(s=>{const o=this.dataTypeMatchers[s];o&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=o??t[s].dataTypeMatcher})}mergeDataTypeDefinitions(e,t){const n=Object.assign(Object.assign({},e),t);return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(n.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(t.columnTypes)]),n}processDataTypeDefinition(e,t,n,s){let o;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){const a=s[r];if(!this.validateDataTypeDefinition(e,a,r))return;o=this.mergeDataTypeDefinitions(a,e)}else{if(n.includes(r)){yt(()=>console.warn('AG Grid: Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.'),"dataTypeExtendsCircularRef");return}const a=t[r];if(!this.validateDataTypeDefinition(e,a,r))return;const l=this.processDataTypeDefinition(a,t,[...n,r],s);if(!l)return;o=this.mergeDataTypeDefinitions(l,e)}return Object.assign(Object.assign({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})}validateDataTypeDefinition(e,t,n){return t?t.baseDataType!==e.baseDataType?(yt(()=>console.warn('AG Grid: The "baseDataType" property of a data type definition must match that of its parent.'),"dataTypeBaseTypesMatch"),!1):!0:(yt(()=>console.warn(`AG Grid: The data type definition ${n} does not exist.`),"dataTypeDefMissing"+n),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return t=>{var n,s;if(!((n=t.node)===null||n===void 0)&&n.group){const o=t.column.getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(t);if(e.baseDataType==="number"&&o!=="count"){if(typeof t.value=="number")return e.valueFormatter(t);if(typeof t.value=="object"){if(!t.value)return;if("toNumber"in t.value)return e.valueFormatter(Object.assign(Object.assign({},t),{value:t.value.toNumber()}));if("value"in t.value)return e.valueFormatter(Object.assign(Object.assign({},t),{value:t.value.value}))}}}return}else if(this.groupHideOpenParents&&t.column.isRowGroupActive())return typeof t.value!="string"||!((s=e.dataTypeMatcher)===null||s===void 0)&&s.call(e,t.value)?e.valueFormatter(t):void 0;return e.valueFormatter(t)}}updateColDefAndGetDataTypeDefinitionColumnType(e,t,n){let{cellDataType:s}=t;const{field:o}=t;if(s===void 0&&(s=e.cellDataType),(s==null||s===!0)&&(s=this.canInferCellDataType(e,t)?this.inferCellDataType(o,n):!1),!s){e.cellDataType=!1;return}const r=this.dataTypeDefinitions[s];if(!r){yt(()=>console.warn(`AG Grid: Missing data type definition - "${s}"`),"dataTypeMissing"+s);return}return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,n),r.columnTypes}updateColDefAndGetColumnType(e,t,n){var s,o;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,t,n),a=(o=(s=t.type)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:e.type;return e.type=a,a?this.convertColumnTypes(a):void 0}addColumnListeners(e){if(!this.isWaitingForRowData)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const n=s=>{t.add(s.key)};e.addEventListener(qe.EVENT_STATE_UPDATED,n),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(qe.EVENT_STATE_UPDATED,n))}canInferCellDataType(e,t){var n;if(this.rowModel.getType()!=="clientSide")return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(t,s))return!1;const o=t.type===null?e.type:t.type;if(o){const r=(n=this.gridOptionsService.get("columnTypes"))!==null&&n!==void 0?n:{};if(this.convertColumnTypes(o).some(l=>{const c=r[l.trim()];return c&&this.doColDefPropsPreventInference(c,s)}))return!1}return!this.doColDefPropsPreventInference(e,s)}doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([n,s])=>this.doesColDefPropPreventInference(e,t,n,s))}doesColDefPropPreventInference(e,t,n,s){if(!t[n])return!1;const o=e[n];return o===null?(t[n]=!1,!1):s===void 0?!!o:o===s}inferCellDataType(e,t){var n;if(!e)return;let s;const o=this.getInitialData();if(o){const a=e.indexOf(".")>=0&&!this.gridOptionsService.is("suppressFieldDotNotation");s=bc(o,e,a)}else this.initWaitForRowData(t);if(s==null)return;const[r]=(n=Object.entries(this.dataTypeMatchers).find(([a,l])=>l(s)))!==null&&n!==void 0?n:["object"];return r}getInitialData(){const e=this.gridOptionsService.get("rowData");if(e!=null&&e.length)return e[0];if(this.initialData)return this.initialData;{const t=this.rowModel.getRootNode().allLeafChildren;if(t!=null&&t.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions;t&&this.columnModel.queueResizeOperations();const n=this.addManagedListener(this.eventService,N.EVENT_ROW_DATA_UPDATE_STARTED,s=>{const{firstRowData:o}=s;o&&(n==null||n(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(o,t),this.columnStateUpdatesPendingInference={},t&&this.columnModel.processResizeOperations())})}processColumnsPendingInference(e,t){this.initialData=e;const n=[];this.columnStateUpdateListenerDestroyFuncs.forEach(r=>r()),this.columnStateUpdateListenerDestroyFuncs=[];const s={},o={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([r,a])=>{const l=this.columnModel.getGridColumn(r);if(!l)return;const c=l.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(l))return;const u=l.getColDef();if(t&&u.type&&u.type!==c.type){const d=this.getUpdatedColumnState(l,a);d.rowGroup&&d.rowGroupIndex==null&&(s[r]=d),d.pivot&&d.pivotIndex==null&&(o[r]=d),n.push(d)}}),t&&n.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,o)),n.length&&this.columnModel.applyColumnState({state:n},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,t){const n=this.columnModel.getColumnStateFromColDef(e);return t.forEach(s=>{delete n[s],s==="rowGroup"?delete n.rowGroupIndex:s==="pivot"&&delete n.pivotIndex}),n}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,n=e.object;this.hasObjectValueParser=t.valueParser!==n.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==n.valueFormatter}convertColumnTypes(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?console.warn("AG Grid: if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):console.warn("AG Grid: colDef.type should be of type 'string' | 'string[]'"),t}getDateStringTypeDefinition(){return this.dataTypeDefinitions.dateString}getDateParserFunction(){return this.getDateStringTypeDefinition().dateParser}getDateFormatterFunction(){return this.getDateStringTypeDefinition().dateFormatter}checkType(e,t){var n;const s=e.getColDef();if(!s.cellDataType||t==null)return!0;const o=(n=this.dataTypeDefinitions[s.cellDataType])===null||n===void 0?void 0:n.dataTypeMatcher;return o?o(t):!0}validateColDef(e){e.cellDataType==="object"&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&yt(()=>console.warn('AG Grid: Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),"dataTypeObjectValueFormatter"),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&yt(()=>console.warn('AG Grid: Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'),"dataTypeObjectValueParser"))}setColDefPropertiesForBaseDataType(e,t,n){const s=(l,c,u)=>{let d=l.getColDef().valueFormatter;return d===t.groupSafeValueFormatter&&(d=t.valueFormatter),this.valueFormatterService.formatValue(l,c,u,d)},o=Pe.__isRegistered(We.SetFilterModule,this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),a=l=>{const{filterParams:c}=e;e.filterParams=typeof c=="object"?Object.assign(Object.assign({},c),l):l};switch(e.useValueFormatterForExport=!0,e.useValueParserForImport=!0,t.baseDataType){case"number":{e.cellEditor="agNumberCellEditor",o&&a({comparator:(l,c)=>{const u=l==null?0:parseInt(l),d=c==null?0:parseInt(c);return u===d?0:u>d?1:-1}});break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===ge.SPACE,a(o?{valueFormatter:l=>ye(l.value)?r(String(l.value),l.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(l,c)=>c,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(l,c)=>c===!1,numberOfInputs:0}]});break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=l=>s(l.column,l.node,l.value),o&&a({valueFormatter:l=>{const c=s(l.column,l.node,l.value);return ye(c)?c:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(l,c)=>{if(c===1&&l!=null){const u=g_[Number(l)-1];return r(u,p_[u])}return l??r("blanks","(Blanks)")}});break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=c=>s(c.column,c.node,c.value);const l=this.getDateParserFunction();a(o?{valueFormatter:c=>{const u=s(c.column,c.node,c.value);return ye(u)?u:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:c=>{const u=l(c??void 0);return u?[String(u.getFullYear()),String(u.getMonth()+1),String(u.getDate())]:null},treeListFormatter:(c,u)=>{if(u===1&&c!=null){const d=g_[Number(c)-1];return r(d,p_[d])}return c??r("blanks","(Blanks)")}}:{comparator:(c,u)=>{const d=l(u);return u==null||d<c?-1:d>c?1:0}});break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(l,c)=>{const u=this.columnModel.getPrimaryColumn(n),d=u==null?void 0:u.getColDef();if(!u||!d)return 0;const h=l==null?"":s(u,null,l),f=c==null?"":s(u,null,c);return h===f?0:h>f?1:-1},e.keyCreator=l=>s(l.column,l.node,l.value),o?a({valueFormatter:l=>{const c=s(l.column,l.node,l.value);return ye(c)?c:r("blanks","(Blanks)")}}):e.filterValueGetter=l=>s(l.column,l.node,this.valueService.getValue(l.column,l.node));break}}}getDefaultDataTypes(){const e=n=>!!n.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:n=>n.newValue===""?null:Number(n.newValue),valueFormatter:n=>n.value==null?"":typeof n.value!="number"||isNaN(n.value)?t("invalidNumber","Invalid Number"):String(n.value),dataTypeMatcher:n=>typeof n=="number"},text:{baseDataType:"text",valueParser:n=>n.newValue===""?null:Fd(n.newValue),dataTypeMatcher:n=>typeof n=="string"},boolean:{baseDataType:"boolean",valueParser:n=>n.newValue===""?null:String(n.newValue).toLowerCase()==="true",valueFormatter:n=>n.value==null?"":String(n.value),dataTypeMatcher:n=>typeof n=="boolean"},date:{baseDataType:"date",valueParser:n=>ro(n.newValue==null?null:String(n.newValue)),valueFormatter:n=>{var s;return n.value==null?"":!(n.value instanceof Date)||isNaN(n.value.getTime())?t("invalidDate","Invalid Date"):(s=Es(n.value,!1))!==null&&s!==void 0?s:""},dataTypeMatcher:n=>n instanceof Date},dateString:{baseDataType:"dateString",dateParser:n=>{var s;return(s=ro(n))!==null&&s!==void 0?s:void 0},dateFormatter:n=>{var s;return(s=Es(n??null,!1))!==null&&s!==void 0?s:void 0},valueParser:n=>e(String(n.newValue))?n.newValue:null,valueFormatter:n=>e(String(n.value))?n.value:"",dataTypeMatcher:n=>typeof n=="string"&&e(n)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:n=>{var s;return(s=Fd(n.value))!==null&&s!==void 0?s:""}}}}};Vl([W("rowModel")],pr.prototype,"rowModel",void 0);Vl([W("columnModel")],pr.prototype,"columnModel",void 0);Vl([W("columnUtils")],pr.prototype,"columnUtils",void 0);Vl([W("valueService")],pr.prototype,"valueService",void 0);Vl([W("valueFormatterService")],pr.prototype,"valueFormatterService",void 0);Vl([Re],pr.prototype,"init",null);pr=Vl([Be("dataTypeService")],pr);var vD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let tg=class extends be{parseValue(e,t,n,s){const o=e.getColDef(),r={node:t,data:t==null?void 0:t.data,oldValue:s,newValue:n,colDef:o,column:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},a=o.valueParser;return ye(a)?typeof a=="function"?a(r):this.expressionService.evaluate(a,r):n}};vD([W("expressionService")],tg.prototype,"expressionService",void 0);tg=vD([Be("valueParserService")],tg);class WG{constructor(e,t,n){if(!t){console.error("AG Grid: no gridOptions provided to the grid");return}this.gridOptions=t,new jG().create(e,t,s=>{const o=new mu(e);s.createBean(o)},void 0,n)}destroy(){this.gridOptions&&this.gridOptions.api&&this.gridOptions.api.destroy()}}let UG=1;class jG{create(e,t,n,s,o){var r;const a=!!t.debug,l=(r=t.gridId)!==null&&r!==void 0?r:String(UG++),c=this.getRegisteredModules(o,l),u=this.createBeansList(t.rowModelType,c,l),d=this.createProvidedBeans(e,t,o);if(!u)return;const h={providedBeanInstances:d,beanClasses:u,debug:a,gridId:l},f=new QC("AG Grid",()=>t.debug),g=new QC("Context",()=>h.debug),p=new E1(h,g),v=p.getBean("beans");this.registerModuleUserComponents(v,c),this.registerStackComponents(v,c),this.registerControllers(v,c),n(p),v.ctrlsService.whenReady(()=>{this.setColumnsAndData(v),this.dispatchGridReadyEvent(v);const y=Pe.__isRegistered(We.EnterpriseCoreModule,l);f.log(`initialised successfully, enterprise = ${y}`)}),s&&s(p)}registerControllers(e,t){t.forEach(n=>{n.controllers&&n.controllers.forEach(s=>e.ctrlsFactory.register(s))})}registerStackComponents(e,t){const n=this.createAgStackComponentsList(t);e.agStackComponentsRegistry.setupComponents(n)}getRegisteredModules(e,t){const n=e?e.modules:null,s=Pe.__getRegisteredModules(t),o=[],r={},a=(l,c,u)=>{(h=>{r[h.moduleName]||(r[h.moduleName]=!0,o.push(h),Pe.__register(h,l,u))})(c),c.dependantModules&&c.dependantModules.forEach(h=>a(l,h,u))};return n&&n.forEach(l=>a(!0,l,t)),s&&s.forEach(l=>a(!Pe.__isPackageBased(),l,void 0)),o}registerModuleUserComponents(e,t){this.extractModuleEntity(t,s=>s.userComponents?s.userComponents:[]).forEach(s=>{e.userComponentRegistry.registerDefaultComponent(s.componentName,s.componentClass)})}createProvidedBeans(e,t,n){let s=n?n.frameworkOverrides:null;$e(s)&&(s=new uD);const o={gridOptions:t,eGridDiv:e,globalEventListener:n?n.globalEventListener:null,frameworkOverrides:s};return n&&n.providedBeanInstances&&Object.assign(o,n.providedBeanInstances),o}createAgStackComponentsList(e){let t=[{componentName:"AgCheckbox",componentClass:sa},{componentName:"AgRadioButton",componentClass:AA},{componentName:"AgToggleButton",componentClass:gG},{componentName:"AgInputTextField",componentClass:Dl},{componentName:"AgInputTextArea",componentClass:mG},{componentName:"AgInputNumberField",componentClass:uw},{componentName:"AgInputDateField",componentClass:vG},{componentName:"AgInputRange",componentClass:CG},{componentName:"AgSelect",componentClass:va},{componentName:"AgSlider",componentClass:wa},{componentName:"AgGridBody",componentClass:lo},{componentName:"AgHeaderRoot",componentClass:Xh},{componentName:"AgSortIndicator",componentClass:ns},{componentName:"AgPagination",componentClass:ls},{componentName:"AgOverlayWrapper",componentClass:Ko},{componentName:"AgGroupComponent",componentClass:En},{componentName:"AgPanel",componentClass:ao},{componentName:"AgDialog",componentClass:cD},{componentName:"AgRowContainer",componentClass:Ll},{componentName:"AgFakeHorizontalScroll",componentClass:xr},{componentName:"AgFakeVerticalScroll",componentClass:cf}];const n=this.extractModuleEntity(e,s=>s.agStackComponents?s.agStackComponents:[]);return t=t.concat(n),t}createBeansList(e="clientSide",t,n){const s=t.filter(c=>!c.rowModel||c.rowModel===e),o={clientSide:We.ClientSideRowModelModule,infinite:We.InfiniteRowModelModule,serverSide:We.ServerSideRowModelModule,viewport:We.ViewportRowModelModule};if(!o[e]){console.error("AG Grid: could not find row model for rowModelType = "+e);return}if(!Pe.__assertRegistered(o[e],`rowModelType = '${e}'`,n))return;const r=[Ze,Wc,JC,eh,Xd,vt,Bd,Zp,Qd,YC,oa,Bc,jd,ny,Ic,$d,Wd,HC,oo,ko,aa,wl,No,Oi,vl,zd,es,qp,Oc,XC,bl,an,Qp,ca,Xp,GC,yl,Cl,bt,Kd,mi,Vc,Zd,la,Kp,Yp,Ud,Yd,ZC,qd,Jp,kd,Hc,Gc,As,BC,ey,th,ra,Uc,eg,ih,jc,iy,pr,tg],a=this.extractModuleEntity(s,c=>c.beans?c.beans:[]);r.push(...a);const l=[];return r.forEach(c=>{l.indexOf(c)<0&&l.push(c)}),l}extractModuleEntity(e,t){return[].concat(...e.map(t))}setColumnsAndData(e){const t=e.gridOptionsService.get("columnDefs");e.columnModel.setColumnDefs(t||[],"gridInitializing"),e.rowModel.start()}dispatchGridReadyEvent(e){const t={type:N.EVENT_GRID_READY};e.eventService.dispatchEvent(t)}}class $G{wrap(e,t,n=[],s){const o=this.createWrapper(e,s);return t.forEach(r=>{this.createMethod(o,r,!0)}),n.forEach(r=>{this.createMethod(o,r,!1)}),o}unwrap(e){return e}createMethod(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))}createMethodProxy(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}}var m_;(function(i){i.InsideBase="insideBase",i.InsideEnd="insideEnd",i.Center="center",i.OutsideEnd="outsideEnd"})(m_||(m_={}));/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
* @version v30.0.5
* @link https://www.ag-grid.com/
* @license MIT
*/const Cu=typeof global>"u"?{}:global;Cu.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement;Cu.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement;Cu.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement;Cu.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement;Cu.Node=typeof Node>"u"?{}:Node;Cu.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;class jr{constructor(e,t,n,s,o,r){this.nextId=0,this.allNodesMap={},this.rootNode=e,this.gridOptionsService=t,this.eventService=n,this.columnModel=s,this.beans=r,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=jr.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[],this.postConstruct()}postConstruct(){this.suppressParentsInRowNodes=this.gridOptionsService.is("suppressParentsInRowNodes"),this.isRowMasterFunc=this.gridOptionsService.get("isRowMaster"),this.doingTreeData=this.gridOptionsService.isTreeData(),this.doingMasterDetail=this.gridOptionsService.isMasterDetail()}getCopyOfNodesMap(){return ze.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if(typeof e=="string"){console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first");return}this.dispatchRowDataUpdateStartedEvent(e);const t=this.rootNode,n=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map(s=>this.createNode(s,this.rootNode,jr.TOP_LEVEL)):(t.allLeafChildren=[],t.childrenAfterGroup=[]),n&&(n.childrenAfterFilter=t.childrenAfterFilter,n.childrenAfterGroup=t.childrenAfterGroup,n.childrenAfterAggFilter=t.childrenAfterAggFilter,n.childrenAfterSort=t.childrenAfterSort,n.childrenMapped=t.childrenMapped,n.allLeafChildren=t.allLeafChildren)}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const n={remove:[],update:[],add:[]},s=[];return this.executeRemove(e,n,s),this.executeUpdate(e,n,s),this.executeAdd(e,n),this.updateSelection(s,"rowDataChanged"),t&&ze.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),n}dispatchRowDataUpdateStartedEvent(e){const t={type:N.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:e!=null&&e.length?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const n=e.length>0;if(n&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),n){const s={type:N.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(s)}}executeAdd(e,t){var n;const{add:s,addIndex:o}=e;if(ze.missingOrEmpty(s))return;const r=s.map(a=>this.createNode(a,this.rootNode,jr.TOP_LEVEL));if(typeof o=="number"&&o>=0){const{allLeafChildren:a}=this.rootNode,l=a.length;let c=o;if(this.doingTreeData&&o>0&&l>0){for(let h=0;h<l;h++)if(((n=a[h])===null||n===void 0?void 0:n.rowIndex)==o-1){c=h+1;break}}const u=a.slice(0,c),d=a.slice(c,a.length);this.rootNode.allLeafChildren=[...u,...r,...d]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...r];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),t.add=r}executeRemove(e,t,n){const{remove:s}=e;if(ze.missingOrEmpty(s))return;const o={};s.forEach(r=>{const a=this.lookupRowNode(r);a&&(a.isSelected()&&n.push(a),a.clearRowTopAndRowIndex(),o[a.id]=!0,delete this.allNodesMap[a.id],t.remove.push(a))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(r=>!o[r.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,t,n){const{update:s}=e;ze.missingOrEmpty(s)||s.forEach(o=>{const r=this.lookupRowNode(o);r&&(r.updateData(o),!r.selectable&&r.isSelected()&&n.push(r),this.setMasterForRow(r,o,jr.TOP_LEVEL,!1),t.update.push(r))})}lookupRowNode(e){const t=this.gridOptionsService.getCallback("getRowId");let n;if(t){const s=t({data:e,level:0});if(n=this.allNodesMap[s],!n)return console.error(`AG Grid: could not find row id=${s}, data item was not found for this id`),null}else if(n=this.rootNode.allLeafChildren.find(s=>s.data===e),!n)return console.error("AG Grid: could not find data item as object was not found",e),console.error("Consider using getRowId to help the Grid find matching row data"),null;return n||null}createNode(e,t,n){const s=new xe(this.beans);return s.group=!1,this.setMasterForRow(s,e,n,!0),t&&!this.suppressParentsInRowNodes&&(s.parent=t),s.level=n,s.setDataAndId(e,this.nextId.toString()),this.allNodesMap[s.id]&&console.warn(`AG Grid: duplicate node id '${s.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[s.id]=s,this.nextId++,s}setMasterForRow(e,t,n,s){if(this.doingTreeData)e.setMaster(!1),s&&(e.expanded=!1);else if(this.doingMasterDetail?this.isRowMasterFunc?e.setMaster(this.isRowMasterFunc(t)):e.setMaster(!0):e.setMaster(!1),s){const o=this.columnModel.getRowGroupColumns(),r=o?o.length:0,a=n+r;e.expanded=e.master?this.isExpanded(a):!1}}isExpanded(e){const t=this.gridOptionsService.getNum("groupDefaultExpanded");return t===-1?!0:e<t}}jr.TOP_LEVEL=0;jr.ROOT_NODE_ID="ROOT_NODE_ID";var Vn=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},yo;(function(i){i[i.Normal=0]="Normal",i[i.AfterFilter=1]="AfterFilter",i[i.AfterFilterAndSort=2]="AfterFilterAndSort",i[i.PivotNodes=3]="PivotNodes"})(yo||(yo={}));let ln=class extends be{constructor(){super(...arguments),this.onRowHeightChanged_debounced=ze.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[]}init(){const e=this.refreshModel.bind(this,{step:_t.EVERYTHING}),t=!this.gridOptionsService.is("suppressAnimationFrame"),n=this.refreshModel.bind(this,{step:_t.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,n),this.addManagedListener(this.eventService,N.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:_t.PIVOT})),this.addManagedListener(this.eventService,N.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,N.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this));const s=this.refreshModel.bind(this,{step:_t.MAP,keepRenderedRows:!0,animate:t});this.addManagedPropertyListener("groupRemoveSingleChildren",s),this.addManagedPropertyListener("groupRemoveLowestSingleChildren",s),this.rootNode=new xe(this.beans),this.nodeManager=new jr(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans)}start(){const e=this.gridOptionsService.get("rowData");e&&this.setRowData(e)}ensureRowHeightsValid(e,t,n,s){let o,r=!1;do{o=!1;const a=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),c=Math.max(a,n),u=Math.min(l,s);for(let d=c;d<=u;d++){const h=this.getRow(d);if(h.rowHeightEstimated){const f=this.gridOptionsService.getRowHeightForNode(h);h.setRowHeight(f.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const n=new Set,s=this.gridOptionsService.isDomLayout("normal");for(let o=0;o<this.rowsToDisplay.length;o++){const r=this.rowsToDisplay[o];if(r.id!=null&&n.add(r.id),r.rowHeight==null){const a=this.gridOptionsService.getRowHeightForNode(r,s,e);r.setRowHeight(a.height,a.estimated)}r.setRowTop(t),r.setRowIndex(o),t+=r.rowHeight}return n}clearRowTopAndRowIndex(e,t){const n=e.isActive(),s=r=>{r&&r.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},o=r=>{if(s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup){const a=r.level==-1;n&&!a&&!r.expanded||r.childrenAfterGroup.forEach(o)}};o(this.rootNode)}ensureRowsAtPixel(e,t,n=0){const s=this.getRowIndexAtPixel(t),o=this.getRow(s),r=!this.gridOptionsService.is("suppressAnimationFrame");return o===e[0]?!1:(e.forEach(a=>{ze.removeFromArray(this.rootNode.allLeafChildren,a)}),e.forEach((a,l)=>{ze.insertIntoArray(this.rootNode.allLeafChildren,a,Math.max(s+n,0)+l)}),this.refreshModel({step:_t.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const n=t!=null?this.getRowIndexAtPixel(t):null,s=n!=null?this.getRow(n):null;if(!s||!e||s===e||t==null){this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null);return}const o=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(o),this.lastHighlightedRow=s}getHighlightPosition(e,t){if(!t){const o=this.getRowIndexAtPixel(e);if(t=this.getRow(o||0),!t)return lr.Below}const{rowTop:n,rowHeight:s}=t;return e-n<s/2?lr.Above:lr.Below}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const t=this.rootNode.childrenAfterAggFilter;return t?t.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let n=this.rootNode.childrenAfterSort[e];if(this.gridOptionsService.is("groupHideOpenParents"))for(;n.expanded&&n.childrenAfterSort&&n.childrenAfterSort.length>0;)n=n.childrenAfterSort[0];return n.rowIndex}getRowBounds(e){if(ze.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:_t.MAP,keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gridOptionsService.isAnimateRows(),s=e.columns.length===0||e.columns.some(o=>o.isPrimary())?_t.FILTER:_t.FILTER_AGGREGATES;this.refreshModel({step:s,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:_t.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:_t.PIVOT}):this.refreshModel({step:_t.AGGREGATE})}createChangePath(e){const t=ze.missingOrEmpty(e),n=new Mw(!1,this.rootNode);return(t||this.gridOptionsService.isTreeData())&&n.setInactive(),n}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gridOptionsService.is("suppressModelUpdateAfterUpdateTransaction")||e.rowNodeTransactions==null)return!1;const t=e.rowNodeTransactions.filter(s=>s.add!=null&&s.add.length>0||s.remove!=null&&s.remove.length>0);return t==null||t.length==0}buildRefreshModelParams(e){let t=_t.EVERYTHING;const n={everything:_t.EVERYTHING,group:_t.EVERYTHING,filter:_t.FILTER,map:_t.MAP,aggregate:_t.AGGREGATE,sort:_t.SORT,pivot:_t.PIVOT};if(ze.exists(e)&&(t=n[e]),ze.missing(t)){console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(n).join(", ")}`);return}const s=!this.gridOptionsService.is("suppressAnimationFrame");return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s}}refreshModel(e){let t=typeof e=="object"&&"step"in e?e:this.buildRefreshModelParams(e);if(!t||this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const n=this.createChangePath(t.rowNodeTransactions);switch(t.step){case _t.EVERYTHING:this.doRowGrouping(t.groupState,t.rowNodeTransactions,t.rowNodeOrder,n,!!t.afterColumnsChanged);case _t.FILTER:this.doFilter(n);case _t.PIVOT:this.doPivot(n);case _t.AGGREGATE:this.doAggregate(n);case _t.FILTER_AGGREGATES:this.doFilterAggregates(n);case _t.SORT:this.doSort(t.rowNodeTransactions,n);case _t.MAP:this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,s);const o={type:N.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(o)}isEmpty(){const e=ze.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return ze.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return ze.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let n=!t,s=!1;const o=[],r=this.gridOptionsService.is("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(a=>{if(s)return;if(n&&(a===t||a===e)&&(s=!0,a.group&&r)){o.push(...a.allLeafChildren);return}if(!n){if(a!==t&&a!==e)return;n=!0}if(!a.group||!r){o.push(a);return}}),o}setDatasource(e){console.error("AG Grid: should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||this.rowsToDisplay.length===0)return-1;let t=0,n=this.rowsToDisplay.length-1;if(e<=0)return 0;if(ze.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let o=-1,r=-1;for(;;){const a=Math.floor((t+n)/2),l=this.rowsToDisplay[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?t=a+1:l.rowTop>e&&(n=a-1),o===t&&r===n))return a;o=t,r=n}}isRowInPixel(e,t){const n=e.rowTop,s=e.rowTop+e.rowHeight;return n<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((t,n)=>e(t,n))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:yo.Normal,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:yo.AfterFilter,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:yo.AfterFilterAndSort,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:yo.PivotNodes,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){var t;const{nodes:n,callback:s,recursionType:o,includeFooterNodes:r}=e;let{index:a}=e;const l=n[0];r&&(!((t=l==null?void 0:l.parent)===null||t===void 0)&&t.sibling)&&n.push(l.parent.sibling);for(let c=0;c<n.length;c++){const u=n[c];if(s(u,a++),u.hasChildren()&&!u.footer){let d=null;switch(o){case yo.Normal:d=u.childrenAfterGroup;break;case yo.AfterFilter:d=u.childrenAfterAggFilter;break;case yo.AfterFilterAndSort:d=u.childrenAfterSort;break;case yo.PivotNodes:d=u.leafGroup?null:u.childrenAfterSort;break}d&&(a=this.recursivelyWalkNodesAndCallback({nodes:[...d],callback:s,recursionType:o,index:a,includeFooterNodes:r}))}}return a}doAggregate(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gridOptionsService.isTreeData(),n=this.columnModel.isPivotActive(),s=a=>{a&&a.forEach(l=>{const c=()=>{l.expanded=e,s(l.childrenAfterGroup)};if(t){ze.exists(l.childrenAfterGroup)&&c();return}if(n){!l.leafGroup&&c();return}l.group&&c()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:_t.MAP});const o=e?"expandAll":"collapseAll",r={type:N.EVENT_EXPAND_COLLAPSE_ALL,source:o};this.eventService.dispatchEvent(r)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,n,s,o){if(this.groupStage){if(t?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,rowNodeOrder:n,changedPath:s}):(this.groupStage.execute({rowNode:this.rootNode,changedPath:s,afterColumnsChanged:o}),this.restoreGroupState(e)),this.gridOptionsService.is("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",s)){const a={type:N.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(a)}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren()}restoreGroupState(e){e&&ze.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(t,n)=>{typeof e[n]=="boolean"&&(t.expanded=e[n])})}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})}getGroupState(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsService.is("rememberGroupStateWhenNewData"))return null;const e={};return ze.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(t,n)=>e[n]=t.expanded),e}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if(typeof e=="string"&&e.indexOf(xe.ID_PREFIX_ROW_GROUP)==0){let n;return this.forEachNode(s=>{s.id===e&&(n=s)}),n}return this.nodeManager.getRowNode(e)}setRowData(e){const t=this.getGroupState();this.nodeManager.setRowData(e),this.selectionService.reset(),this.filterManager.onNewRowsLoaded("rowDataUpdated");const n={type:N.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(n),this.refreshModel({step:_t.EVERYTHING,groupState:t,newData:!0})}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const n=this.gridOptionsService.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},n)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let n=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach(s=>{const o=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(o),s.callback&&e.push(s.callback.bind(null,o)),typeof s.rowDataTransaction.addIndex=="number"&&(n=!0)}),this.commonUpdateRowData(t,void 0,n),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),t.length>0){const s={type:N.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:t};this.eventService.dispatchEvent(s)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const n=this.nodeManager.updateRowData(e,t),s=typeof e.addIndex=="number";return this.commonUpdateRowData([n],t,s),n}createRowNodeOrder(){if(this.gridOptionsService.is("suppressMaintainUnsortedOrder"))return;const t={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let n=0;n<this.rootNode.allLeafChildren.length;n++){const s=this.rootNode.allLeafChildren[n];t[s.id]=n}return t}commonUpdateRowData(e,t,n){const s=!this.gridOptionsService.is("suppressAnimationFrame");n&&(t=this.createRowNodeOrder()),this.refreshModel({step:_t.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s}),this.filterManager.onNewRowsLoaded("rowDataUpdated");const o={type:N.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(o)}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:_t.MAP,keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const n=t.detailNode;n&&n.setRowHeight(n.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}};Vn([W("columnModel")],ln.prototype,"columnModel",void 0);Vn([W("selectionService")],ln.prototype,"selectionService",void 0);Vn([W("filterManager")],ln.prototype,"filterManager",void 0);Vn([W("valueCache")],ln.prototype,"valueCache",void 0);Vn([W("beans")],ln.prototype,"beans",void 0);Vn([W("filterStage")],ln.prototype,"filterStage",void 0);Vn([W("sortStage")],ln.prototype,"sortStage",void 0);Vn([W("flattenStage")],ln.prototype,"flattenStage",void 0);Vn([xt("groupStage")],ln.prototype,"groupStage",void 0);Vn([xt("aggregationStage")],ln.prototype,"aggregationStage",void 0);Vn([xt("pivotStage")],ln.prototype,"pivotStage",void 0);Vn([xt("filterAggregatesStage")],ln.prototype,"filterAggregatesStage",void 0);Vn([Re],ln.prototype,"init",null);ln=Vn([Be("rowModel")],ln);var CD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ig=class extends be{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};CD([W("filterService")],ig.prototype,"filterService",void 0);ig=CD([Be("filterStage")],ig);var Am=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let $c=class extends be{execute(e){const t=this.sortController.getSortOptions(),n=ze.exists(t)&&t.length>0,s=n&&ze.exists(e.rowNodeTransactions)&&this.gridOptionsService.is("deltaSort"),o=t.some(r=>!!this.columnModel.getGroupDisplayColumnForGroup(r.column.getId()));this.sortService.sort(t,n,s,e.rowNodeTransactions,e.changedPath,o)}};Am([W("sortService")],$c.prototype,"sortService",void 0);Am([W("sortController")],$c.prototype,"sortController",void 0);Am([W("columnModel")],$c.prototype,"columnModel",void 0);$c=Am([Be("sortStage")],$c);var jw=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let nh=class extends be{execute(e){const t=e.rowNode,n=[],s={value:0},o=this.columnModel.isPivotMode(),r=o&&t.leafGroup,a=r?[t]:t.childrenAfterSort;this.recursivelyAddToRowsToDisplay(a,n,s,o,0);const l=n.length>0;return!r&&l&&this.gridOptionsService.is("groupIncludeTotalFooter")&&(t.createFooter(),this.addRowNodeToRowsToDisplay(t.sibling,n,s,0)),n}recursivelyAddToRowsToDisplay(e,t,n,s,o){if(ze.missingOrEmpty(e))return;const r=this.gridOptionsService.is("groupHideOpenParents"),a=this.gridOptionsService.is("groupRemoveSingleChildren"),l=!a&&this.gridOptionsService.is("groupRemoveLowestSingleChildren");for(let c=0;c<e.length;c++){const u=e[c],d=u.hasChildren(),h=s&&!d,f=a&&d&&u.childrenAfterGroup.length===1,g=l&&d&&u.leafGroup&&u.childrenAfterGroup.length===1,p=s&&u.leafGroup,v=r&&u.expanded&&!u.master&&!p;if(!h&&!v&&!f&&!g&&this.addRowNodeToRowsToDisplay(u,t,n,o),!(s&&u.leafGroup)){if(d){const C=f||g;if(u.expanded||C){const m=C?o:o+1;this.recursivelyAddToRowsToDisplay(u.childrenAfterSort,t,n,s,m),this.gridOptionsService.is("groupIncludeFooter")&&this.addRowNodeToRowsToDisplay(u.sibling,t,n,m)}}else if(u.master&&u.expanded){const C=this.createDetailNode(u);this.addRowNodeToRowsToDisplay(C,t,n,o)}}}}addRowNodeToRowsToDisplay(e,t,n,s){const o=this.gridOptionsService.isGroupMultiAutoColumn();t.push(e),e.setUiLevel(o?0:s)}createDetailNode(e){if(ze.exists(e.detailNode))return e.detailNode;const t=new xe(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,ze.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};jw([W("columnModel")],nh.prototype,"columnModel",void 0);jw([W("beans")],nh.prototype,"beans",void 0);nh=jw([Be("flattenStage")],nh);var Dm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let zc=class extends be{init(){this.postSortFunc=this.gridOptionsService.getCallback("postSortRows")}sort(e,t,n,s,o,r){const a=this.gridOptionsService.is("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(h=>h.isRowGroupActive());let c={};n&&s&&(c=this.calculateDirtyNodes(s));const u=this.columnModel.isPivotMode(),d=h=>{this.pullDownGroupDataForHideOpenParents(h.childrenAfterAggFilter,!0);const f=u&&h.leafGroup;if(a&&l&&!h.leafGroup&&!r){const p=h.childrenAfterAggFilter.slice(0);if(h.childrenAfterSort){const v={};h.childrenAfterSort.forEach((y,C)=>{v[y.id]=C}),p.sort((y,C)=>{var m,w;return((m=v[y.id])!==null&&m!==void 0?m:0)-((w=v[C.id])!==null&&w!==void 0?w:0)})}h.childrenAfterSort=p}else!t||f?h.childrenAfterSort=h.childrenAfterAggFilter.slice(0):n?h.childrenAfterSort=this.doDeltaSort(h,c,o,e):h.childrenAfterSort=this.rowNodeSorter.doFullSort(h.childrenAfterAggFilter,e);if(h.sibling&&(h.sibling.childrenAfterSort=h.childrenAfterSort),this.updateChildIndexes(h),this.postSortFunc){const p={nodes:h.childrenAfterSort};this.postSortFunc(p)}};o&&o.forEachChangedNodeDepthFirst(d),this.updateGroupDataForHideOpenParents(o)}calculateDirtyNodes(e){const t={},n=s=>{s&&s.forEach(o=>t[o.id]=!0)};return e&&e.forEach(s=>{n(s.add),n(s.update),n(s.remove)}),t}doDeltaSort(e,t,n,s){const o=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(o,s);const a={},l=[];o.forEach(h=>{t[h.id]||!n.canSkip(h)?l.push(h):a[h.id]=!0});const c=r.filter(h=>a[h.id]),u=(h,f)=>({currentPos:f,rowNode:h}),d=l.map(u).sort((h,f)=>this.rowNodeSorter.compareRowNodes(s,h,f));return this.mergeSortedArrays(s,d,c.map(u)).map(({rowNode:h})=>h)}mergeSortedArrays(e,t,n){const s=[];let o=0,r=0;for(;o<t.length&&r<n.length;)this.rowNodeSorter.compareRowNodes(e,t[o],n[r])<0?s.push(t[o++]):s.push(n[r++]);for(;o<t.length;)s.push(t[o++]);for(;r<n.length;)s.push(n[r++]);return s}updateChildIndexes(e){if(ze.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let n=0;n<t.length;n++){const s=t[n],o=n===0,r=n===e.childrenAfterSort.length-1;s.setFirstChild(o),s.setLastChild(r),s.setChildIndex(n)}}updateGroupDataForHideOpenParents(e){if(!this.gridOptionsService.is("groupHideOpenParents"))return;if(this.gridOptionsService.isTreeData()){const n="AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).";return ze.doOnce(()=>console.warn(n),"sortService.hideOpenParentsWithTreeData"),!1}const t=n=>{this.pullDownGroupDataForHideOpenParents(n.childrenAfterSort,!1),n.childrenAfterSort.forEach(s=>{s.hasChildren()&&t(s)})};e&&e.executeFromRootNode(n=>t(n))}pullDownGroupDataForHideOpenParents(e,t){!this.gridOptionsService.is("groupHideOpenParents")||ze.missing(e)||e.forEach(n=>{this.columnModel.getGroupDisplayColumns().forEach(o=>{const r=o.getColDef().showRowGroup;if(typeof r!="string"){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}const a=r,l=this.columnModel.getPrimaryColumn(a);if(l!==n.rowGroupColumn)if(t)n.setGroupValue(o.getId(),void 0);else{const u=n.getFirstChildOfFirstChild(l);u&&n.setGroupValue(o.getId(),u.key)}})})}};Dm([W("columnModel")],zc.prototype,"columnModel",void 0);Dm([W("rowNodeSorter")],zc.prototype,"rowNodeSorter",void 0);Dm([Re],zc.prototype,"init",null);zc=Dm([Be("sortService")],zc);var yD=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let ng=class extends be{filter(e){const t=this.filterManager.isColumnFilterPresent()||this.filterManager.isQuickFilterPresent()||this.filterManager.isExternalFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const n=(s,o)=>{s.hasChildren()&&e&&!o?s.childrenAfterFilter=s.childrenAfterGroup.filter(r=>{const a=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,l=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return a||l}):s.childrenAfterFilter=s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const s=(r,a)=>{if(r.childrenAfterGroup)for(let l=0;l<r.childrenAfterGroup.length;l++){const c=r.childrenAfterGroup[l],u=a||this.filterManager.doesRowPassFilter({rowNode:c});c.childrenAfterGroup?s(r.childrenAfterGroup[l],u):n(c,u)}n(r,a)},o=r=>s(r,!1);t.executeFromRootNode(o)}else{const s=o=>n(o,!1);t.forEachChangedNodeDepthFirst(s,!0)}}doingTreeDataFiltering(){return this.gridOptionsService.isTreeData()&&!this.gridOptionsService.is("excludeChildrenWhenTreeDataFiltering")}};yD([W("filterManager")],ng.prototype,"filterManager",void 0);ng=yD([Be("filterService")],ng);var Om=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Kc=class extends be{postConstruct(){this.rowModel.getType()==="clientSide"&&(this.clientSideRowModel=this.rowModel)}isActive(){const e=this.gridOptionsService.exists("getRowId");return this.gridOptionsService.is("resetRowDataOnUpdate")?!1:e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[n,s]=t;this.clientSideRowModel.updateRowData(n,s)}createTransactionForRowData(e){if(ze.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}const t=this.gridOptionsService.getCallback("getRowId");if(t==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}const n={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gridOptionsService.is("suppressMaintainUnsortedOrder")?void 0:{};return ze.exists(e)&&e.forEach((a,l)=>{const c=t({data:a,level:0}),u=s[c];r&&(r[c]=l),u?(u.data!==a&&n.update.push(a),s[c]=void 0):n.add.push(a)}),ze.iterateObject(s,(a,l)=>{l&&n.remove.push(l.data)}),[n,r]}};Om([W("rowModel")],Kc.prototype,"rowModel",void 0);Om([W("rowRenderer")],Kc.prototype,"rowRenderer",void 0);Om([Re],Kc.prototype,"postConstruct",null);Kc=Om([Be("immutableService")],Kc);const zG="30.0.5",KG={version:zG,moduleName:We.ClientSideRowModelModule,rowModel:"clientSide",beans:[ln,ig,$c,nh,zc,ng,Kc]};var $w=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};class sh extends Cn{constructor(e,t,n){super(e),this.parentCache=t,this.params=n,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,t,n){ze.exists(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(ze.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsService.context}}forEachNode(e,t,n){this.rowNodes.forEach((s,o)=>{this.startRow+o<n&&e(s,t.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.next());const n=e-this.startRow;return this.rowNodes[n]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const t=this.startRow+e,n=new xe(this.beans);n.setRowHeight(this.params.rowHeight),n.uiLevel=0,n.setRowIndex(t),n.setRowTop(this.params.rowHeight*t),this.rowNodes.push(n)}}processServerResult(e){this.rowNodes.forEach((n,s)=>{const o=e.rowData?e.rowData[s]:void 0;!n.id&&n.alreadyRendered&&o&&(this.rowNodes[s]=new xe(this.beans),this.rowNodes[s].setRowIndex(n.rowIndex),this.rowNodes[s].setRowTop(n.rowTop),n.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[s],o,this.startRow+s)});const t=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,t)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}}$w([W("beans")],sh.prototype,"beans",void 0);$w([Re],sh.prototype,"postConstruct",null);$w([Hi],sh.prototype,"destroyRowNodes",null);var Pm=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},YG=function(i,e){return function(t,n){e(t,n,i)}};class _a extends be{constructor(e){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount,this.params=e}setBeans(e){this.logger=e.create("InfiniteCache")}getRow(e,t=!1){const n=Math.floor(e/this.params.blockSize);let s=this.blocks[n];if(!s){if(t)return;s=this.createBlock(n)}return s.getRow(e)}createBlock(e){const t=this.createBean(new sh(e,this,this.params));return this.blocks[t.getId()]=t,this.blockCount++,this.purgeBlocksIfNeeded(t),this.params.rowNodeBlockLoader.addBlock(t),t}refreshCache(){if(this.blockCount==0){this.purgeCache();return}this.getBlocksInOrder().forEach(t=>t.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()}destroyAllBlocks(){this.getBlocksInOrder().forEach(e=>this.destroyBlock(e))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${e.getId()}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(a=>a!=e),n=(a,l)=>l.getLastAccessed()-a.getLastAccessed();t.sort(n);const s=this.params.maxBlocksInCache>0,o=s?this.params.maxBlocksInCache-1:null,r=_a.MAX_EMPTY_BLOCKS_TO_KEEP-1;t.forEach((a,l)=>{const c=a.getState()===sh.STATE_WAITING_TO_LOAD&&l>=r,u=s?l>=o:!1;if(c||u){if(this.isBlockCurrentlyDisplayed(a)||this.isBlockFocused(a))return;this.removeBlockFromCache(a)}})}isBlockFocused(e){const t=this.focusService.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const n=e.getStartRow(),s=e.getEndRow();return t.rowIndex>=n&&t.rowIndex<s}isBlockCurrentlyDisplayed(e){const t=e.getStartRow(),n=e.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(t,n)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const s=(e.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<s&&(this.rowCount=s)}}setRowCount(e,t){this.rowCount=e,ze.exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t=new Fc;this.getBlocksInOrder().forEach(n=>n.forEachNode(e,t,this.rowCount))}getBlocksInOrder(){const e=(n,s)=>n.getId()-s.getId();return ze.getAllValuesInObject(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.getId()],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();const e={type:N.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(e)}}destroyAllBlocksPastVirtualRowCount(){const e=[];this.getBlocksInOrder().forEach(t=>{t.getId()*this.params.blockSize>=this.rowCount&&e.push(t)}),e.length>0&&e.forEach(t=>this.destroyBlock(t))}purgeCache(){this.getBlocksInOrder().forEach(e=>this.removeBlockFromCache(e)),this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const n=[];let s=-1,o=!1;const r=new Fc;ze.missing(e)&&(o=!0);let a=!1;return this.getBlocksInOrder().forEach(c=>{if(!a){if(o&&s+1!==c.getId()){a=!0;return}s=c.getId(),c.forEachNode(u=>{const d=u===e||u===t;(o||d)&&n.push(u),d&&(o=!o)},r,this.rowCount)}}),a||o?[]:n}}_a.MAX_EMPTY_BLOCKS_TO_KEEP=2;Pm([W("rowRenderer")],_a.prototype,"rowRenderer",void 0);Pm([W("focusService")],_a.prototype,"focusService",void 0);Pm([YG(0,bn("loggerFactory"))],_a.prototype,"setBeans",null);Pm([Hi],_a.prototype,"destroyAllBlocks",null);var Ra=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Vo=class extends be{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,t,n,s){return!1}init(){this.gridOptionsService.isRowModelType("infinite")&&(this.rowHeight=this.gridOptionsService.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){if(this.gridOptionsService.exists("initialGroupOrderComparator")){const e="AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.";ze.doOnce(()=>console.warn(e),"IRM.InitialGroupOrderComparator")}}start(){this.setDatasource(this.gridOptionsService.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,N.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,N.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,N.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this))}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;this.cacheParams?e=this.isSortModelDifferent():e=!0,e&&this.reset()}isSortModelDifferent(){return!ze.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]}reset(){if(!this.datasource)return;this.gridOptionsService.getCallback("getRowId")!=null||this.selectionService.reset(),this.resetCache();const n=this.createModelUpdatedEvent();this.eventService.dispatchEvent(n)}createModelUpdatedEvent(){return{type:N.EVENT_MODEL_UPDATED,newPage:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.defaultIfInvalid(this.gridOptionsService.getNum("infiniteInitialRowCount"),1),maxBlocksInCache:this.gridOptionsService.getNum("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.defaultIfInvalid(this.gridOptionsService.getNum("cacheOverflowSize"),1),blockSize:this.defaultIfInvalid(this.gridOptionsService.getNum("cacheBlockSize"),100),lastAccessedSequence:new Fc},this.infiniteCache=this.createBean(new _a(this.cacheParams))}defaultIfInvalid(e,t){return e>0?e:t}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?this.infiniteCache.isLastRowIndexKnown():!1}setRowCount(e,t){this.infiniteCache&&this.infiniteCache.setRowCount(e,t)}};Ra([W("filterManager")],Vo.prototype,"filterManager",void 0);Ra([W("sortController")],Vo.prototype,"sortController",void 0);Ra([W("selectionService")],Vo.prototype,"selectionService",void 0);Ra([W("rowRenderer")],Vo.prototype,"rowRenderer",void 0);Ra([W("rowNodeBlockLoader")],Vo.prototype,"rowNodeBlockLoader",void 0);Ra([Re],Vo.prototype,"init",null);Ra([Hi],Vo.prototype,"destroyDatasource",null);Vo=Ra([Be("rowModel")],Vo);const qG="30.0.5",XG={version:qG,moduleName:We.InfiniteRowModelModule,rowModel:"infinite",beans:[Vo]};class QG{setBeans(e){this.beans=e}getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}}class ZG{constructor(e){this.groupColumns=[];const{columnModel:t,valueService:n,gridOptionsService:s,valueFormatterService:o,valueParserService:r,processCellCallback:a,processHeaderCallback:l,processGroupHeaderCallback:c,processRowGroupCallback:u}=e;this.columnModel=t,this.valueService=n,this.gridOptionsService=s,this.valueFormatterService=o,this.valueParserService=r,this.processCellCallback=a,this.processHeaderCallback=l,this.processGroupHeaderCallback=c,this.processRowGroupCallback=u}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){const t=this.getHeaderName(this.processHeaderCallback,e);return t??""}extractRowCellValue(e,t,n,s,o){const a=(!this.gridOptionsService.is("groupHideOpenParents")||o.footer)&&this.shouldRenderGroupSummaryCell(o,e,t)?this.createValueForGroupNode(o):this.valueService.getValue(e,o);return this.processCell({accumulatedRowIndex:n,rowNode:o,column:e,value:a,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,t,n){var s;if(!(e&&e.group))return!1;if(this.groupColumns.indexOf(t)!==-1){if(((s=e.groupData)===null||s===void 0?void 0:s[t.getId()])!=null)return!0;if(e.footer&&e.level===-1){const l=t.getColDef();return l==null||l.showRowGroup===!0||l.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const a=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return n===0&&a}getHeaderName(e,t){return e?e({column:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}):this.columnModel.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e){if(this.processRowGroupCallback)return this.processRowGroupCallback({node:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context});const t=e.footer,n=[e.key];if(!this.gridOptionsService.isGroupMultiAutoColumn())for(;e.parent;)e=e.parent,n.push(e.key);const s=n.reverse().join(" -> ");return t?`Total ${s}`:s}processCell(e){var t;const{accumulatedRowIndex:n,rowNode:s,column:o,value:r,processCellCallback:a,type:l}=e;return a?{value:(t=a({accumulatedRowIndex:n,column:o,node:s,value:r,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,type:l,parseValue:c=>this.valueParserService.parseValue(o,s,c,this.valueService.getValue(o,s)),formatValue:c=>{var u;return(u=this.valueFormatterService.formatValue(o,s,c))!==null&&u!==void 0?u:c}}))!==null&&t!==void 0?t:""}:o.getColDef().useValueFormatterForExport?{value:r??"",valueFormatted:this.valueFormatterService.formatValue(o,s,r)}:{value:r??""}}}class JG{static download(e,t){const n=document.defaultView||window;if(!n){console.warn("AG Grid: There is no `window` associated with the current `document`");return}const s=document.createElement("a"),o=n.URL.createObjectURL(t);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:n})),document.body.removeChild(s),n.setTimeout(()=>{n.URL.revokeObjectURL(o)},0)}}const v_=`\r
`;class eH extends ZG{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,v_),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((n,s)=>{s!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(n.data.value||""),n.mergeAcross&&this.appendEmptyCells(n.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,s){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(s)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){var s;t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",n);this.result+=this.putInQuotes((s=o.valueFormatted)!==null&&s!==void 0?s:o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=v_),this.isFirstLine=!1}}var Ta=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o};let Go=class extends QG{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})}getMergedParams(e){const t=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed())return console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration."),"";const t=this.getMergedParams(e),n=this.getData(t),s=new Blob(["\uFEFF",n],{type:"text/plain"});return JG.download(this.getFileName(t.fileName),s),n}exportDataAsCsv(e){return this.export(e)}getDataAsCsv(e,t=!1){const n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileName(){return"export.csv"}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:t,valueService:n,gridOptionsService:s,valueFormatterService:o,valueParserService:r}=this,{processCellCallback:a,processHeaderCallback:l,processGroupHeaderCallback:c,processRowGroupCallback:u,suppressQuotes:d,columnSeparator:h}=e;return new eH({columnModel:t,valueService:n,gridOptionsService:s,valueFormatterService:o,valueParserService:r,processCellCallback:a||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:c||void 0,processRowGroupCallback:u||void 0,suppressQuotes:d||!1,columnSeparator:h||","})}isExportSuppressed(){return this.gridOptionsService.is("suppressCsvExport")}};Ta([W("columnModel")],Go.prototype,"columnModel",void 0);Ta([W("valueService")],Go.prototype,"valueService",void 0);Ta([W("gridSerializer")],Go.prototype,"gridSerializer",void 0);Ta([W("gridOptionsService")],Go.prototype,"gridOptionsService",void 0);Ta([W("valueFormatterService")],Go.prototype,"valueFormatterService",void 0);Ta([W("valueParserService")],Go.prototype,"valueParserService",void 0);Ta([Re],Go.prototype,"postConstruct",null);Go=Ta([Be("csvCreator")],Go);var xa=function(i,e,t,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(r=i[a])&&(o=(s<3?r(o):s>3?r(e,t,o):r(e,t))||o);return s>3&&o&&Object.defineProperty(e,t,o),o},C_;(function(i){i[i.HEADER_GROUPING=0]="HEADER_GROUPING",i[i.HEADER=1]="HEADER",i[i.BODY=2]="BODY"})(C_||(C_={}));let Ho=class extends be{serialize(e,t={}){const n=this.getColumnsToExport(t.allColumns,t.columnKeys);return ze.compose(this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t))(e).parse()}processRow(e,t,n,s){const o=t.shouldRowBeSkipped||(()=>!1),r=this.gridOptionsService.context,a=this.gridOptionsService.api,l=this.gridOptionsService.columnApi,c=this.gridOptionsService.is("groupRemoveSingleChildren"),u=this.gridOptionsService.is("groupRemoveLowestSingleChildren"),h=t.rowPositions!=null||!!t.onlySelected,f=this.gridOptionsService.is("groupHideOpenParents")&&!h,g=this.columnModel.isPivotMode()?s.leafGroup:!s.group,p=!!s.footer,v=t.skipGroups||t.skipRowGroups,y=u&&s.leafGroup,C=s.allChildrenCount===1&&(c||y);if(v&&t.skipGroups&&ze.doOnce(()=>console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`."),"gridSerializer-skipGroups"),!g&&!p&&(t.skipRowGroups||C||f)||t.onlySelected&&!s.isSelected()||t.skipPinnedTop&&s.rowPinned==="top"||t.skipPinnedBottom&&s.rowPinned==="bottom"||s.level===-1&&!g&&!p||o({node:s,api:a,columnApi:l,context:r}))return;const E=e.onNewBodyRow(s);if(n.forEach((R,O)=>{E.onColumn(R,O,s)}),t.getCustomContentBelowRow){const R=t.getCustomContentBelowRow({node:s,api:a,columnApi:l,context:r});R&&e.addCustomContent(R)}}appendContent(e){return t=>{const n=e.customFooter||e.appendContent;return n&&(e.customFooter&&ze.doOnce(()=>console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead."),"gridSerializer-customFooter"),t.addCustomContent(n)),t}}prependContent(e){return t=>{const n=e.customHeader||e.prependContent;return n&&(e.customHeader&&ze.doOnce(()=>console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead."),"gridSerializer-customHeader"),t.addCustomContent(n)),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(e.skipColumnGroupHeaders)e.columnGroups&&ze.doOnce(()=>console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default."),"gridSerializer-columnGroups");else{const s=new kx,o=this.displayedGroupCreator.createDisplayedGroups(t,this.columnModel.getGridBalancedTree(),s,null);this.recursivelyAddHeaderGroups(o,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipHeader&&!e.skipColumnHeaders){const s=n.onNewHeaderRow();t.forEach((o,r)=>{s.onColumn(o,r,void 0)})}else e.skipHeader&&ze.doOnce(()=>console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`."),"gridSerializer-skipHeader");return n}}processPinnedTopRows(e,t){return n=>{const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="top").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedTopRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),n}}processRows(e,t){return n=>{const s=this.rowModel,o=s.getType(),r=o==="clientSide",a=o==="serverSide",l=!r&&e.onlySelected,c=this.processRow.bind(this,n,e,t),{exportedRows:u="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>d.rowPinned==null).sort((d,h)=>d.rowIndex-h.rowIndex).map(d=>s.getRow(d.rowIndex)).forEach(c);else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(c,!0):s.forEachNode(c);else if(e.onlySelectedAllPages||l){const d=this.selectionService.getSelectedNodes();this.replicateSortedOrder(d),d.forEach(c)}else u==="all"?s.forEachNode(c):r?s.forEachNodeAfterFilterAndSort(c,!0):a?s.forEachNodeAfterFilterAndSort(c):s.forEachNode(c);return n}}replicateSortedOrder(e){const t=this.sortController.getSortOptions(),n=(s,o)=>{var r,a,l,c;return s.rowIndex!=null&&o.rowIndex!=null?s.rowIndex-o.rowIndex:s.level===o.level?((r=s.parent)===null||r===void 0?void 0:r.id)===((a=o.parent)===null||a===void 0?void 0:a.id)?this.rowNodeSorter.compareRowNodes(t,{rowNode:s,currentPos:(l=s.rowIndex)!==null&&l!==void 0?l:-1},{rowNode:o,currentPos:(c=o.rowIndex)!==null&&c!==void 0?c:-1}):n(s.parent,o.parent):s.level>o.level?n(s.parent,o):n(s,o.parent)};e.sort(n)}processPinnedBottomRows(e,t){return n=>{const s=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(o=>o.rowPinned==="bottom").sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedBottomRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),n}}getColumnsToExport(e=!1,t){const n=this.columnModel.isPivotMode();return t&&t.length?this.columnModel.getGridColumns(t):e&&!n?(this.gridOptionsService.isTreeData()?this.columnModel.getGridColumns([Pc]):[]).concat(this.columnModel.getAllGridColumns()||[]):this.columnModel.getAllDisplayedColumns()}recursivelyAddHeaderGroups(e,t,n){const s=[];e.forEach(o=>{const r=o;r.getChildren&&r.getChildren().forEach(a=>s.push(a))}),e.length>0&&e[0]instanceof Bt&&this.doAddHeaderHeader(t,e,n),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,t,n)}doAddHeaderHeader(e,t,n){const s=e.onNewHeaderGroupingRow();let o=0;t.forEach(r=>{const a=r;let l;n?l=n({columnGroup:a,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}):l=this.columnModel.getDisplayNameForColumnGroup(a,"header");const c=a.getLeafColumns().reduce((u,d,h,f)=>{let g=ze.last(u);return d.getColumnGroupShow()==="open"?(!g||g[1]!=null)&&(g=[h],u.push(g)):g&&g[1]==null&&(g[1]=h-1),h===f.length-1&&g&&g[1]==null&&(g[1]=h),u},[]);s.onColumn(a,l||"",o++,a.getLeafColumns().length-1,c)})}};xa([W("displayedGroupCreator")],Ho.prototype,"displayedGroupCreator",void 0);xa([W("columnModel")],Ho.prototype,"columnModel",void 0);xa([W("rowModel")],Ho.prototype,"rowModel",void 0);xa([W("pinnedRowModel")],Ho.prototype,"pinnedRowModel",void 0);xa([W("selectionService")],Ho.prototype,"selectionService",void 0);xa([W("rowNodeSorter")],Ho.prototype,"rowNodeSorter",void 0);xa([W("sortController")],Ho.prototype,"sortController",void 0);Ho=xa([Be("gridSerializer")],Ho);const tH="30.0.5",iH={version:tH,moduleName:We.CsvExportModule,beans:[Go,Ho]},nH=[KG,XG,iH];Pe.registerModules(nH);class oh{static getComponentDefinition(e,t){let n;return typeof e=="string"?n=this.searchForComponentInstance(t,e):n={extends:xl(Object.assign({},e))},n||console.error(`Could not find component with name of ${e}. Is it in Vue.components?`),n.extends?(n.extends.setup&&(n.setup=n.extends.setup),n.extends.props=this.addParamsToProps(n.extends.props)):n.props=this.addParamsToProps(n.props),n}static addParamsToProps(e){return!e||Array.isArray(e)&&e.indexOf("params")===-1?e=["params",...e||[]]:typeof e=="object"&&!e.params&&(e.params={type:Object}),e}static createAndMountComponent(e,t,n,s){const o=oh.getComponentDefinition(e,n);if(!o)return;const{vNode:r,destroy:a,el:l}=this.mount(o,{params:Object.freeze(t)},n,s||{});return{componentInstance:r.component.proxy,element:l,destroy:a}}static mount(e,t,n,s){let o=b(e,t);o.appContext=n.$.appContext,o.appContext.provides=Object.assign(Object.assign(Object.assign({},s),o.appContext.provides?o.appContext.provides:{}),n.$parent.$options.provide?n.$parent.$options.provide:{});let r=document.createElement("div");return GE(o,r),{vNode:o,destroy:()=>{r&&GE(null,r),r=null,o=null},el:r}}static searchForComponentInstance(e,t,n=10,s=!1){let o=null,r=e.$parent,a=0;for(;!o&&r&&r.$options&&++a<n;){const l=r;o=l.$options&&l.$options.components?l.$options.components[t]:null,r=r.$parent}if(!o){const l=e.$.appContext.components;l&&l[t]&&(o=l[t])}return!o&&!s?(console.error(`Could not find component with name of ${t}. Is it in Vue.components?`),null):o}}class pd extends $G{constructor(e,t){super(),this.parent=e,pd.provides||(pd.provides=t)}createWrapper(e){const t=this;class n extends sH{init(r){super.init(r)}hasMethod(r){return s.getFrameworkComponentInstance()[r]!=null}callMethod(r,a){const l=this.getFrameworkComponentInstance();return s.getFrameworkComponentInstance()[r].apply(l,a)}addMethod(r,a){s[r]=a}overrideProcessing(r){return t.parent.autoParamsRefresh&&r==="refresh"}processMethod(r,a){return r==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(r)?this.callMethod(r,a):r==="refresh"}createComponent(r){return t.createComponent(e,r)}}const s=new n;return s}createComponent(e,t){return oh.createAndMountComponent(e,t,this.parent,pd.provides)}createMethodProxy(e,t,n){return function(){return e.overrideProcessing(t)?e.processMethod(t,arguments):e.hasMethod(t)?e.callMethod(t,arguments):(n&&console.warn("AG Grid: Framework component is missing the method "+t+"()"),null)}}destroy(){this.parent=null}}class sH{getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(e){const{componentInstance:t,element:n,destroy:s}=this.createComponent(e);this.componentInstance=t,this.unmount=s,this.element=n.firstElementChild}}const oH=i=>i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),rH=i=>`on${i.charAt(0).toUpperCase()}${i.substring(1,i.length)}`,aH=()=>{const i={};dt.PUBLIC_EVENTS.map(n=>rH(oH(n))).forEach(n=>i[n]=void 0);const t={};return dt.ALL_PROPERTIES.filter(n=>n!="gridOptions").forEach(n=>{i[n]={},t[n]={handler(s,o){this.processChanges(n,s,o)},deep:n!=="popupParent"&&n!=="context"}}),[i,t]};class lH extends uD{constructor(e){super(),this.parent=e}frameworkComponent(e,t){let n=oh.searchForComponentInstance(this.parent,e,10,!0)?e:null;if(!n&&t&&t[e]){const s=t[e];n=oh.searchForComponentInstance(this.parent,s,10,!0)?s:null}return n}isFrameworkComponent(e){return typeof e=="object"}}const cH=["rowDataChanged","rowDataUpdated","cellValueChanged","rowValueChanged"],y_="onUpdate:modelValue",uH="update:modelValue",[dH,hH]=aH(),bD=xl({render(){return ts("div")},props:Object.assign({gridOptions:{type:Object,default:()=>({})},autoParamsRefresh:{type:Boolean,default:()=>!1},componentDependencies:{type:Array,default:()=>[]},plugins:[],modules:{type:Array,default:()=>[]},modelValue:{type:Array,default:void 0,required:!1}},dH),data(){return{gridCreated:!1,isDestroyed:!1,gridReadyFired:!1,emitRowModel:void 0}},watch:Object.assign({modelValue:{handler(i,e){this.processChanges("rowData",i,e)},deep:!0}},hH),methods:{globalEventListener(i,e){this.isDestroyed||(i==="gridReady"&&(this.gridReadyFired=!0),this.updateModelIfUsed(i))},processChanges(i,e,t){if(this.gridCreated){if(this.skipChange(i,e,t))return;const n={};n[i]={currentValue:i==="rowData"?Object.isFrozen(e)?e:ad(it(e)):e,previousValue:t},dt.processOnChange(n,this.gridOptions.api)}},checkForBindingConflicts(){const i=this;(i.rowData||this.gridOptions.rowData)&&i.modelValue&&console.warn("AG Grid: Using both rowData and v-model. rowData will be ignored.")},getRowData(){const i=[];return this.gridOptions.api.forEachNode(e=>{i.push(e.data)}),i},updateModelIfUsed(i){this.gridReadyFired&&this.$attrs[y_]&&cH.indexOf(i)!==-1&&this.emitRowModel&&this.emitRowModel()},getRowDataBasedOnBindings(){const i=this,e=i.modelValue;return e||(i.rowData?i.rowData:i.gridOptions.rowData)},getProvides(){let i=Sh(),e={};for(;i;)i&&i.provides&&(e=Object.assign(Object.assign({},e),i.provides)),i=i.parent;return e},skipChange(i,e,t){if(this.gridReadyFired&&i==="rowData"&&this.$attrs[y_]){if(e===t)return!0;if(e&&t){const n=e,s=t;if(n.length===s.length){for(let o=0;o<n.length;o++)if(n[o]!==s[o])return!1;return!0}}}return!1},debounce(i,e){let t;return()=>{const n=function(){i()};window.clearTimeout(t),t=window.setTimeout(n,e)}}},mounted(){this.emitRowModel=this.debounce(()=>{this.$emit(uH,Object.freeze(this.getRowData()))},20);const i=this.getProvides(),e=new pd(this,i),t=ad(dt.copyAttributesToGridOptions(it(this.gridOptions),this,!0));this.checkForBindingConflicts();const n=this.getRowDataBasedOnBindings();t.rowData=n&&(Object.isFrozen(n)?n:ad(it(n)));const s={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:new lH(this),providedBeanInstances:{frameworkComponentWrapper:e},modules:this.modules};new WG(this.$el,t,s),this.gridCreated=!0},unmounted(){this.gridCreated&&(this.gridOptions.api&&this.gridOptions.api.destroy(),this.isDestroyed=!0)}});/*!
* vuex v4.1.0
* (c) 2022 Evan You
* @license MIT
*/var wD="store";function Aa(i){return i===void 0&&(i=null),ct(i!==null?i:wD)}function yu(i,e){Object.keys(i).forEach(function(t){return e(i[t],t)})}function fH(i){return i!==null&&typeof i=="object"}function pH(i){return i&&typeof i.then=="function"}function gH(i,e){return function(){return i(e)}}function SD(i,e,t){return e.indexOf(i)<0&&(t&&t.prepend?e.unshift(i):e.push(i)),function(){var n=e.indexOf(i);n>-1&&e.splice(n,1)}}function ED(i,e){i._actions=Object.create(null),i._mutations=Object.create(null),i._wrappedGetters=Object.create(null),i._modulesNamespaceMap=Object.create(null);var t=i.state;Im(i,t,[],i._modules.root,!0),zw(i,t,e)}function zw(i,e,t){var n=i._state,s=i._scope;i.getters={},i._makeLocalGettersCache=Object.create(null);var o=i._wrappedGetters,r={},a={},l=Og(!0);l.run(function(){yu(o,function(c,u){r[u]=gH(c,i),a[u]=z(function(){return r[u]()}),Object.defineProperty(i.getters,u,{get:function(){return a[u].value},enumerable:!0})})}),i._state=xi({data:e}),i._scope=l,i.strict&&bH(i),n&&t&&i._withCommit(function(){n.data=null}),s&&s.stop()}function Im(i,e,t,n,s){var o=!t.length,r=i._modules.getNamespace(t);if(n.namespaced&&(i._modulesNamespaceMap[r],i._modulesNamespaceMap[r]=n),!o&&!s){var a=Kw(e,t.slice(0,-1)),l=t[t.length-1];i._withCommit(function(){a[l]=n.state})}var c=n.context=mH(i,r,t);n.forEachMutation(function(u,d){var h=r+d;vH(i,h,u,c)}),n.forEachAction(function(u,d){var h=u.root?d:r+d,f=u.handler||u;CH(i,h,f,c)}),n.forEachGetter(function(u,d){var h=r+d;yH(i,h,u,c)}),n.forEachChild(function(u,d){Im(i,e,t.concat(d),u,s)})}function mH(i,e,t){var n=e==="",s={dispatch:n?i.dispatch:function(o,r,a){var l=sg(o,r,a),c=l.payload,u=l.options,d=l.type;return(!u||!u.root)&&(d=e+d),i.dispatch(d,c)},commit:n?i.commit:function(o,r,a){var l=sg(o,r,a),c=l.payload,u=l.options,d=l.type;(!u||!u.root)&&(d=e+d),i.commit(d,c,u)}};return Object.defineProperties(s,{getters:{get:n?function(){return i.getters}:function(){return _D(i,e)}},state:{get:function(){return Kw(i.state,t)}}}),s}function _D(i,e){if(!i._makeLocalGettersCache[e]){var t={},n=e.length;Object.keys(i.getters).forEach(function(s){if(s.slice(0,n)===e){var o=s.slice(n);Object.defineProperty(t,o,{get:function(){return i.getters[s]},enumerable:!0})}}),i._makeLocalGettersCache[e]=t}return i._makeLocalGettersCache[e]}function vH(i,e,t,n){var s=i._mutations[e]||(i._mutations[e]=[]);s.push(function(r){t.call(i,n.state,r)})}function CH(i,e,t,n){var s=i._actions[e]||(i._actions[e]=[]);s.push(function(r){var a=t.call(i,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:i.getters,rootState:i.state},r);return pH(a)||(a=Promise.resolve(a)),i._devtoolHook?a.catch(function(l){throw i._devtoolHook.emit("vuex:error",l),l}):a})}function yH(i,e,t,n){i._wrappedGetters[e]||(i._wrappedGetters[e]=function(o){return t(n.state,n.getters,o.state,o.getters)})}function bH(i){Le(function(){return i._state.data},function(){},{deep:!0,flush:"sync"})}function Kw(i,e){return e.reduce(function(t,n){return t[n]},i)}function sg(i,e,t){return fH(i)&&i.type&&(t=e,e=i,i=i.type),{type:i,payload:e,options:t}}var wH="vuex bindings",b_="vuex:mutations",Lv="vuex:actions",Ql="vuex",SH=0;function EH(i,e){nN({id:"org.vuejs.vuex",app:i,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wH]},function(t){t.addTimelineLayer({id:b_,label:"Vuex Mutations",color:w_}),t.addTimelineLayer({id:Lv,label:"Vuex Actions",color:w_}),t.addInspector({id:Ql,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),t.on.getInspectorTree(function(n){if(n.app===i&&n.inspectorId===Ql)if(n.filter){var s=[];AD(s,e._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[xD(e._modules.root,"")]}),t.on.getInspectorState(function(n){if(n.app===i&&n.inspectorId===Ql){var s=n.nodeId;_D(e,s),n.state=TH(AH(e._modules,s),s==="root"?e.getters:e._makeLocalGettersCache,s)}}),t.on.editInspectorState(function(n){if(n.app===i&&n.inspectorId===Ql){var s=n.nodeId,o=n.path;s!=="root"&&(o=s.split("/").filter(Boolean).concat(o)),e._withCommit(function(){n.set(e._state.data,o,n.state.value)})}}),e.subscribe(function(n,s){var o={};n.payload&&(o.payload=n.payload),o.state=s,t.notifyComponentUpdate(),t.sendInspectorTree(Ql),t.sendInspectorState(Ql),t.addTimelineEvent({layerId:b_,event:{time:Date.now(),title:n.type,data:o}})}),e.subscribeAction({before:function(n,s){var o={};n.payload&&(o.payload=n.payload),n._id=SH++,n._time=Date.now(),o.state=s,t.addTimelineEvent({layerId:Lv,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:o}})},after:function(n,s){var o={},r=Date.now()-n._time;o.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(o.payload=n.payload),o.state=s,t.addTimelineEvent({layerId:Lv,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:o}})}})})}var w_=8702998,_H=6710886,RH=16777215,RD={label:"namespaced",textColor:RH,backgroundColor:_H};function TD(i){return i&&i!=="root"?i.split("/").slice(-2,-1)[0]:"Root"}function xD(i,e){return{id:e||"root",label:TD(e),tags:i.namespaced?[RD]:[],children:Object.keys(i._children).map(function(t){return xD(i._children[t],e+t+"/")})}}function AD(i,e,t,n){n.includes(t)&&i.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:e.namespaced?[RD]:[]}),Object.keys(e._children).forEach(function(s){AD(i,e._children[s],t,n+s+"/")})}function TH(i,e,t){e=t==="root"?e:e[t];var n=Object.keys(e),s={state:Object.keys(i.state).map(function(r){return{key:r,editable:!0,value:i.state[r]}})};if(n.length){var o=xH(e);s.getters=Object.keys(o).map(function(r){return{key:r.endsWith("/")?TD(r):r,editable:!1,value:sy(function(){return o[r]})}})}return s}function xH(i){var e={};return Object.keys(i).forEach(function(t){var n=t.split("/");if(n.length>1){var s=e,o=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[o]=sy(function(){return i[t]})}else e[t]=sy(function(){return i[t]})}),e}function AH(i,e){var t=e.split("/").filter(function(n){return n});return t.reduce(function(n,s,o){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+e+'".');return o===t.length-1?r:r._children},e==="root"?i:i.root._children)}function sy(i){try{return i()}catch(e){return e}}var ho=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=(typeof n=="function"?n():n)||{}},DD={namespaced:{configurable:!0}};DD.namespaced.get=function(){return!!this._rawModule.namespaced};ho.prototype.addChild=function(e,t){this._children[e]=t};ho.prototype.removeChild=function(e){delete this._children[e]};ho.prototype.getChild=function(e){return this._children[e]};ho.prototype.hasChild=function(e){return e in this._children};ho.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)};ho.prototype.forEachChild=function(e){yu(this._children,e)};ho.prototype.forEachGetter=function(e){this._rawModule.getters&&yu(this._rawModule.getters,e)};ho.prototype.forEachAction=function(e){this._rawModule.actions&&yu(this._rawModule.actions,e)};ho.prototype.forEachMutation=function(e){this._rawModule.mutations&&yu(this._rawModule.mutations,e)};Object.defineProperties(ho.prototype,DD);var Gl=function(e){this.register([],e,!1)};Gl.prototype.get=function(e){return e.reduce(function(t,n){return t.getChild(n)},this.root)};Gl.prototype.getNamespace=function(e){var t=this.root;return e.reduce(function(n,s){return t=t.getChild(s),n+(t.namespaced?s+"/":"")},"")};Gl.prototype.update=function(e){OD([],this.root,e)};Gl.prototype.register=function(e,t,n){var s=this;n===void 0&&(n=!0);var o=new ho(t,n);if(e.length===0)this.root=o;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],o)}t.modules&&yu(t.modules,function(a,l){s.register(e.concat(l),a,n)})};Gl.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],s=t.getChild(n);s&&s.runtime&&t.removeChild(n)};Gl.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return t?t.hasChild(n):!1};function OD(i,e,t){if(e.update(t),t.modules)for(var n in t.modules){if(!e.getChild(n))return;OD(i.concat(n),e.getChild(n),t.modules[n])}}function DH(i){return new Gn(i)}var Gn=function(e){var t=this;e===void 0&&(e={});var n=e.plugins;n===void 0&&(n=[]);var s=e.strict;s===void 0&&(s=!1);var o=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Gl(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var r=this,a=this,l=a.dispatch,c=a.commit;this.dispatch=function(h,f){return l.call(r,h,f)},this.commit=function(h,f,g){return c.call(r,h,f,g)},this.strict=s;var u=this._modules.root.state;Im(this,u,[],this._modules.root),zw(this,u),n.forEach(function(d){return d(t)})},Yw={state:{configurable:!0}};Gn.prototype.install=function(e,t){e.provide(t||wD,this),e.config.globalProperties.$store=this;var n=this._devtools!==void 0?this._devtools:!1;n&&EH(e,this)};Yw.state.get=function(){return this._state.data};Yw.state.set=function(i){};Gn.prototype.commit=function(e,t,n){var s=this,o=sg(e,t,n),r=o.type,a=o.payload,l={type:r,payload:a},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(d){d(a)})}),this._subscribers.slice().forEach(function(u){return u(l,s.state)}))};Gn.prototype.dispatch=function(e,t){var n=this,s=sg(e,t),o=s.type,r=s.payload,a={type:o,payload:r},l=this._actions[o];if(l){try{this._actionSubscribers.slice().filter(function(u){return u.before}).forEach(function(u){return u.before(a,n.state)})}catch{}var c=l.length>1?Promise.all(l.map(function(u){return u(r)})):l[0](r);return new Promise(function(u,d){c.then(function(h){try{n._actionSubscribers.filter(function(f){return f.after}).forEach(function(f){return f.after(a,n.state)})}catch{}u(h)},function(h){try{n._actionSubscribers.filter(function(f){return f.error}).forEach(function(f){return f.error(a,n.state,h)})}catch{}d(h)})})}};Gn.prototype.subscribe=function(e,t){return SD(e,this._subscribers,t)};Gn.prototype.subscribeAction=function(e,t){var n=typeof e=="function"?{before:e}:e;return SD(n,this._actionSubscribers,t)};Gn.prototype.watch=function(e,t,n){var s=this;return Le(function(){return e(s.state,s.getters)},t,Object.assign({},n))};Gn.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._state.data=e})};Gn.prototype.registerModule=function(e,t,n){n===void 0&&(n={}),typeof e=="string"&&(e=[e]),this._modules.register(e,t),Im(this,this.state,e,this._modules.get(e),n.preserveState),zw(this,this.state)};Gn.prototype.unregisterModule=function(e){var t=this;typeof e=="string"&&(e=[e]),this._modules.unregister(e),this._withCommit(function(){var n=Kw(t.state,e.slice(0,-1));delete n[e[e.length-1]]}),ED(this)};Gn.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),this._modules.isRegistered(e)};Gn.prototype.hotUpdate=function(e){this._modules.update(e),ED(this,!0)};Gn.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t};Object.defineProperties(Gn.prototype,Yw);const ir=DH({state:{animal:{},breed:{},gender:{},color:{},hair:{},address:{},action:{},location:{},coralMonitor:!1,actionList:{},group:[],account:[],payment:[],expenseType:[],config:[],connection:"",battery:0,USB:0,updateAvailable:0,charging:0,status:[]},mutations:{setAccount(i,e){i.account=e},setPayment(i,e){i.payment=e},setExpenseType(i,e){i.expenseType=e},setAnimal(i,e){i.animal=e},setConfig(i,e){i.config=e},setBreed(i,e){i.breed=e},setGender(i,e){i.gender=e},setColor(i,e){i.color=e},setHair(i,e){i.hair=e},setAddress(i,e){i.address=e},setAction(i,e){i.action=e},setConnection(i,e){i.connection=e},setBattery(i,e){i.battery=e},setCharging(i,e){i.charging=e},setUSB(i,e){i.USB=e},setUpdateAvailable(i,e){i.updateAvailable=e},setActionList(i,e){i.actionList=e},setLocation(i,e){i.location=e},setGroup(i,e){i.group=e},setStatus(i,e){i.status=e}},actions:{},getters:{getAge(i){return Math.round((new Date-new Date(i.animal.birthdate))/864e5/365*12)}},modules:{}}),nt=(i,e)=>{const t=i.__vccOpts||i;for(const[n,s]of e)t[n]=s;return t},OH={setup(i){return{groups:i.params.value}}};function PH(i,e,t,n,s,o){const r=de("v-icon"),a=de("v-chip");return me(),kt("span",null,[(me(!0),kt(He,null,Wo(n.groups,l=>(me(),we(a,{class:"coralChip",color:l.color},{default:oe(()=>[b(r,{icon:l.icon},null,8,["icon"]),De(Me(l.title),1)]),_:2},1032,["color"]))),256))])}const IH=nt(OH,[["render",PH]]),MH={setup(i){return{item:i.params.value}}},LH={key:0};function FH(i,e,t,n,s,o){return n.item?(me(),kt("span",LH,Me(Math.round(n.item)),1)):Yt("",!0)}const NH=nt(MH,[["render",FH]]),kH={setup(i){return{item:i.params.value}}},VH={key:0};function GH(i,e,t,n,s,o){return n.item!=null?(me(),kt("span",VH,Me(Math.round(n.item*10)/10),1)):Yt("",!0)}const HH=nt(kH,[["render",GH]]);ir.grid={};ir.grid.state={};const BH={name:"animalOverview",data(){return{columnDefs:null,rowData:null,pinnedRowData:[],gridOptions:{getRowStyle:i=>{if(i.node.rowPinned)return{fontWeight:"bold",color:"white","background-color":"grey"}}}}},components:{AgGridVue:bD,groupCellRenderer:IH,lastSeenCellRenderer:NH,roundCellRenderer:HH},computed:{currentLanguage(){return ir.state.config.language},refresh(){return ir.state.refreshData}},watch:{$route(i,e){console.log("Change Route")},currentLanguage(){this.createColumDefs()},refresh(){ir.state.refreshData&&(console.log("REFRESH"),ir.state.refreshData=null,this.refreshData())}},methods:{createColumDefs(){this.columnDefs=[{field:"label",headerName:Oe("Label"),sortable:!0,checkboxSelection:!0,filter:"agTextColumnFilter",aggFunc:"count",floatingFilter:!0,suppressMenu:!0,headerCheckboxSelection:!0,headerCheckboxSelectionFilteredOnly:!0,width:"135px"},{field:"breedLabel",headerName:Oe("Breed"),sortable:!0,suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"135px"},{field:"statusLabel",headerName:Oe("Status"),sortable:!0,suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"135px"},{field:"weight",headerName:Oe("Weight"),sortable:!0,filter:!0,aggFunc:"sum",suppressMenu:!0,width:"100px"},{field:"gainPerWeek",headerName:Oe("gainPerWeek"),sortable:!0,filter:!0,aggFunc:"sum",suppressMenu:!0,width:"120px",cellRenderer:"roundCellRenderer"},{field:"selectedGroups",width:"300px",sortable:!0,headerName:Oe("Group"),suppressMenu:!0,floatingFilter:!0,filter:"agTextColumnFilter",cellRenderer:"groupCellRenderer",filterValueGetter:i=>{var e="";return i.data.selectedGroups.forEach(t=>{e=e+t.title+","}),e}},{field:"locationLabel",headerName:Oe("Location"),sortable:!0,suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"135px"},{field:"genderLabel",sortable:!0,headerName:Oe("Gender"),suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"135px"},{field:"remark",sortable:!0,headerName:Oe("Remark"),suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"300px"},{field:"lastSeenDays",sortable:!0,headerName:Oe("Seen"),suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,cellRenderer:"lastSeenCellRenderer",width:"100px"},{field:"pregnancyExaminationResult",sortable:!0,headerName:Oe("Eco Result"),suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"150px"},{field:"pregnancyExaminationDays",sortable:!0,headerName:Oe("Eco Days+"),suppressMenu:!0,filter:"agTextColumnFilter",floatingFilter:!0,width:"100px"}]},onGridReady(i){console.log("GRID READY"),ir.grid.gridApi=i.api,console.log(i.api.saveState)},onSelectionChanged(){let i=this.gridOptions.api.getSelectedNodes();ir.state.selectedData=i.map(e=>e.data)},onCellClicked(i){lv(i.data.label),this.$router.push("/animal")},onFilterChanged(){let i=this.gridOptions.api.getDisplayedRowCount()+" "+Oe("Pcs"),e=0;this.gridOptions.api.forEachNodeAfterFilter(t=>{e=e+t.data.weight*1}),this.pinnedRowData=[{breedLabel:i,weight:e}]},refreshData(){var i=this;const e=Os();si(e+"api/animal").then(t=>t.json()).then(function(t){for(var n=0;n<t.length;n++)t[n].selectedGroups=cv(t[n].selectedGroups),t[n].breedLabel=qn("breed",t[n].breedId),t[n].statusLabel=qn("status",t[n].statusId),t[n].hairLabel=qn("hair",t[n].hairId),t[n].genderLabel=qn("gender",t[n].genderId),t[n].colorLabel=qn("color",t[n].colorId);i.rowData=t})}},updated(){this.oldLanguage!=Oe("LANGID")&&(this.oldLanguage=Oe("LANGID"),this.createColumDefs())},beforeMount(){this.pinnedRowData=[{breedLabel:Oe("Pcs"),weight:Oe("KG")}],this.createColumDefs(),this.refreshData()},setup(){const i=xi({new:""});var e="";return{state:i,t:Oe,oldLanguage:e}}},WH={class:"container-fluid"},UH={class:"row"};function jH(i,e,t,n,s,o){const r=de("ag-grid-vue");return me(),kt("div",WH,[pt("div",UH,[b(r,{style:{width:"100%",height:"95vh",margin:"0"},class:"ag-theme-alpine",columnDefs:s.columnDefs,rowData:s.rowData,gridOptions:s.gridOptions,rowSelection:"multiple",pinnedBottomRowData:s.pinnedRowData,onCellClicked:o.onCellClicked,onFilterModified:o.onFilterChanged,onSelectionChanged:o.onSelectionChanged,onModelUpdated:o.onFilterChanged,onGridReady:o.onGridReady},null,8,["columnDefs","rowData","gridOptions","pinnedBottomRowData","onCellClicked","onFilterModified","onSelectionChanged","onModelUpdated","onGridReady"])])])}const $H=nt(BH,[["render",jH]]),zH={name:"herdeView",components:{animalList:$H},setup(){return{}}};function KH(i,e,t,n,s,o){const r=de("animalList");return me(),we(r)}const YH=nt(zH,[["render",KH]]),qH=Aa(),XH={name:"animalDetail",methods:{save(){var i=[];this.selectedGroups.forEach(e=>{i.push(e.value)}),Hy(this.$store.state.animal)}},computed:{breed(){return fi(this.$store.state.breed)},gender(){return fi(this.$store.state.gender)},color(){return fi(this.$store.state.color)},hair(){return fi(this.$store.state.hair)},address(){return av(this.$store.state.address)},location(){return fi(this.$store.state.location)},status(){return fi(this.$store.state.status)},group(){return fi(this.$store.state.group)},selectedGroups:{get(){return cv(this.$store.state.animal.selectedGroups)},set(i){this.selectedGroupsLocal=i;var e=[];i.forEach(t=>{e.push(t.value)}),this.$store.state.animal.selectedGroups=e.toString()}}},data(){return this.$route.params.id&&lv(this.$route.params.id),{tag:[i=>i.length>=3||"Min Length"]}},setup(){return{store:qH,saveAnimal:Hy,t:Oe}}};function QH(i,e,t,n,s,o){const r=de("v-text-field"),a=de("v-col"),l=de("v-select"),c=de("v-row"),u=de("v-icon"),d=de("v-chip"),h=de("v-autocomplete"),f=de("v-btn"),g=de("v-form");return me(),we(g,{id:"form"},{default:oe(()=>[b(c,{dense:""},{default:oe(()=>[b(a,{cols:"12",md:"1",class:"my-0"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.label,"onUpdate:modelValue":e[0]||(e[0]=p=>i.$store.state.animal.label=p),label:n.t("Tag"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.breedId,"onUpdate:modelValue":e[1]||(e[1]=p=>i.$store.state.animal.breedId=p),items:o.breed,label:n.t("Breed"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"1"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.genderId,"onUpdate:modelValue":e[2]||(e[2]=p=>i.$store.state.animal.genderId=p),items:o.gender,label:n.t("Gender"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.statusId,"onUpdate:modelValue":e[3]||(e[3]=p=>i.$store.state.animal.statusId=p),items:o.status,label:n.t("Status"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.age,"onUpdate:modelValue":e[4]||(e[4]=p=>i.$store.state.animal.age=p),label:n.t("Age"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.weight,"onUpdate:modelValue":e[5]||(e[5]=p=>i.$store.state.animal.weight=p),label:n.t("Last Weight"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.colorId,"onUpdate:modelValue":e[6]||(e[6]=p=>i.$store.state.animal.colorId=p),items:o.color,label:n.t("Color"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1})]),_:1}),b(c,{dense:""},{default:oe(()=>[b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.hairId,"onUpdate:modelValue":e[7]||(e[7]=p=>i.$store.state.animal.hairId=p),items:o.hair,label:n.t("Hair"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"2"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.calves,"onUpdate:modelValue":e[8]||(e[8]=p=>i.$store.state.animal.calves=p),label:n.t("Calves"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"1"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.dam,"onUpdate:modelValue":e[9]||(e[9]=p=>i.$store.state.animal.dam=p),label:n.t("Dam"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"1"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.sire,"onUpdate:modelValue":e[10]||(e[10]=p=>i.$store.state.animal.sire=p),label:n.t("Sire"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.sellerId,"onUpdate:modelValue":e[11]||(e[11]=p=>i.$store.state.animal.sellerId=p),items:o.address,label:n.t("Buyer"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.buyerId,"onUpdate:modelValue":e[12]||(e[12]=p=>i.$store.state.animal.buyerId=p),items:o.address,label:n.t("Buyer"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1})]),_:1}),b(c,{dense:""},{default:oe(()=>[b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.dateOfPurchase,"onUpdate:modelValue":e[13]||(e[13]=p=>i.$store.state.animal.dateOfPurchase=p),label:n.t("Purchase"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.dateOfSales,"onUpdate:modelValue":e[14]||(e[14]=p=>i.$store.state.animal.dateOfSales=p),label:n.t("Sales"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(l,{modelValue:i.$store.state.animal.locationId,"onUpdate:modelValue":e[15]||(e[15]=p=>i.$store.state.animal.locationId=p),items:o.location,label:n.t("Location"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.lastSeen,"onUpdate:modelValue":e[16]||(e[16]=p=>i.$store.state.animal.lastSeen=p),label:n.t("Last Seen"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1})]),_:1}),b(c,{dense:""},{default:oe(()=>[b(a,{cols:"12",md:"9"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.warning,"onUpdate:modelValue":e[17]||(e[17]=p=>i.$store.state.animal.warning=p),label:n.t("Warning"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{md:"3"},{default:oe(()=>[(me(),we(h,{items:o.group,modelValue:o.selectedGroups,"onUpdate:modelValue":e[18]||(e[18]=p=>o.selectedGroups=p),multiple:"","return-object":"",label:n.t("Groups"),key:i.$store.state.key},{selection:oe(p=>[b(d,{class:"coralChip",color:p.item.raw.color},{default:oe(()=>[b(u,{icon:p.item.raw.icon},null,8,["icon"]),De(Me(p.item.raw.title),1)]),_:2},1032,["color"])]),_:1},8,["items","modelValue","label"]))]),_:1})]),_:1}),b(c,{dense:""},{default:oe(()=>[b(a,{cols:"12",md:"9"},{default:oe(()=>[(me(),we(r,{modelValue:i.$store.state.animal.remark,"onUpdate:modelValue":e[19]||(e[19]=p=>i.$store.state.animal.remark=p),label:n.t("Remark"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),b(a,{cols:"12",md:"3"},{default:oe(()=>[(me(),we(f,{color:"grey",key:i.$store.state.key},{default:oe(()=>[De(Me(n.t("Cancel")),1)]),_:1})),(me(),we(f,{onClick:e[20]||(e[20]=p=>o.save()),color:"success",key:i.$store.state.key},{default:oe(()=>[De(Me(n.t("Save")),1)]),_:1}))]),_:1})]),_:1})]),_:1})}const ZH=nt(XH,[["render",QH]]),JH={setup(){return{t:Oe}},data:()=>({title:void 0,message:void 0,okButton:void 0,cancelButton:"Go Back",resolvePromise:void 0,rejectPromise:void 0,showMe:!1}),methods:{show(i={}){return this.title=i.title,this.message=i.message,this.okButton=i.okButton,i.cancelButton&&(this.cancelButton=i.cancelButton),this.showMe=!0,new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})},confirm(){this.showMe=!1,this.resolvePromise(!0)},cancel(){this.showMe=!1,this.resolvePromise(!1)}}};function eB(i,e,t,n,s,o){const r=de("v-card-title"),a=de("v-card-text"),l=de("v-spacer"),c=de("v-btn"),u=de("v-card-actions"),d=de("v-card"),h=de("v-dialog"),f=de("v-row");return me(),we(f,{justify:"center"},{default:oe(()=>[b(h,{modelValue:i.showMe,"onUpdate:modelValue":e[2]||(e[2]=g=>i.showMe=g),persistent:"",width:"auto"},{default:oe(()=>[b(d,null,{default:oe(()=>[b(r,{class:"text-h5"},{default:oe(()=>[De(Me(i.title),1)]),_:1}),b(a,null,{default:oe(()=>[De(Me(i.message),1)]),_:1}),b(u,null,{default:oe(()=>[b(l),(me(),we(c,{key:i.$store.state.key,onClick:e[0]||(e[0]=g=>o.cancel()),color:"grey"},{default:oe(()=>[De(Me(n.t("Cancel")),1)]),_:1})),(me(),we(c,{key:i.$store.state.key,onClick:e[1]||(e[1]=g=>o.confirm()),color:"success"},{default:oe(()=>[De(Me(n.t("OK")),1)]),_:1}))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const qw=nt(JH,[["render",eB]]);function S_(i,e,t){tB(i,e),e.set(i,t)}function tB(i,e){if(e.has(i))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iB(i,e,t){var n=PD(i,e,"set");return nB(i,n,t),t}function nB(i,e,t){if(e.set)e.set.call(i,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function ka(i,e){var t=PD(i,e,"get");return sB(i,t)}function PD(i,e,t){if(!e.has(i))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(i)}function sB(i,e){return e.get?e.get.call(i):e.value}function ID(i,e,t){const n=e.length-1;if(n<0)return i===void 0?t:i;for(let s=0;s<n;s++){if(i==null)return t;i=i[e[s]]}return i==null||i[e[n]]===void 0?t:i[e[n]]}function Da(i,e){if(i===e)return!0;if(i instanceof Date&&e instanceof Date&&i.getTime()!==e.getTime()||i!==Object(i)||e!==Object(e))return!1;const t=Object.keys(i);return t.length!==Object.keys(e).length?!1:t.every(n=>Da(i[n],e[n]))}function Yc(i,e,t){return i==null||!e||typeof e!="string"?t:i[e]!==void 0?i[e]:(e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,""),ID(i,e.split("."),t))}function yn(i,e,t){if(e==null)return i===void 0?t:i;if(i!==Object(i)){if(typeof e!="function")return t;const s=e(i,t);return typeof s>"u"?t:s}if(typeof e=="string")return Yc(i,e,t);if(Array.isArray(e))return ID(i,e,t);if(typeof e!="function")return t;const n=e(i,t);return typeof n>"u"?t:n}function qs(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:i},(t,n)=>e+n)}function ke(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(i==null||i===""))return isNaN(+i)?String(i):isFinite(+i)?`${Number(i)}${e}`:void 0}function oy(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function ry(i){return i&&"$el"in i?i.$el:i}const E_=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),ay=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function MD(i){return Object.keys(i)}function Ja(i,e){return e.every(t=>i.hasOwnProperty(t))}function bu(i,e,t){const n=Object.create(null),s=Object.create(null);for(const o in i)e.some(r=>r instanceof RegExp?r.test(o):r===o)&&!(t!=null&&t.some(r=>r===o))?n[o]=i[o]:s[o]=i[o];return[n,s]}function qo(i,e){const t={...i};return e.forEach(n=>delete t[n]),t}function Hl(i){return bu(i,["class","style","id",/^data-/])}function In(i){return i==null?[]:Array.isArray(i)?i:[i]}function Ai(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(e,Math.min(t,i))}function __(i){const e=i.toString().trim();return e.includes(".")?e.length-e.indexOf(".")-1:0}function R_(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return i+t.repeat(Math.max(0,e-i.length))}function oB(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const t=[];let n=0;for(;n<i.length;)t.push(i.substr(n,e)),n+=e;return t}function T_(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(i<e)return`${i} B`;const t=e===1024?["Ki","Mi","Gi"]:["k","M","G"];let n=-1;for(;Math.abs(i)>=e&&n<t.length-1;)i/=e,++n;return`${i.toFixed(1)} ${t[n]}B`}function ys(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const n={};for(const s in i)n[s]=i[s];for(const s in e){const o=i[s],r=e[s];if(oy(o)&&oy(r)){n[s]=ys(o,r,t);continue}if(Array.isArray(o)&&Array.isArray(r)&&t){n[s]=t(o,r);continue}n[s]=r}return n}function LD(i){return i.map(e=>e.type===He?LD(e.children):e).flat()}function ll(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(ll.cache.has(i))return ll.cache.get(i);const e=i.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return ll.cache.set(i,e),e}ll.cache=new Map;function gd(i,e){if(!e||typeof e!="object")return[];if(Array.isArray(e))return e.map(t=>gd(i,t)).flat(1);if(Array.isArray(e.children))return e.children.map(t=>gd(i,t)).flat(1);if(e.component){if(Object.getOwnPropertySymbols(e.component.provides).includes(i))return[e.component];if(e.component.subTree)return gd(i,e.component.subTree).flat(1)}return[]}var Lf=new WeakMap,Zl=new WeakMap;class rB{constructor(e){S_(this,Lf,{writable:!0,value:[]}),S_(this,Zl,{writable:!0,value:0}),this.size=e}push(e){ka(this,Lf)[ka(this,Zl)]=e,iB(this,Zl,(ka(this,Zl)+1)%this.size)}values(){return ka(this,Lf).slice(ka(this,Zl)).concat(ka(this,Lf).slice(0,ka(this,Zl)))}}function aB(i){return"touches"in i?{clientX:i.touches[0].clientX,clientY:i.touches[0].clientY}:{clientX:i.clientX,clientY:i.clientY}}function Xw(i){const e=xi({}),t=z(i);return _n(()=>{for(const n in t.value)e[n]=t.value[n]},{flush:"sync"}),db(e)}function og(i,e){return i.includes(e)}const lB=/^on[^a-z]/,Qw=i=>lB.test(i);function FD(i){return i[2].toLowerCase()+i.slice(3)}const Do=()=>[Function,Array];function x_(i,e){return e="on"+wr(e),!!(i[e]||i[`${e}Once`]||i[`${e}Capture`]||i[`${e}OnceCapture`]||i[`${e}CaptureOnce`])}function Zw(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(Array.isArray(i))for(const s of i)s(...t);else typeof i=="function"&&i(...t)}function Jw(i){const e=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(t=>`${t}:not([tabindex="-1"]):not([disabled])`).join(", ");return[...i.querySelectorAll(e)]}function rg(i,e){var s,o,r;const t=Jw(i),n=t.indexOf(document.activeElement);if(!e)(i===document.activeElement||!i.contains(document.activeElement))&&((s=t[0])==null||s.focus());else if(e==="first")(o=t[0])==null||o.focus();else if(e==="last")(r=t.at(-1))==null||r.focus();else{let a,l=n;const c=e==="next"?1:-1;do l+=c,a=t[l];while((!a||a.offsetParent==null)&&l<t.length&&l>=0);a?a.focus():rg(i,e==="next"?"first":"last")}}function Ff(i){return i==null||typeof i=="string"&&i.trim()===""}function ND(){}const kD=["top","bottom"],cB=["start","end","left","right"];function ly(i,e){let[t,n]=i.split(" ");return n||(n=og(kD,t)?"start":og(cB,t)?"top":"center"),{side:cy(t,e),align:cy(n,e)}}function cy(i,e){return i==="start"?e?"right":"left":i==="end"?e?"left":"right":i}function Fv(i){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[i.side],align:i.align}}function Nv(i){return{side:i.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[i.align]}}function A_(i){return{side:i.align,align:i.side}}function D_(i){return og(kD,i.side)?"y":"x"}class _c{constructor(e){let{x:t,y:n,width:s,height:o}=e;this.x=t,this.y=n,this.width=s,this.height=o}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function O_(i,e){return{x:{before:Math.max(0,e.left-i.left),after:Math.max(0,i.right-e.right)},y:{before:Math.max(0,e.top-i.top),after:Math.max(0,i.bottom-e.bottom)}}}function eS(i){const e=i.getBoundingClientRect(),t=getComputedStyle(i),n=t.transform;if(n){let s,o,r,a,l;if(n.startsWith("matrix3d("))s=n.slice(9,-1).split(/, /),o=+s[0],r=+s[5],a=+s[12],l=+s[13];else if(n.startsWith("matrix("))s=n.slice(7,-1).split(/, /),o=+s[0],r=+s[3],a=+s[4],l=+s[5];else return new _c(e);const c=t.transformOrigin,u=e.x-a-(1-o)*parseFloat(c),d=e.y-l-(1-r)*parseFloat(c.slice(c.indexOf(" ")+1)),h=o?e.width/o:i.offsetWidth+1,f=r?e.height/r:i.offsetHeight+1;return new _c({x:u,y:d,width:h,height:f})}else return new _c(e)}function el(i,e,t){if(typeof i.animate>"u")return{finished:Promise.resolve()};let n;try{n=i.animate(e,t)}catch{return{finished:Promise.resolve()}}return typeof n.finished>"u"&&(n.finished=new Promise(s=>{n.onfinish=()=>{s(n)}})),n}const vp=new WeakMap;function uB(i,e){Object.keys(e).forEach(t=>{if(Qw(t)){const n=FD(t),s=vp.get(i);if(e[t]==null)s==null||s.forEach(o=>{const[r,a]=o;r===n&&(i.removeEventListener(n,a),s.delete(o))});else if(!s||![...s].some(o=>o[0]===n&&o[1]===e[t])){i.addEventListener(n,e[t]);const o=s||new Set;o.add([n,e[t]]),vp.has(i)||vp.set(i,o)}}else e[t]==null?i.removeAttribute(t):i.setAttribute(t,e[t])})}function dB(i,e){Object.keys(e).forEach(t=>{if(Qw(t)){const n=FD(t),s=vp.get(i);s==null||s.forEach(o=>{const[r,a]=o;r===n&&(i.removeEventListener(n,a),s.delete(o))})}else i.removeAttribute(t)})}function hB(i,e){e=Array.isArray(e)?e.slice(0,-1).map(t=>`'${t}'`).join(", ")+` or '${e.at(-1)}'`:`'${e}'`}const ag=.20689655172413793,fB=i=>i>ag**3?Math.cbrt(i):i/(3*ag**2)+4/29,pB=i=>i>ag?i**3:3*ag**2*(i-4/29);function VD(i){const e=fB,t=e(i[1]);return[116*t-16,500*(e(i[0]/.95047)-t),200*(t-e(i[2]/1.08883))]}function GD(i){const e=pB,t=(i[0]+16)/116;return[e(t+i[1]/500)*.95047,e(t),e(t-i[2]/200)*1.08883]}const gB=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],mB=i=>i<=.0031308?i*12.92:1.055*i**(1/2.4)-.055,vB=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],CB=i=>i<=.04045?i/12.92:((i+.055)/1.055)**2.4;function HD(i){const e=Array(3),t=mB,n=gB;for(let s=0;s<3;++s)e[s]=Math.round(Ai(t(n[s][0]*i[0]+n[s][1]*i[1]+n[s][2]*i[2]))*255);return{r:e[0],g:e[1],b:e[2]}}function tS(i){let{r:e,g:t,b:n}=i;const s=[0,0,0],o=CB,r=vB;e=o(e/255),t=o(t/255),n=o(n/255);for(let a=0;a<3;++a)s[a]=r[a][0]*e+r[a][1]*t+r[a][2]*n;return s}function P_(i){return!!i&&/^(#|var\(--|(rgb|hsl)a?\()/.test(i)}const I_=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,yB={rgb:(i,e,t,n)=>({r:i,g:e,b:t,a:n}),rgba:(i,e,t,n)=>({r:i,g:e,b:t,a:n}),hsl:(i,e,t,n)=>M_({h:i,s:e,l:t,a:n}),hsla:(i,e,t,n)=>M_({h:i,s:e,l:t,a:n}),hsv:(i,e,t,n)=>gr({h:i,s:e,v:t,a:n}),hsva:(i,e,t,n)=>gr({h:i,s:e,v:t,a:n})};function rr(i){if(typeof i=="number")return{r:(i&16711680)>>16,g:(i&65280)>>8,b:i&255};if(typeof i=="string"&&I_.test(i)){const{groups:e}=i.match(I_),{fn:t,values:n}=e,s=n.split(/,\s*/).map(o=>o.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(t)?parseFloat(o)/100:parseFloat(o));return yB[t](...s)}else if(typeof i=="string"){let e=i.startsWith("#")?i.slice(1):i;return[3,4].includes(e.length)?e=e.split("").map(t=>t+t).join(""):[6,8].includes(e.length),$D(e)}else if(typeof i=="object"){if(Ja(i,["r","g","b"]))return i;if(Ja(i,["h","s","l"]))return gr(iS(i));if(Ja(i,["h","s","v"]))return gr(i)}throw new TypeError(`Invalid color: ${i==null?i:String(i)||i.constructor.name}
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function gr(i){const{h:e,s:t,v:n,a:s}=i,o=a=>{const l=(a+e/60)%6;return n-n*t*Math.max(Math.min(l,4-l,1),0)},r=[o(5),o(3),o(1)].map(a=>Math.round(a*255));return{r:r[0],g:r[1],b:r[2],a:s}}function M_(i){return gr(iS(i))}function Mm(i){if(!i)return{h:0,s:1,v:1,a:1};const e=i.r/255,t=i.g/255,n=i.b/255,s=Math.max(e,t,n),o=Math.min(e,t,n);let r=0;s!==o&&(s===e?r=60*(0+(t-n)/(s-o)):s===t?r=60*(2+(n-e)/(s-o)):s===n&&(r=60*(4+(e-t)/(s-o)))),r<0&&(r=r+360);const a=s===0?0:(s-o)/s,l=[r,a,s];return{h:l[0],s:l[1],v:l[2],a:i.a}}function BD(i){const{h:e,s:t,v:n,a:s}=i,o=n-n*t/2,r=o===1||o===0?0:(n-o)/Math.min(o,1-o);return{h:e,s:r,l:o,a:s}}function iS(i){const{h:e,s:t,l:n,a:s}=i,o=n+t*Math.min(n,1-n),r=o===0?0:2-2*n/o;return{h:e,s:r,v:o,a:s}}function WD(i){let{r:e,g:t,b:n,a:s}=i;return s===void 0?`rgb(${e}, ${t}, ${n})`:`rgba(${e}, ${t}, ${n}, ${s})`}function UD(i){return WD(gr(i))}function Nf(i){const e=Math.round(i).toString(16);return("00".substr(0,2-e.length)+e).toUpperCase()}function jD(i){let{r:e,g:t,b:n,a:s}=i;return`#${[Nf(e),Nf(t),Nf(n),s!==void 0?Nf(Math.round(s*255)):""].join("")}`}function $D(i){i=wB(i);let[e,t,n,s]=oB(i,2).map(o=>parseInt(o,16));return s=s===void 0?s:s/255,{r:e,g:t,b:n,a:s}}function bB(i){const e=$D(i);return Mm(e)}function zD(i){return jD(gr(i))}function wB(i){return i.startsWith("#")&&(i=i.slice(1)),i=i.replace(/([^0-9a-f])/gi,"F"),(i.length===3||i.length===4)&&(i=i.split("").map(e=>e+e).join("")),i.length!==6&&(i=R_(R_(i,6),8,"F")),i}function SB(i,e){const t=VD(tS(i));return t[0]=t[0]+e*10,HD(GD(t))}function EB(i,e){const t=VD(tS(i));return t[0]=t[0]-e*10,HD(GD(t))}function uy(i){const e=rr(i);return tS(e)[1]}function _B(i,e){const t=uy(i),n=uy(e),s=Math.max(t,n),o=Math.min(t,n);return(s+.05)/(o+.05)}function fe(i,e){return t=>Object.keys(i).reduce((n,s)=>{const r=typeof i[s]=="object"&&i[s]!=null&&!Array.isArray(i[s])?i[s]:{type:i[s]};return t&&s in t?n[s]={...r,default:t[s]}:n[s]=r,e&&!n[s].source&&(n[s].source=e),n},{})}const Ve=fe({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component");function mr(i,e){let t;function n(){t=Og(),t.run(()=>e.length?e(()=>{t==null||t.stop(),n()}):e())}Le(i,s=>{s&&!t?n():s||(t==null||t.stop(),t=void 0)},{immediate:!0}),Mn(()=>{t==null||t.stop()})}const rh=Symbol.for("vuetify:defaults");function RB(i){return Te(i)}function nS(){const i=ct(rh);if(!i)throw new Error("[Vuetify] Could not find defaults instance");return i}function Ci(i,e){const t=nS(),n=Te(i),s=z(()=>{if(Ni(e==null?void 0:e.disabled))return t.value;const r=Ni(e==null?void 0:e.scoped),a=Ni(e==null?void 0:e.reset),l=Ni(e==null?void 0:e.root);let c=ys(n.value,{prev:t.value});if(r)return c;if(a||l){const u=Number(a||1/0);for(let d=0;d<=u&&!(!c||!("prev"in c));d++)c=c.prev;return c&&typeof l=="string"&&l in c&&(c=ys(ys(c,{prev:c}),c[l])),c}return c.prev?ys(c.prev,c):c});return Ht(rh,s),s}function TB(i,e){var t,n;return typeof((t=i.props)==null?void 0:t[e])<"u"||typeof((n=i.props)==null?void 0:n[ll(e)])<"u"}function xB(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nS();const n=Ii("useDefaults");if(e=e??n.type.name??n.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const s=z(()=>{var l;return(l=t.value)==null?void 0:l[i._as??e]}),o=new Proxy(i,{get(l,c){var d,h,f,g;const u=Reflect.get(l,c);return c==="class"||c==="style"?[(d=s.value)==null?void 0:d[c],u].filter(p=>p!=null):typeof c=="string"&&!TB(n.vnode,c)?((h=s.value)==null?void 0:h[c])??((g=(f=t.value)==null?void 0:f.global)==null?void 0:g[c])??u:u}}),r=Fe();_n(()=>{if(s.value){const l=Object.entries(s.value).filter(c=>{let[u]=c;return u.startsWith(u[0].toUpperCase())});l.length&&(r.value=Object.fromEntries(l))}});function a(){mr(r,()=>{var l;Ci(ys(((l=MB(rh))==null?void 0:l.value)??{},r.value))})}return{props:o,provideSubDefaults:a}}function cs(i){if(i._setup=i._setup??i.setup,!i.name)return i;if(i._setup){i.props=fe(i.props??{},i.name)();const e=Object.keys(i.props);i.filterProps=function(n){return bu(n,e,["class","style"])},i.props._as=String,i.setup=function(n,s){const o=nS();if(!o.value)return i._setup(n,s);const{props:r,provideSubDefaults:a}=xB(n,n._as??i.name,o),l=i._setup(r,s);return a(),l}}return i}function Ee(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(i?cs:xl)(e)}function AB(i,e){return e.props=i,e}function fo(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",t=arguments.length>2?arguments[2]:void 0;return Ee()({name:t??wr(Ts(i.replace(/__/g,"-"))),props:{tag:{type:String,default:e},...Ve()},setup(n,s){let{slots:o}=s;return()=>{var r;return ts(n.tag,{class:[i,n.class],style:n.style},(r=o.default)==null?void 0:r.call(o))}}})}function KD(i){if(typeof i.getRootNode!="function"){for(;i.parentNode;)i=i.parentNode;return i!==document?null:document}const e=i.getRootNode();return e!==document&&e.getRootNode({composed:!0})!==document?null:e}const ah="cubic-bezier(0.4, 0, 0.2, 1)",DB="cubic-bezier(0.0, 0, 0.2, 1)",OB="cubic-bezier(0.4, 0, 1, 1)";function Ii(i,e){const t=Sh();if(!t)throw new Error(`[Vuetify] ${i} ${e||"must be called from inside a setup function"}`);return t}function Ar(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const e=Ii(i).type;return ll((e==null?void 0:e.aliasName)||(e==null?void 0:e.name))}let YD=0,Cp=new WeakMap;function hn(){const i=Ii("getUid");if(Cp.has(i))return Cp.get(i);{const e=YD++;return Cp.set(i,e),e}}hn.reset=()=>{YD=0,Cp=new WeakMap};function sS(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;i;){if(e?PB(i):oS(i))return i;i=i.parentElement}return document.scrollingElement}function lg(i,e){const t=[];if(e&&i&&!e.contains(i))return t;for(;i&&(oS(i)&&t.push(i),i!==e);)i=i.parentElement;return t}function oS(i){if(!i||i.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(i);return e.overflowY==="scroll"||e.overflowY==="auto"&&i.scrollHeight>i.clientHeight}function PB(i){if(!i||i.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(i);return["scroll","auto"].includes(e.overflowY)}const yi=typeof window<"u",rS=yi&&"IntersectionObserver"in window,IB=yi&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),dy=yi&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports("selector(:focus-visible)");function MB(i){const{provides:e}=Ii("injectSelf");if(e&&i in e)return e[i]}function LB(i){for(;i;){if(window.getComputedStyle(i).position==="fixed")return!0;i=i.offsetParent}return!1}function _e(i){const e=Ii("useRender");e.render=i}const us=fe({border:[Boolean,Number,String]},"border");function Ns(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return{borderClasses:z(()=>{const n=ii(i)?i.value:i.border,s=[];if(n===!0||n==="")s.push(`${e}--border`);else if(typeof n=="string"||n===0)for(const o of String(n).split(" "))s.push(`border-${o}`);return s})}}const FB=[null,"default","comfortable","compact"],Mi=fe({density:{type:String,default:"default",validator:i=>FB.includes(i)}},"density");function fn(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return{densityClasses:z(()=>`${e}--density-${i.density}`)}}const Li=fe({elevation:{type:[Number,String],validator(i){const e=parseInt(i);return!isNaN(e)&&e>=0&&e<=24}}},"elevation");function Yi(i){return{elevationClasses:z(()=>{const t=ii(i)?i.value:i.elevation,n=[];return t==null||n.push(`elevation-${t}`),n})}}const Zt=fe({rounded:{type:[Boolean,Number,String],default:void 0}},"rounded");function ni(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return{roundedClasses:z(()=>{const n=ii(i)?i.value:i.rounded,s=[];if(n===!0||n==="")s.push(`${e}--rounded`);else if(typeof n=="string"||n===0)for(const o of String(n).split(" "))s.push(`rounded-${o}`);return s})}}const lt=fe({tag:{type:String,default:"div"}},"tag"),Jl=2.4,L_=.2126729,F_=.7151522,N_=.072175,NB=.55,kB=.58,VB=.57,GB=.62,kf=.03,k_=1.45,HB=5e-4,BB=1.25,WB=1.25,V_=.078,G_=12.82051282051282,Vf=.06,H_=.001;function B_(i,e){const t=(i.r/255)**Jl,n=(i.g/255)**Jl,s=(i.b/255)**Jl,o=(e.r/255)**Jl,r=(e.g/255)**Jl,a=(e.b/255)**Jl;let l=t*L_+n*F_+s*N_,c=o*L_+r*F_+a*N_;if(l<=kf&&(l+=(kf-l)**k_),c<=kf&&(c+=(kf-c)**k_),Math.abs(c-l)<HB)return 0;let u;if(c>l){const d=(c**NB-l**kB)*BB;u=d<H_?0:d<V_?d-d*G_*Vf:d-Vf}else{const d=(c**GB-l**VB)*WB;u=d>-H_?0:d>-V_?d-d*G_*Vf:d+Vf}return u*100}const lh=Symbol.for("vuetify:theme"),St=fe({theme:String},"theme"),Nu={defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#6200EE","primary-darken-1":"#3700B3",secondary:"#03DAC6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-variant":"#BDBDBD","on-surface-variant":"#424242",primary:"#BB86FC","primary-darken-1":"#3700B3",secondary:"#03DAC5","secondary-darken-1":"#03DAC5",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}};function UB(){var t,n;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Nu;if(!i)return{...Nu,isDisabled:!0};const e={};for(const[s,o]of Object.entries(i.themes??{})){const r=o.dark||s==="dark"?(t=Nu.themes)==null?void 0:t.dark:(n=Nu.themes)==null?void 0:n.light;e[s]=ys(r,o)}return ys(Nu,{...i,themes:e})}function jB(i){const e=UB(i),t=Te(e.defaultTheme),n=Te(e.themes),s=z(()=>{const u={};for(const[d,h]of Object.entries(n.value)){const f=u[d]={...h,colors:{...h.colors}};if(e.variations)for(const g of e.variations.colors){const p=f.colors[g];if(p)for(const v of["lighten","darken"]){const y=v==="lighten"?SB:EB;for(const C of qs(e.variations[v],1))f.colors[`${g}-${v}-${C}`]=jD(y(rr(p),C))}}for(const g of Object.keys(f.colors)){if(/^on-[a-z]/.test(g)||f.colors[`on-${g}`])continue;const p=`on-${g}`,v=rr(f.colors[g]),y=Math.abs(B_(rr(0),v)),C=Math.abs(B_(rr(16777215),v));f.colors[p]=C>Math.min(y,50)?"#fff":"#000"}}return u}),o=z(()=>s.value[t.value]),r=z(()=>{const u=[];o.value.dark&&Va(u,":root",["color-scheme: dark"]),Va(u,":root",W_(o.value));for(const[g,p]of Object.entries(s.value))Va(u,`.v-theme--${g}`,[`color-scheme: ${p.dark?"dark":"normal"}`,...W_(p)]);const d=[],h=[],f=new Set(Object.values(s.value).flatMap(g=>Object.keys(g.colors)));for(const g of f)/^on-[a-z]/.test(g)?Va(h,`.${g}`,[`color: rgb(var(--v-theme-${g})) !important`]):(Va(d,`.bg-${g}`,[`--v-theme-overlay-multiplier: var(--v-theme-${g}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${g})) !important`,`color: rgb(var(--v-theme-on-${g})) !important`]),Va(h,`.text-${g}`,[`color: rgb(var(--v-theme-${g})) !important`]),Va(h,`.border-${g}`,[`--v-border-color: var(--v-theme-${g})`]));return u.push(...d,...h),u.map((g,p)=>p===0?g:` ${g}`).join("")});function a(){return{style:[{children:r.value,id:"vuetify-theme-stylesheet",nonce:e.cspNonce||!1}]}}function l(u){if(e.isDisabled)return;const d=u._context.provides.usehead;if(d)if(d.push){const f=d.push(a);Le(r,()=>{f.patch(a)})}else yi?(d.addHeadObjs(z(a)),_n(()=>d.updateDOM())):d.addHeadObjs(a());else{let g=function(){if(typeof document<"u"&&!f){const p=document.createElement("style");p.type="text/css",p.id="vuetify-theme-stylesheet",e.cspNonce&&p.setAttribute("nonce",e.cspNonce),f=p,document.head.appendChild(f)}f&&(f.innerHTML=r.value)};var h=g;let f=yi?document.getElementById("vuetify-theme-stylesheet"):null;Le(r,g,{immediate:!0})}}const c=z(()=>e.isDisabled?void 0:`v-theme--${t.value}`);return{install:l,isDisabled:e.isDisabled,name:t,themes:n,current:o,computedThemes:s,themeClasses:c,styles:r,global:{name:t,current:o}}}function Pt(i){Ii("provideTheme");const e=ct(lh,null);if(!e)throw new Error("Could not find Vuetify theme injection");const t=z(()=>i.theme??(e==null?void 0:e.name.value)),n=z(()=>e.isDisabled?void 0:`v-theme--${t.value}`),s={...e,name:t,themeClasses:n};return Ht(lh,s),s}function qD(){Ii("useTheme");const i=ct(lh,null);if(!i)throw new Error("Could not find Vuetify theme injection");return i}function Va(i,e,t){i.push(`${e} {
`,...t.map(n=>` ${n};
`),`}
`)}function W_(i){const e=i.dark?2:1,t=i.dark?1:2,n=[];for(const[s,o]of Object.entries(i.colors)){const r=rr(o);n.push(`--v-theme-${s}: ${r.r},${r.g},${r.b}`),s.startsWith("on-")||n.push(`--v-theme-${s}-overlay-multiplier: ${uy(o)>.18?e:t}`)}for(const[s,o]of Object.entries(i.variables)){const r=typeof o=="string"&&o.startsWith("#")?rr(o):void 0,a=r?`${r.r}, ${r.g}, ${r.b}`:void 0;n.push(`--v-${s}: ${a??o}`)}return n}function aS(i){return Xw(()=>{const e=[],t={};return i.value.background&&(P_(i.value.background)?t.backgroundColor=i.value.background:e.push(`bg-${i.value.background}`)),i.value.text&&(P_(i.value.text)?(t.color=i.value.text,t.caretColor=i.value.text):e.push(`text-${i.value.text}`)),{colorClasses:e,colorStyles:t}})}function cn(i,e){const t=z(()=>({text:ii(i)?i.value:e?i[e]:null})),{colorClasses:n,colorStyles:s}=aS(t);return{textColorClasses:n,textColorStyles:s}}function di(i,e){const t=z(()=>({background:ii(i)?i.value:e?i[e]:null})),{colorClasses:n,colorStyles:s}=aS(t);return{backgroundColorClasses:n,backgroundColorStyles:s}}const $B=["elevated","flat","tonal","outlined","text","plain"];function Bl(i,e){return b(He,null,[i&&b("span",{key:"overlay",class:`${e}__overlay`},null),b("span",{key:"underlay",class:`${e}__underlay`},null)])}const ks=fe({color:String,variant:{type:String,default:"elevated",validator:i=>$B.includes(i)}},"variant");function Wl(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();const t=z(()=>{const{variant:o}=Ni(i);return`${e}--variant-${o}`}),{colorClasses:n,colorStyles:s}=aS(z(()=>{const{variant:o,color:r}=Ni(i);return{[["elevated","flat"].includes(o)?"background":"text"]:r}}));return{colorClasses:n,colorStyles:s,variantClasses:t}}const XD=fe({divided:Boolean,...us(),...Ve(),...Mi(),...Li(),...Zt(),...lt(),...St(),...ks()},"VBtnGroup"),hy=Ee()({name:"VBtnGroup",props:XD(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{densityClasses:s}=fn(i),{borderClasses:o}=Ns(i),{elevationClasses:r}=Yi(i),{roundedClasses:a}=ni(i);Ci({VBtn:{height:"auto",color:Se(i,"color"),density:Se(i,"density"),flat:!0,variant:Se(i,"variant")}}),_e(()=>b(i.tag,{class:["v-btn-group",{"v-btn-group--divided":i.divided},n.value,o.value,s.value,r.value,a.value,i.class],style:i.style},t))}});function Ke(i,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const o=Ii("useProxiedModel"),r=Te(i[e]!==void 0?i[e]:t),a=ll(e),c=z(a!==e?()=>{var d,h,f,g;return i[e],!!(((d=o.vnode.props)!=null&&d.hasOwnProperty(e)||(h=o.vnode.props)!=null&&h.hasOwnProperty(a))&&((f=o.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${e}`)||(g=o.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,h;return i[e],!!((d=o.vnode.props)!=null&&d.hasOwnProperty(e)&&((h=o.vnode.props)!=null&&h.hasOwnProperty(`onUpdate:${e}`)))});mr(()=>!c.value,()=>{Le(()=>i[e],d=>{r.value=d})});const u=z({get(){const d=i[e];return n(c.value?d:r.value)},set(d){const h=s(d),f=it(c.value?i[e]:r.value);f===h||n(f)===d||(r.value=h,o==null||o.emit(`update:${e}`,h))}});return Object.defineProperty(u,"externalValue",{get:()=>c.value?i[e]:r.value}),u}const wu=fe({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Su=fe({value:null,disabled:Boolean,selectedClass:String},"group-item");function Eu(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const n=Ii("useGroupItem");if(!n)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=hn();Ht(Symbol.for(`${e.description}:id`),s);const o=ct(e,null);if(!o){if(!t)return o;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${e.description}`)}const r=Se(i,"value"),a=z(()=>o.disabled.value||i.disabled);o.register({id:s,value:r,disabled:a},n),dn(()=>{o.unregister(s)});const l=z(()=>o.isSelected(s)),c=z(()=>l.value&&[o.selectedClass.value,i.selectedClass]);return Le(l,u=>{n.emit("group:selected",{value:u})}),{id:s,isSelected:l,toggle:()=>o.select(s,!l.value),select:u=>o.select(s,u),selectedClass:c,value:r,disabled:a,group:o}}function Ul(i,e){let t=!1;const n=xi([]),s=Ke(i,"modelValue",[],h=>h==null?[]:QD(n,In(h)),h=>{const f=KB(n,h);return i.multiple?f:f[0]}),o=Ii("useGroup");function r(h,f){const g=h,p=Symbol.for(`${e.description}:id`),y=gd(p,o==null?void 0:o.vnode).indexOf(f);y>-1?n.splice(y,0,g):n.push(g)}function a(h){if(t)return;l();const f=n.findIndex(g=>g.id===h);n.splice(f,1)}function l(){const h=n.find(f=>!f.disabled);h&&i.mandatory==="force"&&!s.value.length&&(s.value=[h.id])}Pi(()=>{l()}),dn(()=>{t=!0});function c(h,f){const g=n.find(p=>p.id===h);if(!(f&&(g!=null&&g.disabled)))if(i.multiple){const p=s.value.slice(),v=p.findIndex(C=>C===h),y=~v;if(f=f??!y,y&&i.mandatory&&p.length<=1||!y&&i.max!=null&&p.length+1>i.max)return;v<0&&f?p.push(h):v>=0&&!f&&p.splice(v,1),s.value=p}else{const p=s.value.includes(h);if(i.mandatory&&p)return;s.value=f??!p?[h]:[]}}function u(h){if(i.multiple,s.value.length){const f=s.value[0],g=n.findIndex(y=>y.id===f);let p=(g+h)%n.length,v=n[p];for(;v.disabled&&p!==g;)p=(p+h)%n.length,v=n[p];if(v.disabled)return;s.value=[n[p].id]}else{const f=n.find(g=>!g.disabled);f&&(s.value=[f.id])}}const d={register:r,unregister:a,selected:s,select:c,disabled:Se(i,"disabled"),prev:()=>u(n.length-1),next:()=>u(1),isSelected:h=>s.value.includes(h),selectedClass:z(()=>i.selectedClass),items:z(()=>n),getItemIndex:h=>zB(n,h)};return Ht(e,d),d}function zB(i,e){const t=QD(i,[e]);return t.length?i.findIndex(n=>n.id===t[0]):-1}function QD(i,e){const t=[];return e.forEach(n=>{const s=i.find(r=>Da(n,r.value)),o=i[n];(s==null?void 0:s.value)!=null?t.push(s.id):o!=null&&t.push(o.id)}),t}function KB(i,e){const t=[];return e.forEach(n=>{const s=i.findIndex(o=>o.id===n);if(~s){const o=i[s];t.push(o.value!=null?o.value:s)}}),t}const lS=Symbol.for("vuetify:v-btn-toggle"),YB=fe({...XD(),...wu()},"VBtnToggle"),qB=Ee()({name:"VBtnToggle",props:YB(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{isSelected:n,next:s,prev:o,select:r,selected:a}=Ul(i,lS);return _e(()=>{const[l]=hy.filterProps(i);return b(hy,Ie({class:["v-btn-toggle",i.class]},l,{style:i.style}),{default:()=>{var c;return[(c=t.default)==null?void 0:c.call(t,{isSelected:n,next:s,prev:o,select:r,selected:a})]}})}),{next:s,prev:o,select:r}}}),XB=fe({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Nt=Ee(!1)({name:"VDefaultsProvider",props:XB(),setup(i,e){let{slots:t}=e;const{defaults:n,disabled:s,reset:o,root:r,scoped:a}=db(i);return Ci(n,{reset:o,root:r,scoped:a,disabled:s}),()=>{var l;return(l=t.default)==null?void 0:l.call(t)}}});const QB={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar"},ZB={component:i=>ts(uS,{...i,class:"mdi"})},tt=[String,Function,Object,Array],fy=Symbol.for("vuetify:icons"),Lm=fe({icon:{type:tt},tag:{type:String,required:!0}},"icon"),py=Ee()({name:"VComponentIcon",props:Lm(),setup(i,e){let{slots:t}=e;return()=>{const n=i.icon;return b(i.tag,null,{default:()=>{var s;return[i.icon?b(n,null,null):(s=t.default)==null?void 0:s.call(t)]}})}}}),cS=cs({name:"VSvgIcon",inheritAttrs:!1,props:Lm(),setup(i,e){let{attrs:t}=e;return()=>b(i.tag,Ie(t,{style:null}),{default:()=>[b("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(i.icon)?i.icon.map(n=>Array.isArray(n)?b("path",{d:n[0],"fill-opacity":n[1]},null):b("path",{d:n},null)):b("path",{d:i.icon},null)])]})}}),JB=cs({name:"VLigatureIcon",props:Lm(),setup(i){return()=>b(i.tag,null,{default:()=>[i.icon]})}}),uS=cs({name:"VClassIcon",props:Lm(),setup(i){return()=>b(i.tag,{class:i.icon},null)}}),eW={svg:{component:cS},class:{component:uS}};function tW(i){return ys({defaultSet:"mdi",sets:{...eW,mdi:ZB},aliases:{...QB,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},i)}const iW=i=>{const e=ct(fy);if(!e)throw new Error("Missing Vuetify Icons provide!");return{iconData:z(()=>{var l;const n=Ni(i);if(!n)return{component:py};let s=n;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=e.aliases)==null?void 0:l[s.slice(1)])),!s)throw new Error(`Could not find aliased icon "${n}"`);if(Array.isArray(s))return{component:cS,icon:s};if(typeof s!="string")return{component:py,icon:s};const o=Object.keys(e.sets).find(c=>typeof s=="string"&&s.startsWith(`${c}:`)),r=o?s.slice(o.length+1):s;return{component:e.sets[o??e.defaultSet].component,icon:r}})}},nW=["x-small","small","default","large","x-large"],Dr=fe({size:{type:[String,Number],default:"default"}},"size");function _u(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return Xw(()=>{let t,n;return og(nW,i.size)?t=`${e}--size-${i.size}`:i.size&&(n={width:ke(i.size),height:ke(i.size)}),{sizeClasses:t,sizeStyles:n}})}const sW=fe({color:String,start:Boolean,end:Boolean,icon:tt,...Ve(),...Dr(),...lt({tag:"i"}),...St()},"VIcon"),Gt=Ee()({name:"VIcon",props:sW(),setup(i,e){let{attrs:t,slots:n}=e;const s=Te(),{themeClasses:o}=Pt(i),{iconData:r}=iW(z(()=>s.value||i.icon)),{sizeClasses:a}=_u(i),{textColorClasses:l,textColorStyles:c}=cn(Se(i,"color"));return _e(()=>{var d,h;const u=(d=n.default)==null?void 0:d.call(n);return u&&(s.value=(h=LD(u).filter(f=>f.type===wh&&f.children&&typeof f.children=="string")[0])==null?void 0:h.children),b(r.value.component,{tag:i.tag,icon:r.value.icon,class:["v-icon","notranslate",o.value,a.value,l.value,{"v-icon--clickable":!!t.onClick,"v-icon--start":i.start,"v-icon--end":i.end},i.class],style:[a.value?void 0:{fontSize:ke(i.size),height:ke(i.size),width:ke(i.size)},c.value,i.style],role:t.onClick?"button":void 0,"aria-hidden":!t.onClick},{default:()=>[u]})}),{}}});function dS(i,e){const t=Te(),n=Fe(!1);if(rS){const s=new IntersectionObserver(o=>{i==null||i(o,s),n.value=!!o.find(r=>r.isIntersecting)},e);dn(()=>{s.disconnect()}),Le(t,(o,r)=>{r&&(s.unobserve(r),n.value=!1),o&&s.observe(o)},{flush:"post"})}return{intersectionRef:t,isIntersecting:n}}function Bo(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const t=Te(),n=Te();if(yi){const s=new ResizeObserver(o=>{i==null||i(o,s),o.length&&(e==="content"?n.value=o[0].contentRect:n.value=o[0].target.getBoundingClientRect())});dn(()=>{s.disconnect()}),Le(t,(o,r)=>{r&&(s.unobserve(ry(r)),n.value=void 0),o&&s.observe(ry(o))},{flush:"post"})}return{resizeRef:t,contentRect:bh(n)}}const oW=fe({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ve(),...Dr(),...lt({tag:"div"}),...St()},"VProgressCircular"),hS=Ee()({name:"VProgressCircular",props:oW(),setup(i,e){let{slots:t}=e;const n=20,s=2*Math.PI*n,o=Te(),{themeClasses:r}=Pt(i),{sizeClasses:a,sizeStyles:l}=_u(i),{textColorClasses:c,textColorStyles:u}=cn(Se(i,"color")),{textColorClasses:d,textColorStyles:h}=cn(Se(i,"bgColor")),{intersectionRef:f,isIntersecting:g}=dS(),{resizeRef:p,contentRect:v}=Bo(),y=z(()=>Math.max(0,Math.min(100,parseFloat(i.modelValue)))),C=z(()=>Number(i.width)),m=z(()=>l.value?Number(i.size):v.value?v.value.width:Math.max(C.value,32)),w=z(()=>n/(1-C.value/m.value)*2),E=z(()=>C.value/m.value*w.value),R=z(()=>ke((100-y.value)/100*s));return _n(()=>{f.value=o.value,p.value=o.value}),_e(()=>b(i.tag,{ref:o,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!i.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":i.indeterminate==="disable-shrink"},r.value,a.value,c.value,i.class],style:[l.value,u.value,i.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":i.indeterminate?void 0:y.value},{default:()=>[b("svg",{style:{transform:`rotate(calc(-90deg + ${Number(i.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${w.value} ${w.value}`},[b("circle",{class:["v-progress-circular__underlay",d.value],style:h.value,fill:"transparent",cx:"50%",cy:"50%",r:n,"stroke-width":E.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),b("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:n,"stroke-width":E.value,"stroke-dasharray":s,"stroke-dashoffset":R.value},null)]),t.default&&b("div",{class:"v-progress-circular__content"},[t.default({value:y.value})])]})),{}}}),Vs=fe({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Gs(i){return{dimensionStyles:z(()=>({height:ke(i.height),maxHeight:ke(i.maxHeight),maxWidth:ke(i.maxWidth),minHeight:ke(i.minHeight),minWidth:ke(i.minWidth),width:ke(i.width)}))}}const rW={badge:"Badge",close:"Close",dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{ok:"OK",cancel:"Cancel",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},aW={af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1},U_="$vuetify.",j_=(i,e)=>i.replace(/\{(\d+)\}/g,(t,n)=>String(e[+n])),ZD=(i,e,t)=>function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),r=1;r<s;r++)o[r-1]=arguments[r];if(!n.startsWith(U_))return j_(n,o);const a=n.replace(U_,""),l=i.value&&t.value[i.value],c=e.value&&t.value[e.value];let u=Yc(l,a,null);return u||(`${n}${i.value}`,u=Yc(c,a,null)),u||(u=n),typeof u!="string"&&(u=n),j_(u,o)};function JD(i,e){return(t,n)=>new Intl.NumberFormat([i.value,e.value],n).format(t)}function kv(i,e,t){const n=Ke(i,e,i[e]??t.value);return n.value=i[e]??t.value,Le(t,s=>{i[e]==null&&(n.value=t.value)}),n}function eO(i){return e=>{const t=kv(e,"locale",i.current),n=kv(e,"fallback",i.fallback),s=kv(e,"messages",i.messages);return{name:"vuetify",current:t,fallback:n,messages:s,t:ZD(t,n,s),n:JD(t,n),provide:eO({current:t,fallback:n,messages:s})}}}function lW(i){const e=Fe((i==null?void 0:i.locale)??"en"),t=Fe((i==null?void 0:i.fallback)??"en"),n=Te({en:rW,...i==null?void 0:i.messages});return{name:"vuetify",current:e,fallback:t,messages:n,t:ZD(e,t,n),n:JD(e,t),provide:eO({current:e,fallback:t,messages:n})}}const qc=Symbol.for("vuetify:locale");function cW(i){return i.name!=null}function uW(i){const e=i!=null&&i.adapter&&cW(i==null?void 0:i.adapter)?i==null?void 0:i.adapter:lW(i),t=hW(e,i);return{...e,...t}}function Rn(){const i=ct(qc);if(!i)throw new Error("[Vuetify] Could not find injected locale instance");return i}function dW(i){const e=ct(qc);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");const t=e.provide(i),n=fW(t,e.rtl,i),s={...t,...n};return Ht(qc,s),s}function hW(i,e){const t=Te((e==null?void 0:e.rtl)??aW),n=z(()=>t.value[i.current.value]??!1);return{isRtl:n,rtl:t,rtlClasses:z(()=>`v-locale--is-${n.value?"rtl":"ltr"}`)}}function fW(i,e,t){const n=z(()=>t.rtl??e.value[i.current.value]??!1);return{isRtl:n,rtl:e,rtlClasses:z(()=>`v-locale--is-${n.value?"rtl":"ltr"}`)}}function Bi(){const i=ct(qc);if(!i)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:i.isRtl,rtlClasses:i.rtlClasses}}const $_={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Oa=fe({location:String},"location");function Pa(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=arguments.length>2?arguments[2]:void 0;const{isRtl:n}=Bi();return{locationStyles:z(()=>{if(!i.location)return{};const{side:o,align:r}=ly(i.location.split(" ").length>1?i.location:`${i.location} center`,n.value);function a(c){return t?t(c):0}const l={};return o!=="center"&&(e?l[$_[o]]=`calc(100% - ${a(o)}px)`:l[o]=0),r!=="center"?e?l[$_[r]]=`calc(100% - ${a(r)}px)`:l[r]=0:(o==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[o]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[o]),l})}}const pW=fe({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...Ve(),...Oa({location:"top"}),...Zt(),...lt(),...St()},"VProgressLinear"),fS=Ee()({name:"VProgressLinear",props:pW(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{isRtl:s,rtlClasses:o}=Bi(),{themeClasses:r}=Pt(i),{locationStyles:a}=Pa(i),{textColorClasses:l,textColorStyles:c}=cn(i,"color"),{backgroundColorClasses:u,backgroundColorStyles:d}=di(z(()=>i.bgColor||i.color)),{backgroundColorClasses:h,backgroundColorStyles:f}=di(i,"color"),{roundedClasses:g}=ni(i),{intersectionRef:p,isIntersecting:v}=dS(),y=z(()=>parseInt(i.max,10)),C=z(()=>parseInt(i.height,10)),m=z(()=>parseFloat(i.bufferValue)/y.value*100),w=z(()=>parseFloat(n.value)/y.value*100),E=z(()=>s.value!==i.reverse),R=z(()=>i.indeterminate?"fade-transition":"slide-x-transition"),O=z(()=>i.bgOpacity==null?i.bgOpacity:parseFloat(i.bgOpacity));function A(D){if(!p.value)return;const{left:L,right:S,width:x}=p.value.getBoundingClientRect(),T=E.value?x-D.clientX+(S-x):D.clientX-L;n.value=Math.round(T/x*y.value)}return _e(()=>b(i.tag,{ref:p,class:["v-progress-linear",{"v-progress-linear--absolute":i.absolute,"v-progress-linear--active":i.active&&v.value,"v-progress-linear--reverse":E.value,"v-progress-linear--rounded":i.rounded,"v-progress-linear--rounded-bar":i.roundedBar,"v-progress-linear--striped":i.striped},g.value,r.value,o.value,i.class],style:[{bottom:i.location==="bottom"?0:void 0,top:i.location==="top"?0:void 0,height:i.active?ke(C.value):0,"--v-progress-linear-height":ke(C.value),...a.value},i.style],role:"progressbar","aria-hidden":i.active?"false":"true","aria-valuemin":"0","aria-valuemax":i.max,"aria-valuenow":i.indeterminate?void 0:w.value,onClick:i.clickable&&A},{default:()=>[i.stream&&b("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...c.value,[E.value?"left":"right"]:ke(-C.value),borderTop:`${ke(C.value/2)} dotted`,opacity:O.value,top:`calc(50% - ${ke(C.value/4)})`,width:ke(100-m.value,"%"),"--v-progress-linear-stream-to":ke(C.value*(E.value?1:-1))}},null),b("div",{class:["v-progress-linear__background",u.value],style:[d.value,{opacity:O.value,width:ke(i.stream?m.value:100,"%")}]},null),b(Po,{name:R.value},{default:()=>[i.indeterminate?b("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(D=>b("div",{key:D,class:["v-progress-linear__indeterminate",D,h.value],style:f.value},null))]):b("div",{class:["v-progress-linear__determinate",h.value],style:[f.value,{width:ke(w.value,"%")}]},null)]}),t.default&&b("div",{class:"v-progress-linear__content"},[t.default({value:w.value,buffer:m.value})])]})),{}}}),Fm=fe({loading:[Boolean,String]},"loader");function uf(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return{loaderClasses:z(()=>({[`${e}--loading`]:i.loading}))}}function Nm(i,e){var n;let{slots:t}=e;return b("div",{class:`${i.name}__loader`},[((n=t.default)==null?void 0:n.call(t,{color:i.color,isActive:i.active}))||b(fS,{active:i.active,color:i.color,height:"2",indeterminate:!0},null)])}const gW=["static","relative","fixed","absolute","sticky"],Ru=fe({position:{type:String,validator:i=>gW.includes(i)}},"position");function Tu(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();return{positionClasses:z(()=>i.position?`${e}--${i.position}`:void 0)}}function tO(){var i,e;return(e=(i=Ii("useRouter"))==null?void 0:i.proxy)==null?void 0:e.$router}function df(i,e){const t=NL("RouterLink"),n=z(()=>!!(i.href||i.to)),s=z(()=>(n==null?void 0:n.value)||x_(e,"click")||x_(i,"click"));if(typeof t=="string")return{isLink:n,isClickable:s,href:Se(i,"href")};const o=i.to?t.useLink(i):void 0;return{isLink:n,isClickable:s,route:o==null?void 0:o.route,navigate:o==null?void 0:o.navigate,isActive:o&&z(()=>{var r,a;return i.exact?(r=o.isExactActive)==null?void 0:r.value:(a=o.isActive)==null?void 0:a.value}),href:z(()=>i.to?o==null?void 0:o.route.value.href:i.href)}}const hf=fe({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Vv=!1;function mW(i,e){let t=!1,n,s;yi&&(Wt(()=>{window.addEventListener("popstate",o),n=i==null?void 0:i.beforeEach((r,a,l)=>{Vv?t?e(l):l():setTimeout(()=>t?e(l):l()),Vv=!0}),s=i==null?void 0:i.afterEach(()=>{Vv=!1})}),Mn(()=>{window.removeEventListener("popstate",o),n==null||n(),s==null||s()}));function o(r){var a;(a=r.state)!=null&&a.replaced||(t=!0,setTimeout(()=>t=!1))}}function vW(i,e){Le(()=>{var t;return(t=i.isActive)==null?void 0:t.value},t=>{i.isLink.value&&t&&e&&Wt(()=>{e(!0)})},{immediate:!0})}const gy=Symbol("rippleStop"),CW=80;function z_(i,e){i.style.transform=e,i.style.webkitTransform=e}function my(i){return i.constructor.name==="TouchEvent"}function iO(i){return i.constructor.name==="KeyboardEvent"}const yW=function(i,e){var d;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=0,s=0;if(!iO(i)){const h=e.getBoundingClientRect(),f=my(i)?i.touches[i.touches.length-1]:i;n=f.clientX-h.left,s=f.clientY-h.top}let o=0,r=.3;(d=e._ripple)!=null&&d.circle?(r=.15,o=e.clientWidth/2,o=t.center?o:o+Math.sqrt((n-o)**2+(s-o)**2)/4):o=Math.sqrt(e.clientWidth**2+e.clientHeight**2)/2;const a=`${(e.clientWidth-o*2)/2}px`,l=`${(e.clientHeight-o*2)/2}px`,c=t.center?a:`${n-o}px`,u=t.center?l:`${s-o}px`;return{radius:o,scale:r,x:c,y:u,centerX:a,centerY:l}},cg={show(i,e){var f;let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((f=e==null?void 0:e._ripple)!=null&&f.enabled))return;const n=document.createElement("span"),s=document.createElement("span");n.appendChild(s),n.className="v-ripple__container",t.class&&(n.className+=` ${t.class}`);const{radius:o,scale:r,x:a,y:l,centerX:c,centerY:u}=yW(i,e,t),d=`${o*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,e.appendChild(n);const h=window.getComputedStyle(e);h&&h.position==="static"&&(e.style.position="relative",e.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),z_(s,`translate(${a}, ${l}) scale3d(${r},${r},${r})`),s.dataset.activated=String(performance.now()),setTimeout(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),z_(s,`translate(${c}, ${u}) scale3d(1,1,1)`)},0)},hide(i){var o;if(!((o=i==null?void 0:i._ripple)!=null&&o.enabled))return;const e=i.getElementsByClassName("v-ripple__animation");if(e.length===0)return;const t=e[e.length-1];if(t.dataset.isHiding)return;t.dataset.isHiding="true";const n=performance.now()-Number(t.dataset.activated),s=Math.max(250-n,0);setTimeout(()=>{t.classList.remove("v-ripple__animation--in"),t.classList.add("v-ripple__animation--out"),setTimeout(()=>{var a;i.getElementsByClassName("v-ripple__animation").length===1&&i.dataset.previousPosition&&(i.style.position=i.dataset.previousPosition,delete i.dataset.previousPosition),((a=t.parentNode)==null?void 0:a.parentNode)===i&&i.removeChild(t.parentNode)},300)},s)}};function nO(i){return typeof i>"u"||!!i}function ch(i){const e={},t=i.currentTarget;if(!(!(t!=null&&t._ripple)||t._ripple.touched||i[gy])){if(i[gy]=!0,my(i))t._ripple.touched=!0,t._ripple.isTouch=!0;else if(t._ripple.isTouch)return;if(e.center=t._ripple.centered||iO(i),t._ripple.class&&(e.class=t._ripple.class),my(i)){if(t._ripple.showTimerCommit)return;t._ripple.showTimerCommit=()=>{cg.show(i,t,e)},t._ripple.showTimer=window.setTimeout(()=>{var n;(n=t==null?void 0:t._ripple)!=null&&n.showTimerCommit&&(t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null)},CW)}else cg.show(i,t,e)}}function K_(i){i[gy]=!0}function Yn(i){const e=i.currentTarget;if(e!=null&&e._ripple){if(window.clearTimeout(e._ripple.showTimer),i.type==="touchend"&&e._ripple.showTimerCommit){e._ripple.showTimerCommit(),e._ripple.showTimerCommit=null,e._ripple.showTimer=window.setTimeout(()=>{Yn(i)});return}window.setTimeout(()=>{e._ripple&&(e._ripple.touched=!1)}),cg.hide(e)}}function sO(i){const e=i.currentTarget;e!=null&&e._ripple&&(e._ripple.showTimerCommit&&(e._ripple.showTimerCommit=null),window.clearTimeout(e._ripple.showTimer))}let uh=!1;function oO(i){!uh&&(i.keyCode===E_.enter||i.keyCode===E_.space)&&(uh=!0,ch(i))}function rO(i){uh=!1,Yn(i)}function aO(i){uh&&(uh=!1,Yn(i))}function lO(i,e,t){const{value:n,modifiers:s}=e,o=nO(n);if(o||cg.hide(i),i._ripple=i._ripple??{},i._ripple.enabled=o,i._ripple.centered=s.center,i._ripple.circle=s.circle,oy(n)&&n.class&&(i._ripple.class=n.class),o&&!t){if(s.stop){i.addEventListener("touchstart",K_,{passive:!0}),i.addEventListener("mousedown",K_);return}i.addEventListener("touchstart",ch,{passive:!0}),i.addEventListener("touchend",Yn,{passive:!0}),i.addEventListener("touchmove",sO,{passive:!0}),i.addEventListener("touchcancel",Yn),i.addEventListener("mousedown",ch),i.addEventListener("mouseup",Yn),i.addEventListener("mouseleave",Yn),i.addEventListener("keydown",oO),i.addEventListener("keyup",rO),i.addEventListener("blur",aO),i.addEventListener("dragstart",Yn,{passive:!0})}else!o&&t&&cO(i)}function cO(i){i.removeEventListener("mousedown",ch),i.removeEventListener("touchstart",ch),i.removeEventListener("touchend",Yn),i.removeEventListener("touchmove",sO),i.removeEventListener("touchcancel",Yn),i.removeEventListener("mouseup",Yn),i.removeEventListener("mouseleave",Yn),i.removeEventListener("keydown",oO),i.removeEventListener("keyup",rO),i.removeEventListener("dragstart",Yn),i.removeEventListener("blur",aO)}function bW(i,e){lO(i,e,!1)}function wW(i){delete i._ripple,cO(i)}function SW(i,e){if(e.value===e.oldValue)return;const t=nO(e.oldValue);lO(i,e,t)}const Ia={mounted:bW,unmounted:wW,updated:SW},pS=fe({active:{type:Boolean,default:void 0},symbol:{type:null,default:lS},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:tt,appendIcon:tt,block:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:String,...us(),...Ve(),...Mi(),...Vs(),...Li(),...Su(),...Fm(),...Oa(),...Ru(),...Zt(),...hf(),...Dr(),...lt({tag:"button"}),...St(),...ks({variant:"elevated"})},"VBtn"),pi=Ee()({name:"VBtn",directives:{Ripple:Ia},props:pS(),emits:{"group:selected":i=>!0},setup(i,e){let{attrs:t,slots:n}=e;const{themeClasses:s}=Pt(i),{borderClasses:o}=Ns(i),{colorClasses:r,colorStyles:a,variantClasses:l}=Wl(i),{densityClasses:c}=fn(i),{dimensionStyles:u}=Gs(i),{elevationClasses:d}=Yi(i),{loaderClasses:h}=uf(i),{locationStyles:f}=Pa(i),{positionClasses:g}=Tu(i),{roundedClasses:p}=ni(i),{sizeClasses:v,sizeStyles:y}=_u(i),C=Eu(i,i.symbol,!1),m=df(i,t),w=z(()=>{var D;return i.active!==void 0?i.active:m.isLink.value?(D=m.isActive)==null?void 0:D.value:C==null?void 0:C.isSelected.value}),E=z(()=>(C==null?void 0:C.disabled.value)||i.disabled),R=z(()=>i.variant==="elevated"&&!(i.disabled||i.flat||i.border)),O=z(()=>{if(i.value!==void 0)return Object(i.value)===i.value?JSON.stringify(i.value,null,0):i.value});function A(D){var L;E.value||m.isLink.value&&(D.metaKey||D.ctrlKey||D.shiftKey||D.button!==0||t.target==="_blank")||((L=m.navigate)==null||L.call(m,D),C==null||C.toggle())}return vW(m,C==null?void 0:C.select),_e(()=>{var H,Y;const D=m.isLink.value?"a":i.tag,L=!!(i.prependIcon||n.prepend),S=!!(i.appendIcon||n.append),x=!!(i.icon&&i.icon!==!0),T=(C==null?void 0:C.isSelected.value)&&(!m.isLink.value||((H=m.isActive)==null?void 0:H.value))||!C||((Y=m.isActive)==null?void 0:Y.value);return Mt(b(D,{type:D==="a"?void 0:"button",class:["v-btn",C==null?void 0:C.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":i.block,"v-btn--disabled":E.value,"v-btn--elevated":R.value,"v-btn--flat":i.flat,"v-btn--icon":!!i.icon,"v-btn--loading":i.loading,"v-btn--stacked":i.stacked},s.value,o.value,T?r.value:void 0,c.value,d.value,h.value,g.value,p.value,v.value,l.value,i.class],style:[T?a.value:void 0,u.value,f.value,y.value,i.style],disabled:E.value||void 0,href:m.href.value,onClick:A,value:O.value},{default:()=>{var Q;return[Bl(!0,"v-btn"),!i.icon&&L&&b("span",{key:"prepend",class:"v-btn__prepend"},[n.prepend?b(Nt,{key:"prepend-defaults",disabled:!i.prependIcon,defaults:{VIcon:{icon:i.prependIcon}}},n.prepend):b(Gt,{key:"prepend-icon",icon:i.prependIcon},null)]),b("span",{class:"v-btn__content","data-no-activator":""},[!n.default&&x?b(Gt,{key:"content-icon",icon:i.icon},null):b(Nt,{key:"content-defaults",disabled:!x,defaults:{VIcon:{icon:i.icon}}},{default:()=>{var te;return[((te=n.default)==null?void 0:te.call(n))??i.text]}})]),!i.icon&&S&&b("span",{key:"append",class:"v-btn__append"},[n.append?b(Nt,{key:"append-defaults",disabled:!i.appendIcon,defaults:{VIcon:{icon:i.appendIcon}}},n.append):b(Gt,{key:"append-icon",icon:i.appendIcon},null)]),!!i.loading&&b("span",{key:"loader",class:"v-btn__loader"},[((Q=n.loader)==null?void 0:Q.call(n))??b(hS,{color:typeof i.loading=="boolean"?void 0:i.loading,indeterminate:!0,size:"23",width:"2"},null)])]}}),[[Vi("ripple"),!E.value&&i.ripple,null]])}),{}}});const EW=fe({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function ds(i,e,t){return Ee()({name:i,props:EW({mode:t,origin:e}),setup(n,s){let{slots:o}=s;const r={onBeforeEnter(a){n.origin&&(a.style.transformOrigin=n.origin)},onLeave(a){if(n.leaveAbsolute){const{offsetTop:l,offsetLeft:c,offsetWidth:u,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${c}px`,a.style.width=`${u}px`,a.style.height=`${d}px`}n.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(n.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:c,left:u,width:d,height:h}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=c||"",a.style.left=u||"",a.style.width=d||"",a.style.height=h||""}}};return()=>{const a=n.group?kF:Po;return ts(a,{name:n.disabled?"":i,css:!n.disabled,...n.group?void 0:{mode:n.mode},...n.disabled?{}:r},o.default)}}})}function uO(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return Ee()({name:i,props:{mode:{type:String,default:t},disabled:Boolean},setup(n,s){let{slots:o}=s;return()=>ts(Po,{name:n.disabled?"":i,css:!n.disabled,...n.disabled?{}:e},o.default)}})}function dO(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",n=Ts(`offset-${t}`);return{onBeforeEnter(r){r._parent=r.parentNode,r._initialStyle={transition:r.style.transition,overflow:r.style.overflow,[t]:r.style[t]}},onEnter(r){const a=r._initialStyle;r.style.setProperty("transition","none","important"),r.style.overflow="hidden";const l=`${r[n]}px`;r.style[t]="0",r.offsetHeight,r.style.transition=a.transition,i&&r._parent&&r._parent.classList.add(i),requestAnimationFrame(()=>{r.style[t]=l})},onAfterEnter:o,onEnterCancelled:o,onLeave(r){r._initialStyle={transition:"",overflow:r.style.overflow,[t]:r.style[t]},r.style.overflow="hidden",r.style[t]=`${r[n]}px`,r.offsetHeight,requestAnimationFrame(()=>r.style[t]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(r){i&&r._parent&&r._parent.classList.remove(i),o(r)}function o(r){const a=r._initialStyle[t];r.style.overflow=r._initialStyle.overflow,a!=null&&(r.style[t]=a),delete r._initialStyle}}const _W=fe({target:Object},"v-dialog-transition"),km=Ee()({name:"VDialogTransition",props:_W(),setup(i,e){let{slots:t}=e;const n={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,o){var h;await new Promise(f=>requestAnimationFrame(f)),await new Promise(f=>requestAnimationFrame(f)),s.style.visibility="";const{x:r,y:a,sx:l,sy:c,speed:u}=q_(i.target,s),d=el(s,[{transform:`translate(${r}px, ${a}px) scale(${l}, ${c})`,opacity:0},{}],{duration:225*u,easing:DB});(h=Y_(s))==null||h.forEach(f=>{el(f,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*u,easing:ah})}),d.finished.then(()=>o())},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,o){var h;await new Promise(f=>requestAnimationFrame(f));const{x:r,y:a,sx:l,sy:c,speed:u}=q_(i.target,s);el(s,[{},{transform:`translate(${r}px, ${a}px) scale(${l}, ${c})`,opacity:0}],{duration:125*u,easing:OB}).finished.then(()=>o()),(h=Y_(s))==null||h.forEach(f=>{el(f,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*u,easing:ah})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>i.target?b(Po,Ie({name:"dialog-transition"},n,{css:!1}),t):b(Po,{name:"dialog-transition"},t)}});function Y_(i){var t;const e=(t=i.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:t.children;return e&&[...e]}function q_(i,e){const t=i.getBoundingClientRect(),n=eS(e),[s,o]=getComputedStyle(e).transformOrigin.split(" ").map(y=>parseFloat(y)),[r,a]=getComputedStyle(e).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=t.left+t.width/2;r==="left"||a==="left"?l-=t.width/2:(r==="right"||a==="right")&&(l+=t.width/2);let c=t.top+t.height/2;r==="top"||a==="top"?c-=t.height/2:(r==="bottom"||a==="bottom")&&(c+=t.height/2);const u=t.width/n.width,d=t.height/n.height,h=Math.max(1,u,d),f=u/h||0,g=d/h||0,p=n.width*n.height/(window.innerWidth*window.innerHeight),v=p>.12?Math.min(1.5,(p-.12)*10+1):1;return{x:l-(s+n.left),y:c-(o+n.top),sx:f,sy:g,speed:v}}const RW=ds("fab-transition","center center","out-in"),TW=ds("dialog-bottom-transition"),xW=ds("dialog-top-transition"),vy=ds("fade-transition"),hO=ds("scale-transition"),AW=ds("scroll-x-transition"),DW=ds("scroll-x-reverse-transition"),OW=ds("scroll-y-transition"),PW=ds("scroll-y-reverse-transition"),IW=ds("slide-x-transition"),MW=ds("slide-x-reverse-transition"),gS=ds("slide-y-transition"),LW=ds("slide-y-reverse-transition"),Vm=uO("expand-transition",dO()),mS=uO("expand-x-transition",dO("",!0));const FW=fe({text:String,clickable:Boolean,...Ve(),...St()},"VLabel"),xu=Ee()({name:"VLabel",props:FW(),setup(i,e){let{slots:t}=e;return _e(()=>{var n;return b("label",{class:["v-label",{"v-label--clickable":i.clickable},i.class],style:i.style},[i.text,(n=t.default)==null?void 0:n.call(t)])}),{}}});const fO=Symbol.for("vuetify:selection-control-group"),vS=fe({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:tt,trueIcon:tt,ripple:{type:Boolean,default:!0},multiple:{type:Boolean,default:null},name:String,readonly:Boolean,modelValue:null,type:String,valueComparator:{type:Function,default:Da},...Ve(),...Mi(),...St()},"SelectionControlGroup"),NW=fe({...vS({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),pO=Ee()({name:"VSelectionControlGroup",props:NW(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),s=hn(),o=z(()=>i.id||`v-selection-control-group-${s}`),r=z(()=>i.name||o.value),a=new Set;return Ht(fO,{modelValue:n,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),Mn(()=>{a.delete(l)})}}),Ci({[i.defaultsTarget]:{color:Se(i,"color"),disabled:Se(i,"disabled"),density:Se(i,"density"),error:Se(i,"error"),inline:Se(i,"inline"),modelValue:n,multiple:z(()=>!!i.multiple||i.multiple==null&&Array.isArray(n.value)),name:r,falseIcon:Se(i,"falseIcon"),trueIcon:Se(i,"trueIcon"),readonly:Se(i,"readonly"),ripple:Se(i,"ripple"),type:Se(i,"type"),valueComparator:Se(i,"valueComparator")}}),_e(()=>{var l;return b("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":i.inline},i.class],style:i.style,role:i.type==="radio"?"radiogroup":void 0},[(l=t.default)==null?void 0:l.call(t)])}),{}}}),Gm=fe({label:String,trueValue:null,falseValue:null,value:null,...Ve(),...vS()},"VSelectionControl");function kW(i){const e=ct(fO,void 0),{densityClasses:t}=fn(i),n=Ke(i,"modelValue"),s=z(()=>i.trueValue!==void 0?i.trueValue:i.value!==void 0?i.value:!0),o=z(()=>i.falseValue!==void 0?i.falseValue:!1),r=z(()=>!!i.multiple||i.multiple==null&&Array.isArray(n.value)),a=z({get(){const d=e?e.modelValue.value:n.value;return r.value?d.some(h=>i.valueComparator(h,s.value)):i.valueComparator(d,s.value)},set(d){if(i.readonly)return;const h=d?s.value:o.value;let f=h;r.value&&(f=d?[...In(n.value),h]:In(n.value).filter(g=>!i.valueComparator(g,s.value))),e?e.modelValue.value=f:n.value=f}}),{textColorClasses:l,textColorStyles:c}=cn(z(()=>a.value&&!i.error&&!i.disabled?i.color:void 0)),u=z(()=>a.value?i.trueIcon:i.falseIcon);return{group:e,densityClasses:t,trueValue:s,falseValue:o,model:a,textColorClasses:l,textColorStyles:c,icon:u}}const Xc=Ee()({name:"VSelectionControl",directives:{Ripple:Ia},inheritAttrs:!1,props:Gm(),emits:{"update:modelValue":i=>!0},setup(i,e){let{attrs:t,slots:n}=e;const{group:s,densityClasses:o,icon:r,model:a,textColorClasses:l,textColorStyles:c,trueValue:u}=kW(i),d=hn(),h=z(()=>i.id||`input-${d}`),f=Fe(!1),g=Fe(!1),p=Te();s==null||s.onForceUpdate(()=>{p.value&&(p.value.checked=a.value)});function v(m){f.value=!0,(!dy||dy&&m.target.matches(":focus-visible"))&&(g.value=!0)}function y(){f.value=!1,g.value=!1}function C(m){i.readonly&&s&&Wt(()=>s.forceUpdate()),a.value=m.target.checked}return _e(()=>{var R,O;const m=n.label?n.label({label:i.label,props:{for:h.value}}):i.label,[w,E]=Hl(t);return b("div",Ie({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":i.disabled,"v-selection-control--error":i.error,"v-selection-control--focused":f.value,"v-selection-control--focus-visible":g.value,"v-selection-control--inline":i.inline},o.value,i.class]},w,{style:i.style}),[b("div",{class:["v-selection-control__wrapper",l.value],style:c.value},[(R=n.default)==null?void 0:R.call(n),Mt(b("div",{class:["v-selection-control__input"]},[r.value&&b(Gt,{key:"icon",icon:r.value},null),b("input",Ie({ref:p,checked:a.value,disabled:!!(i.readonly||i.disabled),id:h.value,onBlur:y,onFocus:v,onInput:C,"aria-disabled":!!(i.readonly||i.disabled),type:i.type,value:u.value,name:i.name,"aria-checked":i.type==="checkbox"?a.value:void 0},E),null),(O=n.input)==null?void 0:O.call(n,{model:a,textColorClasses:l,textColorStyles:c,props:{onFocus:v,onBlur:y,id:h.value}})]),[[Vi("ripple"),i.ripple&&[!i.disabled&&!i.readonly,null,["center","circle"]]]])]),m&&b(xu,{for:h.value,clickable:!0},{default:()=>[m]})])}),{isFocused:f,input:p}}}),gO=fe({indeterminate:Boolean,indeterminateIcon:{type:tt,default:"$checkboxIndeterminate"},...Gm({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),vr=Ee()({name:"VCheckboxBtn",props:gO(),emits:{"update:modelValue":i=>!0,"update:indeterminate":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"indeterminate"),s=Ke(i,"modelValue");function o(l){n.value&&(n.value=!1)}const r=z(()=>n.value?i.indeterminateIcon:i.falseIcon),a=z(()=>n.value?i.indeterminateIcon:i.trueIcon);return _e(()=>b(Xc,Ie(i,{modelValue:s.value,"onUpdate:modelValue":[l=>s.value=l,o],class:["v-checkbox-btn",i.class],style:i.style,type:"checkbox",falseIcon:r.value,trueIcon:a.value,"aria-checked":n.value?"mixed":void 0}),t)),{}}});function mO(i){const{t:e}=Rn();function t(n){let{name:s}=n;const o={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],r=i[`onClick:${s}`],a=r&&o?e(`$vuetify.input.${o}`,i.label??""):void 0;return b(Gt,{icon:i[`${s}Icon`],"aria-label":a,onClick:r},null)}return{InputIcon:t}}const Or=fe({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:i=>i!==!0}},"transition"),Xs=(i,e)=>{let{slots:t}=e;const{transition:n,disabled:s,...o}=i,{component:r=Po,...a}=typeof n=="object"?n:{};return ts(r,Ie(typeof n=="string"?{name:s?"":n}:a,o,{disabled:s}),t)},VW=fe({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ve(),...Or({transition:{component:gS,leaveAbsolute:!0,group:!0}})},"VMessages"),vO=Ee()({name:"VMessages",props:VW(),setup(i,e){let{slots:t}=e;const n=z(()=>In(i.messages)),{textColorClasses:s,textColorStyles:o}=cn(z(()=>i.color));return _e(()=>b(Xs,{transition:i.transition,tag:"div",class:["v-messages",s.value,i.class],style:[o.value,i.style],role:"alert","aria-live":"polite"},{default:()=>[i.active&&n.value.map((r,a)=>b("div",{class:"v-messages__message",key:`${a}-${n.value}`},[t.message?t.message({message:r}):r]))]})),{}}}),Hm=fe({focused:Boolean,"onUpdate:focused":Do()},"focus");function Ma(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar();const t=Ke(i,"focused"),n=z(()=>({[`${e}--focused`]:t.value}));function s(){t.value=!0}function o(){t.value=!1}return{focusClasses:n,isFocused:t,focus:s,blur:o}}const CO=Symbol.for("vuetify:form"),GW=fe({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function HW(i){const e=Ke(i,"modelValue"),t=z(()=>i.disabled),n=z(()=>i.readonly),s=Fe(!1),o=Te([]),r=Te([]);async function a(){const u=[];let d=!0;r.value=[],s.value=!0;for(const h of o.value){const f=await h.validate();if(f.length>0&&(d=!1,u.push({id:h.id,errorMessages:f})),!d&&i.fastFail)break}return r.value=u,s.value=!1,{valid:d,errors:r.value}}function l(){o.value.forEach(u=>u.reset())}function c(){o.value.forEach(u=>u.resetValidation())}return Le(o,()=>{let u=0,d=0;const h=[];for(const f of o.value)f.isValid===!1?(d++,h.push({id:f.id,errorMessages:f.errorMessages})):f.isValid===!0&&u++;r.value=h,e.value=d>0?!1:u===o.value.length?!0:null},{deep:!0}),Ht(CO,{register:u=>{let{id:d,validate:h,reset:f,resetValidation:g}=u;o.value.some(p=>p.id===d),o.value.push({id:d,validate:h,reset:f,resetValidation:g,isValid:null,errorMessages:[]})},unregister:u=>{o.value=o.value.filter(d=>d.id!==u)},update:(u,d,h)=>{const f=o.value.find(g=>g.id===u);f&&(f.isValid=d,f.errorMessages=h)},isDisabled:t,isReadonly:n,isValidating:s,isValid:e,items:o,validateOn:Se(i,"validateOn")}),{errors:r,isDisabled:t,isReadonly:n,isValidating:s,isValid:e,items:o,validate:a,reset:l,resetValidation:c}}function Bm(){return ct(CO,null)}const yO=fe({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...Hm()},"validation");function bO(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ar(),t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:hn();const n=Ke(i,"modelValue"),s=z(()=>i.validationValue===void 0?n.value:i.validationValue),o=Bm(),r=Te([]),a=Fe(!0),l=z(()=>!!(In(n.value===""?null:n.value).length||In(s.value===""?null:s.value).length)),c=z(()=>!!(i.disabled??(o==null?void 0:o.isDisabled.value))),u=z(()=>!!(i.readonly??(o==null?void 0:o.isReadonly.value))),d=z(()=>i.errorMessages.length?In(i.errorMessages).slice(0,Math.max(0,+i.maxErrors)):r.value),h=z(()=>{let w=(i.validateOn??(o==null?void 0:o.validateOn.value))||"input";w==="lazy"&&(w="input lazy");const E=new Set((w==null?void 0:w.split(" "))??[]);return{blur:E.has("blur")||E.has("input"),input:E.has("input"),submit:E.has("submit"),lazy:E.has("lazy")}}),f=z(()=>i.error||i.errorMessages.length?!1:i.rules.length?a.value?r.value.length||h.value.lazy?null:!0:!r.value.length:!0),g=Fe(!1),p=z(()=>({[`${e}--error`]:f.value===!1,[`${e}--dirty`]:l.value,[`${e}--disabled`]:c.value,[`${e}--readonly`]:u.value})),v=z(()=>i.name??Ni(t));Vg(()=>{o==null||o.register({id:v.value,validate:m,reset:y,resetValidation:C})}),dn(()=>{o==null||o.unregister(v.value)}),Pi(async()=>{h.value.lazy||await m(!0),o==null||o.update(v.value,f.value,d.value)}),mr(()=>h.value.input,()=>{Le(s,()=>{if(s.value!=null)m();else if(i.focused){const w=Le(()=>i.focused,E=>{E||m(),w()})}})}),mr(()=>h.value.blur,()=>{Le(()=>i.focused,w=>{w||m()})}),Le(f,()=>{o==null||o.update(v.value,f.value,d.value)});function y(){n.value=null,Wt(C)}function C(){a.value=!0,h.value.lazy?r.value=[]:m(!0)}async function m(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const E=[];g.value=!0;for(const R of i.rules){if(E.length>=+(i.maxErrors??1))break;const A=await(typeof R=="function"?R:()=>R)(s.value);if(A!==!0){if(A!==!1&&typeof A!="string"){console.warn(`${A} is not a valid value. Rule functions must return boolean true or a string.`);continue}E.push(A||"")}}return r.value=E,g.value=!1,a.value=w,r.value}return{errorMessages:d,isDirty:l,isDisabled:c,isReadonly:u,isPristine:a,isValid:f,isValidating:g,reset:y,resetValidation:C,validate:m,validationClasses:p}}const Pr=fe({id:String,appendIcon:tt,centerAffix:{type:Boolean,default:!0},prependIcon:tt,hideDetails:[Boolean,String],hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:i=>["horizontal","vertical"].includes(i)},"onClick:prepend":Do(),"onClick:append":Do(),...Ve(),...Mi(),...yO()},"VInput"),$i=Ee()({name:"VInput",props:{...Pr()},emits:{"update:modelValue":i=>!0},setup(i,e){let{attrs:t,slots:n,emit:s}=e;const{densityClasses:o}=fn(i),{rtlClasses:r}=Bi(),{InputIcon:a}=mO(i),l=hn(),c=z(()=>i.id||`input-${l}`),u=z(()=>`${c.value}-messages`),{errorMessages:d,isDirty:h,isDisabled:f,isReadonly:g,isPristine:p,isValid:v,isValidating:y,reset:C,resetValidation:m,validate:w,validationClasses:E}=bO(i,"v-input",c),R=z(()=>({id:c,messagesId:u,isDirty:h,isDisabled:f,isReadonly:g,isPristine:p,isValid:v,isValidating:y,reset:C,resetValidation:m,validate:w})),O=z(()=>{var A;return(A=i.errorMessages)!=null&&A.length||!p.value&&d.value.length?d.value:i.hint&&(i.persistentHint||i.focused)?i.hint:i.messages});return _e(()=>{var x,T,H,Y;const A=!!(n.prepend||i.prependIcon),D=!!(n.append||i.appendIcon),L=O.value.length>0,S=!i.hideDetails||i.hideDetails==="auto"&&(L||!!n.details);return b("div",{class:["v-input",`v-input--${i.direction}`,{"v-input--center-affix":i.centerAffix},o.value,r.value,E.value,i.class],style:i.style},[A&&b("div",{key:"prepend",class:"v-input__prepend"},[(x=n.prepend)==null?void 0:x.call(n,R.value),i.prependIcon&&b(a,{key:"prepend-icon",name:"prepend"},null)]),n.default&&b("div",{class:"v-input__control"},[(T=n.default)==null?void 0:T.call(n,R.value)]),D&&b("div",{key:"append",class:"v-input__append"},[i.appendIcon&&b(a,{key:"append-icon",name:"append"},null),(H=n.append)==null?void 0:H.call(n,R.value)]),S&&b("div",{class:"v-input__details"},[b(vO,{id:u.value,active:L,messages:O.value},{message:n.message}),(Y=n.details)==null?void 0:Y.call(n,R.value)])])}),{reset:C,resetValidation:m,validate:w}}}),BW=fe({...Pr(),...qo(gO(),["inline"])},"VCheckbox"),WW=Ee()({name:"VCheckbox",inheritAttrs:!1,props:BW(),emits:{"update:modelValue":i=>!0,"update:focused":i=>!0},setup(i,e){let{attrs:t,slots:n}=e;const s=Ke(i,"modelValue"),{isFocused:o,focus:r,blur:a}=Ma(i),l=hn(),c=z(()=>i.id||`checkbox-${l}`);return _e(()=>{const[u,d]=Hl(t),[h,f]=$i.filterProps(i),[g,p]=vr.filterProps(i);return b($i,Ie({class:["v-checkbox",i.class]},u,h,{modelValue:s.value,"onUpdate:modelValue":v=>s.value=v,id:c.value,focused:o.value,style:i.style}),{...n,default:v=>{let{id:y,messagesId:C,isDisabled:m,isReadonly:w}=v;return b(vr,Ie(g,{id:y.value,"aria-describedby":C.value,disabled:m.value,readonly:w.value},d,{modelValue:s.value,"onUpdate:modelValue":E=>s.value=E,onFocus:r,onBlur:a}),n)}})}),{}}});function UW(i){return{aspectStyles:z(()=>{const e=Number(i.aspectRatio);return e?{paddingBottom:String(1/e*100)+"%"}:void 0})}}const wO=fe({aspectRatio:[String,Number],contentClass:String,inline:Boolean,...Ve(),...Vs()},"VResponsive"),Cy=Ee()({name:"VResponsive",props:wO(),setup(i,e){let{slots:t}=e;const{aspectStyles:n}=UW(i),{dimensionStyles:s}=Gs(i);return _e(()=>{var o;return b("div",{class:["v-responsive",{"v-responsive--inline":i.inline},i.class],style:[s.value,i.style]},[b("div",{class:"v-responsive__sizer",style:n.value},null),(o=t.additional)==null?void 0:o.call(t),t.default&&b("div",{class:["v-responsive__content",i.contentClass]},[t.default()])])}),{}}});function jW(i,e){if(!rS)return;const t=e.modifiers||{},n=e.value,{handler:s,options:o}=typeof n=="object"?n:{handler:n,options:{}},r=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const c=(d=i._observe)==null?void 0:d[e.instance.$.uid];if(!c)return;const u=a.some(h=>h.isIntersecting);s&&(!t.quiet||c.init)&&(!t.once||u||c.init)&&s(u,a,l),u&&t.once?SO(i,e):c.init=!0},o);i._observe=Object(i._observe),i._observe[e.instance.$.uid]={init:!1,observer:r},r.observe(i)}function SO(i,e){var n;const t=(n=i._observe)==null?void 0:n[e.instance.$.uid];t&&(t.observer.unobserve(i),delete i._observe[e.instance.$.uid])}const ff={mounted:jW,unmounted:SO},EO=fe({alt:String,cover:Boolean,eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},srcset:String,...wO(),...Ve(),...Or()},"VImg"),Sl=Ee()({name:"VImg",directives:{intersect:ff},props:EO(),emits:{loadstart:i=>!0,load:i=>!0,error:i=>!0},setup(i,e){let{emit:t,slots:n}=e;const s=Fe(""),o=Te(),r=Fe(i.eager?"loading":"idle"),a=Fe(),l=Fe(),c=z(()=>i.src&&typeof i.src=="object"?{src:i.src.src,srcset:i.srcset||i.src.srcset,lazySrc:i.lazySrc||i.src.lazySrc,aspect:Number(i.aspectRatio||i.src.aspect||0)}:{src:i.src,srcset:i.srcset,lazySrc:i.lazySrc,aspect:Number(i.aspectRatio||0)}),u=z(()=>c.value.aspect||a.value/l.value||0);Le(()=>i.src,()=>{d(r.value!=="idle")}),Le(u,(A,D)=>{!A&&D&&o.value&&v(o.value)}),Vg(()=>d());function d(A){if(!(i.eager&&A)&&!(rS&&!A&&!i.eager)){if(r.value="loading",c.value.lazySrc){const D=new Image;D.src=c.value.lazySrc,v(D,null)}c.value.src&&Wt(()=>{var D,L;if(t("loadstart",((D=o.value)==null?void 0:D.currentSrc)||c.value.src),(L=o.value)!=null&&L.complete){if(o.value.naturalWidth||f(),r.value==="error")return;u.value||v(o.value,null),h()}else u.value||v(o.value),g()})}}function h(){var A;g(),r.value="loaded",t("load",((A=o.value)==null?void 0:A.currentSrc)||c.value.src)}function f(){var A;r.value="error",t("error",((A=o.value)==null?void 0:A.currentSrc)||c.value.src)}function g(){const A=o.value;A&&(s.value=A.currentSrc||A.src)}let p=-1;function v(A){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const L=()=>{clearTimeout(p);const{naturalHeight:S,naturalWidth:x}=A;S||x?(a.value=x,l.value=S):!A.complete&&r.value==="loading"&&D!=null?p=window.setTimeout(L,D):(A.currentSrc.endsWith(".svg")||A.currentSrc.startsWith("data:image/svg+xml"))&&(a.value=1,l.value=1)};L()}const y=z(()=>({"v-img__img--cover":i.cover,"v-img__img--contain":!i.cover})),C=()=>{var L;if(!c.value.src||r.value==="idle")return null;const A=b("img",{class:["v-img__img",y.value],src:c.value.src,srcset:c.value.srcset,alt:i.alt,sizes:i.sizes,ref:o,onLoad:h,onError:f},null),D=(L=n.sources)==null?void 0:L.call(n);return b(Xs,{transition:i.transition,appear:!0},{default:()=>[Mt(D?b("picture",{class:"v-img__picture"},[D,A]):A,[[Ps,r.value==="loaded"]])]})},m=()=>b(Xs,{transition:i.transition},{default:()=>[c.value.lazySrc&&r.value!=="loaded"&&b("img",{class:["v-img__img","v-img__img--preload",y.value],src:c.value.lazySrc,alt:i.alt},null)]}),w=()=>n.placeholder?b(Xs,{transition:i.transition,appear:!0},{default:()=>[(r.value==="loading"||r.value==="error"&&!n.error)&&b("div",{class:"v-img__placeholder"},[n.placeholder()])]}):null,E=()=>n.error?b(Xs,{transition:i.transition,appear:!0},{default:()=>[r.value==="error"&&b("div",{class:"v-img__error"},[n.error()])]}):null,R=()=>i.gradient?b("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${i.gradient})`}},null):null,O=Fe(!1);{const A=Le(u,D=>{D&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{O.value=!0})}),A())})}return _e(()=>{const[A]=Cy.filterProps(i);return Mt(b(Cy,Ie({class:["v-img",{"v-img--booting":!O.value},i.class],style:[{width:ke(i.width==="auto"?a.value:i.width)},i.style]},A,{aspectRatio:u.value,"aria-label":i.alt,role:i.alt?"img":void 0}),{additional:()=>b(He,null,[b(C,null,null),b(m,null,null),b(R,null,null),b(w,null,null),b(E,null,null)]),default:n.default}),[[Vi("intersect"),{handler:d,options:i.options},null,{once:!0}]])}),{currentSrc:s,image:o,state:r,naturalWidth:a,naturalHeight:l}}}),$W=fe({start:Boolean,end:Boolean,icon:tt,image:String,...Ve(),...Mi(),...Zt(),...Dr(),...lt(),...St(),...ks({variant:"flat"})},"VAvatar"),ua=Ee()({name:"VAvatar",props:$W(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{colorClasses:s,colorStyles:o,variantClasses:r}=Wl(i),{densityClasses:a}=fn(i),{roundedClasses:l}=ni(i),{sizeClasses:c,sizeStyles:u}=_u(i);return _e(()=>b(i.tag,{class:["v-avatar",{"v-avatar--start":i.start,"v-avatar--end":i.end},n.value,s.value,a.value,l.value,c.value,r.value,i.class],style:[o.value,u.value,i.style]},{default:()=>{var d;return[i.image?b(Sl,{key:"image",src:i.image,alt:"",cover:!0},null):i.icon?b(Gt,{key:"icon",icon:i.icon},null):(d=t.default)==null?void 0:d.call(t),Bl(!1,"v-avatar")]}})),{}}});const _O=Symbol.for("vuetify:v-chip-group"),zW=fe({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Da},...Ve(),...wu({selectedClass:"v-chip--selected"}),...lt(),...St(),...ks({variant:"tonal"})},"VChipGroup"),KW=Ee()({name:"VChipGroup",props:zW(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{isSelected:s,select:o,next:r,prev:a,selected:l}=Ul(i,_O);return Ci({VChip:{color:Se(i,"color"),disabled:Se(i,"disabled"),filter:Se(i,"filter"),variant:Se(i,"variant")}}),_e(()=>b(i.tag,{class:["v-chip-group",{"v-chip-group--column":i.column},n.value,i.class],style:i.style},{default:()=>{var c;return[(c=t.default)==null?void 0:c.call(t,{isSelected:s,select:o,next:r,prev:a,selected:l.value})]}})),{}}}),YW=fe({activeClass:String,appendAvatar:String,appendIcon:tt,closable:Boolean,closeIcon:{type:tt,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:String,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:tt,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:Do(),onClickOnce:Do(),...us(),...Ve(),...Mi(),...Li(),...Su(),...Zt(),...hf(),...Dr(),...lt({tag:"span"}),...St(),...ks({variant:"tonal"})},"VChip"),pf=Ee()({name:"VChip",directives:{Ripple:Ia},props:YW(),emits:{"click:close":i=>!0,"update:modelValue":i=>!0,"group:selected":i=>!0,click:i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const{t:o}=Rn(),{borderClasses:r}=Ns(i),{colorClasses:a,colorStyles:l,variantClasses:c}=Wl(i),{densityClasses:u}=fn(i),{elevationClasses:d}=Yi(i),{roundedClasses:h}=ni(i),{sizeClasses:f}=_u(i),{themeClasses:g}=Pt(i),p=Ke(i,"modelValue"),v=Eu(i,_O,!1),y=df(i,t),C=z(()=>i.link!==!1&&y.isLink.value),m=z(()=>!i.disabled&&i.link!==!1&&(!!v||i.link||y.isClickable.value)),w=z(()=>({"aria-label":o(i.closeLabel),onClick(O){p.value=!1,n("click:close",O)}}));function E(O){var A;n("click",O),m.value&&((A=y.navigate)==null||A.call(y,O),v==null||v.toggle())}function R(O){(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),E(O))}return()=>{const O=y.isLink.value?"a":i.tag,A=!!(i.appendIcon||i.appendAvatar),D=!!(A||s.append),L=!!(s.close||i.closable),S=!!(s.filter||i.filter)&&v,x=!!(i.prependIcon||i.prependAvatar),T=!!(x||s.prepend),H=!v||v.isSelected.value;return p.value&&Mt(b(O,{class:["v-chip",{"v-chip--disabled":i.disabled,"v-chip--label":i.label,"v-chip--link":m.value,"v-chip--filter":S,"v-chip--pill":i.pill},g.value,r.value,H?a.value:void 0,u.value,d.value,h.value,f.value,c.value,v==null?void 0:v.selectedClass.value,i.class],style:[H?l.value:void 0,i.style],disabled:i.disabled||void 0,draggable:i.draggable,href:y.href.value,tabindex:m.value?0:void 0,onClick:E,onKeydown:m.value&&!C.value&&R},{default:()=>{var Y;return[Bl(m.value,"v-chip"),S&&b(mS,{key:"filter"},{default:()=>[Mt(b("div",{class:"v-chip__filter"},[s.filter?Mt(b(Nt,{key:"filter-defaults",disabled:!i.filterIcon,defaults:{VIcon:{icon:i.filterIcon}}},null),[[Vi("slot"),s.filter,"default"]]):b(Gt,{key:"filter-icon",icon:i.filterIcon},null)]),[[Ps,v.isSelected.value]])]}),T&&b("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?b(Nt,{key:"prepend-defaults",disabled:!x,defaults:{VAvatar:{image:i.prependAvatar,start:!0},VIcon:{icon:i.prependIcon,start:!0}}},s.prepend):b(He,null,[i.prependIcon&&b(Gt,{key:"prepend-icon",icon:i.prependIcon,start:!0},null),i.prependAvatar&&b(ua,{key:"prepend-avatar",image:i.prependAvatar,start:!0},null)])]),b("div",{class:"v-chip__content"},[((Y=s.default)==null?void 0:Y.call(s,{isSelected:v==null?void 0:v.isSelected.value,selectedClass:v==null?void 0:v.selectedClass.value,select:v==null?void 0:v.select,toggle:v==null?void 0:v.toggle,value:v==null?void 0:v.value.value,disabled:i.disabled}))??i.text]),D&&b("div",{key:"append",class:"v-chip__append"},[s.append?b(Nt,{key:"append-defaults",disabled:!A,defaults:{VAvatar:{end:!0,image:i.appendAvatar},VIcon:{end:!0,icon:i.appendIcon}}},s.append):b(He,null,[i.appendIcon&&b(Gt,{key:"append-icon",end:!0,icon:i.appendIcon},null),i.appendAvatar&&b(ua,{key:"append-avatar",end:!0,image:i.appendAvatar},null)])]),L&&b("div",Ie({key:"close",class:"v-chip__close"},w.value),[s.close?b(Nt,{key:"close-defaults",defaults:{VIcon:{icon:i.closeIcon,size:"x-small"}}},s.close):b(Gt,{key:"close-icon",icon:i.closeIcon,size:"x-small"},null)])]}}),[[Vi("ripple"),m.value&&i.ripple,null]])}}});const yy=Symbol.for("vuetify:list");function RO(){const i=ct(yy,{hasPrepend:Fe(!1),updateHasPrepend:()=>null}),e={hasPrepend:Fe(!1),updateHasPrepend:t=>{t&&(e.hasPrepend.value=t)}};return Ht(yy,e),i}function TO(){return ct(yy,null)}const qW={open:i=>{let{id:e,value:t,opened:n,parents:s}=i;if(t){const o=new Set;o.add(e);let r=s.get(e);for(;r!=null;)o.add(r),r=s.get(r);return o}else return n.delete(e),n},select:()=>null},xO={open:i=>{let{id:e,value:t,opened:n,parents:s}=i;if(t){let o=s.get(e);for(n.add(e);o!=null&&o!==e;)n.add(o),o=s.get(o);return n}else n.delete(e);return n},select:()=>null},XW={open:xO.open,select:i=>{let{id:e,value:t,opened:n,parents:s}=i;if(!t)return n;const o=[];let r=s.get(e);for(;r!=null;)o.push(r),r=s.get(r);return new Set(o)}},CS=i=>{const e={select:t=>{let{id:n,value:s,selected:o}=t;if(n=it(n),i&&!s){const r=Array.from(o.entries()).reduce((a,l)=>{let[c,u]=l;return u==="on"?[...a,c]:a},[]);if(r.length===1&&r[0]===n)return o}return o.set(n,s?"on":"off"),o},in:(t,n,s)=>{let o=new Map;for(const r of t||[])o=e.select({id:r,value:!0,selected:new Map(o),children:n,parents:s});return o},out:t=>{const n=[];for(const[s,o]of t.entries())o==="on"&&n.push(s);return n}};return e},AO=i=>{const e=CS(i);return{select:n=>{let{selected:s,id:o,...r}=n;o=it(o);const a=s.has(o)?new Map([[o,s.get(o)]]):new Map;return e.select({...r,id:o,selected:a})},in:(n,s,o)=>{let r=new Map;return n!=null&&n.length&&(r=e.in(n.slice(0,1),s,o)),r},out:(n,s,o)=>e.out(n,s,o)}},QW=i=>{const e=CS(i);return{select:n=>{let{id:s,selected:o,children:r,...a}=n;return s=it(s),r.has(s)?o:e.select({id:s,selected:o,children:r,...a})},in:e.in,out:e.out}},ZW=i=>{const e=AO(i);return{select:n=>{let{id:s,selected:o,children:r,...a}=n;return s=it(s),r.has(s)?o:e.select({id:s,selected:o,children:r,...a})},in:e.in,out:e.out}},JW=i=>{const e={select:t=>{let{id:n,value:s,selected:o,children:r,parents:a}=t;n=it(n);const l=new Map(o),c=[n];for(;c.length;){const d=c.shift();o.set(d,s?"on":"off"),r.has(d)&&c.push(...r.get(d))}let u=a.get(n);for(;u;){const d=r.get(u),h=d.every(g=>o.get(g)==="on"),f=d.every(g=>!o.has(g)||o.get(g)==="off");o.set(u,h?"on":f?"off":"indeterminate"),u=a.get(u)}return i&&!s&&Array.from(o.entries()).reduce((h,f)=>{let[g,p]=f;return p==="on"?[...h,g]:h},[]).length===0?l:o},in:(t,n,s)=>{let o=new Map;for(const r of t||[])o=e.select({id:r,value:!0,selected:new Map(o),children:n,parents:s});return o},out:(t,n)=>{const s=[];for(const[o,r]of t.entries())r==="on"&&!n.has(o)&&s.push(o);return s}};return e},dh=Symbol.for("vuetify:nested"),DO={id:Fe(),root:{register:()=>null,unregister:()=>null,parents:Te(new Map),children:Te(new Map),open:()=>null,openOnSelect:()=>null,select:()=>null,opened:Te(new Set),selected:Te(new Map),selectedValues:Te([])}},eU=fe({selectStrategy:[String,Function],openStrategy:[String,Object],opened:Array,selected:Array,mandatory:Boolean},"nested"),tU=i=>{let e=!1;const t=Te(new Map),n=Te(new Map),s=Ke(i,"opened",i.opened,d=>new Set(d),d=>[...d.values()]),o=z(()=>{if(typeof i.selectStrategy=="object")return i.selectStrategy;switch(i.selectStrategy){case"single-leaf":return ZW(i.mandatory);case"leaf":return QW(i.mandatory);case"independent":return CS(i.mandatory);case"single-independent":return AO(i.mandatory);case"classic":default:return JW(i.mandatory)}}),r=z(()=>{if(typeof i.openStrategy=="object")return i.openStrategy;switch(i.openStrategy){case"list":return XW;case"single":return qW;case"multiple":default:return xO}}),a=Ke(i,"selected",i.selected,d=>o.value.in(d,t.value,n.value),d=>o.value.out(d,t.value,n.value));dn(()=>{e=!0});function l(d){const h=[];let f=d;for(;f!=null;)h.unshift(f),f=n.value.get(f);return h}const c=Ii("nested"),u={id:Fe(),root:{opened:s,selected:a,selectedValues:z(()=>{const d=[];for(const[h,f]of a.value.entries())f==="on"&&d.push(h);return d}),register:(d,h,f)=>{h&&d!==h&&n.value.set(d,h),f&&t.value.set(d,[]),h!=null&&t.value.set(h,[...t.value.get(h)||[],d])},unregister:d=>{if(e)return;t.value.delete(d);const h=n.value.get(d);if(h){const f=t.value.get(h)??[];t.value.set(h,f.filter(g=>g!==d))}n.value.delete(d),s.value.delete(d)},open:(d,h,f)=>{c.emit("click:open",{id:d,value:h,path:l(d),event:f});const g=r.value.open({id:d,value:h,opened:new Set(s.value),children:t.value,parents:n.value,event:f});g&&(s.value=g)},openOnSelect:(d,h,f)=>{const g=r.value.select({id:d,value:h,selected:new Map(a.value),opened:new Set(s.value),children:t.value,parents:n.value,event:f});g&&(s.value=g)},select:(d,h,f)=>{c.emit("click:select",{id:d,value:h,path:l(d),event:f});const g=o.value.select({id:d,value:h,selected:new Map(a.value),children:t.value,parents:n.value,event:f});g&&(a.value=g),u.root.openOnSelect(d,h,f)},children:t,parents:n}};return Ht(dh,u),u.root},OO=(i,e)=>{const t=ct(dh,DO),n=Symbol(hn()),s=z(()=>i.value!==void 0?i.value:n),o={...t,id:s,open:(r,a)=>t.root.open(s.value,r,a),openOnSelect:(r,a)=>t.root.openOnSelect(s.value,r,a),isOpen:z(()=>t.root.opened.value.has(s.value)),parent:z(()=>t.root.parents.value.get(s.value)),select:(r,a)=>t.root.select(s.value,r,a),isSelected:z(()=>t.root.selected.value.get(it(s.value))==="on"),isIndeterminate:z(()=>t.root.selected.value.get(s.value)==="indeterminate"),isLeaf:z(()=>!t.root.children.value.get(s.value)),isGroupActivator:t.isGroupActivator};return!t.isGroupActivator&&t.root.register(s.value,t.id.value,e),dn(()=>{!t.isGroupActivator&&t.root.unregister(s.value)}),e&&Ht(dh,o),o},iU=()=>{const i=ct(dh,DO);Ht(dh,{...i,isGroupActivator:!0})};function jl(){const i=Fe(!1);return Pi(()=>{window.requestAnimationFrame(()=>{i.value=!0})}),{ssrBootStyles:z(()=>i.value?void 0:{transition:"none !important"}),isBooted:bh(i)}}const nU=cs({name:"VListGroupActivator",setup(i,e){let{slots:t}=e;return iU(),()=>{var n;return(n=t.default)==null?void 0:n.call(t)}}}),sU=fe({activeColor:String,baseColor:String,color:String,collapseIcon:{type:tt,default:"$collapse"},expandIcon:{type:tt,default:"$expand"},prependIcon:tt,appendIcon:tt,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ve(),...lt()},"VListGroup"),by=Ee()({name:"VListGroup",props:sU(),setup(i,e){let{slots:t}=e;const{isOpen:n,open:s,id:o}=OO(Se(i,"value"),!0),r=z(()=>`v-list-group--id-${String(o.value)}`),a=TO(),{isBooted:l}=jl();function c(f){s(!n.value,f)}const u=z(()=>({onClick:c,class:"v-list-group__header",id:r.value})),d=z(()=>n.value?i.collapseIcon:i.expandIcon),h=z(()=>({VListItem:{active:n.value,activeColor:i.activeColor,baseColor:i.baseColor,color:i.color,prependIcon:i.prependIcon||i.subgroup&&d.value,appendIcon:i.appendIcon||!i.subgroup&&d.value,title:i.title,value:i.value}}));return _e(()=>b(i.tag,{class:["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":i.fluid,"v-list-group--subgroup":i.subgroup,"v-list-group--open":n.value},i.class],style:i.style},{default:()=>[t.activator&&b(Nt,{defaults:h.value},{default:()=>[b(nU,null,{default:()=>[t.activator({props:u.value,isOpen:n.value})]})]}),b(Xs,{transition:{component:Vm},disabled:!l.value},{default:()=>{var f;return[Mt(b("div",{class:"v-list-group__items",role:"group","aria-labelledby":r.value},[(f=t.default)==null?void 0:f.call(t)]),[[Ps,n.value]])]}})]})),{}}});const PO=fo("v-list-item-subtitle"),IO=fo("v-list-item-title"),oU=fe({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:tt,baseColor:String,disabled:Boolean,lines:String,link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:tt,ripple:{type:[Boolean,Object],default:!0},subtitle:[String,Number,Boolean],title:[String,Number,Boolean],value:null,onClick:Do(),onClickOnce:Do(),...us(),...Ve(),...Mi(),...Vs(),...Li(),...Zt(),...hf(),...lt(),...St(),...ks({variant:"text"})},"VListItem"),Cr=Ee()({name:"VListItem",directives:{Ripple:Ia},props:oU(),emits:{click:i=>!0},setup(i,e){let{attrs:t,slots:n,emit:s}=e;const o=df(i,t),r=z(()=>i.value===void 0?o.href.value:i.value),{select:a,isSelected:l,isIndeterminate:c,isGroupActivator:u,root:d,parent:h,openOnSelect:f}=OO(r,!1),g=TO(),p=z(()=>{var F;return i.active!==!1&&(i.active||((F=o.isActive)==null?void 0:F.value)||l.value)}),v=z(()=>i.link!==!1&&o.isLink.value),y=z(()=>!i.disabled&&i.link!==!1&&(i.link||o.isClickable.value||i.value!=null&&!!g)),C=z(()=>i.rounded||i.nav),m=z(()=>i.color??i.activeColor),w=z(()=>({color:p.value?m.value??i.baseColor:i.baseColor,variant:i.variant}));Le(()=>{var F;return(F=o.isActive)==null?void 0:F.value},F=>{F&&h.value!=null&&d.open(h.value,!0),F&&f(F)},{immediate:!0});const{themeClasses:E}=Pt(i),{borderClasses:R}=Ns(i),{colorClasses:O,colorStyles:A,variantClasses:D}=Wl(w),{densityClasses:L}=fn(i),{dimensionStyles:S}=Gs(i),{elevationClasses:x}=Yi(i),{roundedClasses:T}=ni(C),H=z(()=>i.lines?`v-list-item--${i.lines}-line`:void 0),Y=z(()=>({isActive:p.value,select:a,isSelected:l.value,isIndeterminate:c.value}));function Q(F){var k;s("click",F),!(u||!y.value)&&((k=o.navigate)==null||k.call(o,F),i.value!=null&&a(!l.value,F))}function te(F){(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),Q(F))}return _e(()=>{const F=v.value?"a":i.tag,k=n.title||i.title,q=n.subtitle||i.subtitle,V=!!(i.appendAvatar||i.appendIcon),J=!!(V||n.append),ae=!!(i.prependAvatar||i.prependIcon),se=!!(ae||n.prepend);return g==null||g.updateHasPrepend(se),i.activeColor&&hB("active-color",["color","base-color"]),Mt(b(F,{class:["v-list-item",{"v-list-item--active":p.value,"v-list-item--disabled":i.disabled,"v-list-item--link":y.value,"v-list-item--nav":i.nav,"v-list-item--prepend":!se&&(g==null?void 0:g.hasPrepend.value),[`${i.activeClass}`]:i.activeClass&&p.value},E.value,R.value,O.value,L.value,x.value,H.value,T.value,D.value,i.class],style:[A.value,S.value,i.style],href:o.href.value,tabindex:y.value?g?-2:0:void 0,onClick:Q,onKeydown:y.value&&!v.value&&te},{default:()=>{var ce;return[Bl(y.value||p.value,"v-list-item"),se&&b("div",{key:"prepend",class:"v-list-item__prepend"},[n.prepend?b(Nt,{key:"prepend-defaults",disabled:!ae,defaults:{VAvatar:{density:i.density,image:i.prependAvatar},VIcon:{density:i.density,icon:i.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var re;return[(re=n.prepend)==null?void 0:re.call(n,Y.value)]}}):b(He,null,[i.prependAvatar&&b(ua,{key:"prepend-avatar",density:i.density,image:i.prependAvatar},null),i.prependIcon&&b(Gt,{key:"prepend-icon",density:i.density,icon:i.prependIcon},null)])]),b("div",{class:"v-list-item__content","data-no-activator":""},[k&&b(IO,{key:"title"},{default:()=>{var re;return[((re=n.title)==null?void 0:re.call(n,{title:i.title}))??i.title]}}),q&&b(PO,{key:"subtitle"},{default:()=>{var re;return[((re=n.subtitle)==null?void 0:re.call(n,{subtitle:i.subtitle}))??i.subtitle]}}),(ce=n.default)==null?void 0:ce.call(n,Y.value)]),J&&b("div",{key:"append",class:"v-list-item__append"},[n.append?b(Nt,{key:"append-defaults",disabled:!V,defaults:{VAvatar:{density:i.density,image:i.appendAvatar},VIcon:{density:i.density,icon:i.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var re;return[(re=n.append)==null?void 0:re.call(n,Y.value)]}}):b(He,null,[i.appendIcon&&b(Gt,{key:"append-icon",density:i.density,icon:i.appendIcon},null),i.appendAvatar&&b(ua,{key:"append-avatar",density:i.density,image:i.appendAvatar},null)])])]}}),[[Vi("ripple"),y.value&&i.ripple]])}),{}}}),rU=fe({color:String,inset:Boolean,sticky:Boolean,title:String,...Ve(),...lt()},"VListSubheader"),MO=Ee()({name:"VListSubheader",props:rU(),setup(i,e){let{slots:t}=e;const{textColorClasses:n,textColorStyles:s}=cn(Se(i,"color"));return _e(()=>{const o=!!(t.default||i.title);return b(i.tag,{class:["v-list-subheader",{"v-list-subheader--inset":i.inset,"v-list-subheader--sticky":i.sticky},n.value,i.class],style:[{textColorStyles:s},i.style]},{default:()=>{var r;return[o&&b("div",{class:"v-list-subheader__text"},[((r=t.default)==null?void 0:r.call(t))??i.title])]}})}),{}}});const aU=fe({color:String,inset:Boolean,length:[Number,String],thickness:[Number,String],vertical:Boolean,...Ve(),...St()},"VDivider"),LO=Ee()({name:"VDivider",props:aU(),setup(i,e){let{attrs:t}=e;const{themeClasses:n}=Pt(i),{textColorClasses:s,textColorStyles:o}=cn(Se(i,"color")),r=z(()=>{const a={};return i.length&&(a[i.vertical?"maxHeight":"maxWidth"]=ke(i.length)),i.thickness&&(a[i.vertical?"borderRightWidth":"borderTopWidth"]=ke(i.thickness)),a});return _e(()=>b("hr",{class:[{"v-divider":!0,"v-divider--inset":i.inset,"v-divider--vertical":i.vertical},n.value,s.value,i.class],style:[r.value,o.value,i.style],"aria-orientation":!t.role||t.role==="separator"?i.vertical?"vertical":"horizontal":void 0,role:`${t.role||"separator"}`},null)),{}}}),lU=fe({items:Array},"VListChildren"),FO=Ee()({name:"VListChildren",props:lU(),setup(i,e){let{slots:t}=e;return RO(),()=>{var n,s;return((n=t.default)==null?void 0:n.call(t))??((s=i.items)==null?void 0:s.map(o=>{var f,g;let{children:r,props:a,type:l,raw:c}=o;if(l==="divider")return((f=t.divider)==null?void 0:f.call(t,{props:a}))??b(LO,a,null);if(l==="subheader")return((g=t.subheader)==null?void 0:g.call(t,{props:a}))??b(MO,a,null);const u={subtitle:t.subtitle?p=>{var v;return(v=t.subtitle)==null?void 0:v.call(t,{...p,item:c})}:void 0,prepend:t.prepend?p=>{var v;return(v=t.prepend)==null?void 0:v.call(t,{...p,item:c})}:void 0,append:t.append?p=>{var v;return(v=t.append)==null?void 0:v.call(t,{...p,item:c})}:void 0,title:t.title?p=>{var v;return(v=t.title)==null?void 0:v.call(t,{...p,item:c})}:void 0},[d,h]=by.filterProps(a);return r?b(by,Ie({value:a==null?void 0:a.value},d),{activator:p=>{let{props:v}=p;return t.header?t.header({props:{...a,...v}}):b(Cr,Ie(a,v),u)},default:()=>b(FO,{items:r},t)}):t.item?t.item({props:a}):b(Cr,a,u)}))}}}),NO=fe({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},returnObject:Boolean},"list-items");function hc(i,e){const t=yn(e,i.itemTitle,e),n=i.returnObject?e:yn(e,i.itemValue,t),s=yn(e,i.itemChildren),o=i.itemProps===!0?typeof e=="object"&&e!=null&&!Array.isArray(e)?"children"in e?bu(e,["children"])[1]:e:void 0:yn(e,i.itemProps),r={title:t,value:n,...o};return{title:String(r.title??""),value:r.value,props:r,children:Array.isArray(s)?kO(i,s):void 0,raw:e}}function kO(i,e){const t=[];for(const n of e)t.push(hc(i,n));return t}function yS(i){const e=z(()=>kO(i,i.items));return cU(e,t=>hc(i,t))}function cU(i,e){function t(s){return s.filter(o=>o!==null||i.value.some(r=>r.value===null)).map(o=>i.value.find(a=>Da(o,a.value))??e(o))}function n(s){return s.map(o=>{let{value:r}=o;return r})}return{items:i,transformIn:t,transformOut:n}}function uU(i){return typeof i=="string"||typeof i=="number"||typeof i=="boolean"}function dU(i,e){const t=yn(e,i.itemType,"item"),n=uU(e)?e:yn(e,i.itemTitle),s=yn(e,i.itemValue,void 0),o=yn(e,i.itemChildren),r=i.itemProps===!0?bu(e,["children"])[1]:yn(e,i.itemProps),a={title:n,value:s,...r};return{type:t,title:a.title,value:a.value,props:a,children:t==="item"&&o?VO(i,o):void 0,raw:e}}function VO(i,e){const t=[];for(const n of e)t.push(dU(i,n));return t}function hU(i){return{items:z(()=>VO(i,i.items))}}const fU=fe({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,lines:{type:[Boolean,String],default:"one"},nav:Boolean,...eU({selectStrategy:"single-leaf",openStrategy:"list"}),...us(),...Ve(),...Mi(),...Vs(),...Li(),itemType:{type:String,default:"type"},...NO(),...Zt(),...lt(),...St(),...ks({variant:"text"})},"VList"),Wm=Ee()({name:"VList",props:fU(),emits:{"update:selected":i=>!0,"update:opened":i=>!0,"click:open":i=>!0,"click:select":i=>!0},setup(i,e){let{slots:t}=e;const{items:n}=hU(i),{themeClasses:s}=Pt(i),{backgroundColorClasses:o,backgroundColorStyles:r}=di(Se(i,"bgColor")),{borderClasses:a}=Ns(i),{densityClasses:l}=fn(i),{dimensionStyles:c}=Gs(i),{elevationClasses:u}=Yi(i),{roundedClasses:d}=ni(i),{open:h,select:f}=tU(i),g=z(()=>i.lines?`v-list--${i.lines}-line`:void 0),p=Se(i,"activeColor"),v=Se(i,"baseColor"),y=Se(i,"color");RO(),Ci({VListGroup:{activeColor:p,baseColor:v,color:y},VListItem:{activeClass:Se(i,"activeClass"),activeColor:p,baseColor:v,color:y,density:Se(i,"density"),disabled:Se(i,"disabled"),lines:Se(i,"lines"),nav:Se(i,"nav"),variant:Se(i,"variant")}});const C=Fe(!1),m=Te();function w(D){C.value=!0}function E(D){C.value=!1}function R(D){var L;!C.value&&!(D.relatedTarget&&((L=m.value)!=null&&L.contains(D.relatedTarget)))&&A()}function O(D){if(m.value){if(D.key==="ArrowDown")A("next");else if(D.key==="ArrowUp")A("prev");else if(D.key==="Home")A("first");else if(D.key==="End")A("last");else return;D.preventDefault()}}function A(D){if(m.value)return rg(m.value,D)}return _e(()=>b(i.tag,{ref:m,class:["v-list",{"v-list--disabled":i.disabled,"v-list--nav":i.nav},s.value,o.value,a.value,l.value,u.value,g.value,d.value,i.class],style:[r.value,c.value,i.style],tabindex:i.disabled||C.value?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:w,onFocusout:E,onFocus:R,onKeydown:O},{default:()=>[b(FO,{items:n.value},t)]})),{open:h,select:f,focus:A}}}),pU=fo("v-list-img"),gU=fe({start:Boolean,end:Boolean,...Ve(),...lt()},"VListItemAction"),mU=Ee()({name:"VListItemAction",props:gU(),setup(i,e){let{slots:t}=e;return _e(()=>b(i.tag,{class:["v-list-item-action",{"v-list-item-action--start":i.start,"v-list-item-action--end":i.end},i.class],style:i.style},t)),{}}}),vU=fe({start:Boolean,end:Boolean,...Ve(),...lt()},"VListItemMedia"),CU=Ee()({name:"VListItemMedia",props:vU(),setup(i,e){let{slots:t}=e;return _e(()=>b(i.tag,{class:["v-list-item-media",{"v-list-item-media--start":i.start,"v-list-item-media--end":i.end},i.class],style:i.style},t)),{}}});function Gv(i,e){return{x:i.x+e.x,y:i.y+e.y}}function yU(i,e){return{x:i.x-e.x,y:i.y-e.y}}function X_(i,e){if(i.side==="top"||i.side==="bottom"){const{side:t,align:n}=i,s=n==="left"?0:n==="center"?e.width/2:n==="right"?e.width:n,o=t==="top"?0:t==="bottom"?e.height:t;return Gv({x:s,y:o},e)}else if(i.side==="left"||i.side==="right"){const{side:t,align:n}=i,s=t==="left"?0:t==="right"?e.width:t,o=n==="top"?0:n==="center"?e.height/2:n==="bottom"?e.height:n;return Gv({x:s,y:o},e)}return Gv({x:e.width/2,y:e.height/2},e)}const GO={static:SU,connected:_U},bU=fe({locationStrategy:{type:[String,Function],default:"static",validator:i=>typeof i=="function"||i in GO},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function wU(i,e){const t=Te({}),n=Te();yi&&(mr(()=>!!(e.isActive.value&&i.locationStrategy),o=>{var r,a;Le(()=>i.locationStrategy,o),Mn(()=>{n.value=void 0}),typeof i.locationStrategy=="function"?n.value=(r=i.locationStrategy(e,i,t))==null?void 0:r.updateLocation:n.value=(a=GO[i.locationStrategy](e,i,t))==null?void 0:a.updateLocation}),window.addEventListener("resize",s,{passive:!0}),Mn(()=>{window.removeEventListener("resize",s),n.value=void 0}));function s(o){var r;(r=n.value)==null||r.call(n,o)}return{contentStyles:t,updateLocation:n}}function SU(){}function EU(i,e){e?i.style.removeProperty("left"):i.style.removeProperty("right");const t=eS(i);return e?t.x+=parseFloat(i.style.right||0):t.x-=parseFloat(i.style.left||0),t.y-=parseFloat(i.style.top||0),t}function _U(i,e,t){LB(i.activatorEl.value)&&Object.assign(t.value,{position:"fixed",top:0,[i.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:o}=Xw(()=>{const g=ly(e.location,i.isRtl.value),p=e.origin==="overlap"?g:e.origin==="auto"?Fv(g):ly(e.origin,i.isRtl.value);return g.side===p.side&&g.align===Nv(p).align?{preferredAnchor:A_(g),preferredOrigin:A_(p)}:{preferredAnchor:g,preferredOrigin:p}}),[r,a,l,c]=["minWidth","minHeight","maxWidth","maxHeight"].map(g=>z(()=>{const p=parseFloat(e[g]);return isNaN(p)?1/0:p})),u=z(()=>{if(Array.isArray(e.offset))return e.offset;if(typeof e.offset=="string"){const g=e.offset.split(" ").map(parseFloat);return g.length<2&&g.push(0),g}return typeof e.offset=="number"?[e.offset,0]:[0,0]});let d=!1;const h=new ResizeObserver(()=>{d&&f()});Le([i.activatorEl,i.contentEl],(g,p)=>{let[v,y]=g,[C,m]=p;C&&h.unobserve(C),v&&h.observe(v),m&&h.unobserve(m),y&&h.observe(y)},{immediate:!0}),Mn(()=>{h.disconnect()});function f(){if(d=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>d=!0)}),!i.activatorEl.value||!i.contentEl.value)return;const g=i.activatorEl.value.getBoundingClientRect(),p=EU(i.contentEl.value,i.isRtl.value),v=lg(i.contentEl.value),y=12;v.length||(v.push(document.documentElement),i.contentEl.value.style.top&&i.contentEl.value.style.left||(p.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),p.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const C=v.reduce((S,x)=>{const T=x.getBoundingClientRect(),H=new _c({x:x===document.documentElement?0:T.x,y:x===document.documentElement?0:T.y,width:x.clientWidth,height:x.clientHeight});return S?new _c({x:Math.max(S.left,H.left),y:Math.max(S.top,H.top),width:Math.min(S.right,H.right)-Math.max(S.left,H.left),height:Math.min(S.bottom,H.bottom)-Math.max(S.top,H.top)}):H},void 0);C.x+=y,C.y+=y,C.width-=y*2,C.height-=y*2;let m={anchor:s.value,origin:o.value};function w(S){const x=new _c(p),T=X_(S.anchor,g),H=X_(S.origin,x);let{x:Y,y:Q}=yU(T,H);switch(S.anchor.side){case"top":Q-=u.value[0];break;case"bottom":Q+=u.value[0];break;case"left":Y-=u.value[0];break;case"right":Y+=u.value[0];break}switch(S.anchor.align){case"top":Q-=u.value[1];break;case"bottom":Q+=u.value[1];break;case"left":Y-=u.value[1];break;case"right":Y+=u.value[1];break}return x.x+=Y,x.y+=Q,x.width=Math.min(x.width,l.value),x.height=Math.min(x.height,c.value),{overflows:O_(x,C),x:Y,y:Q}}let E=0,R=0;const O={x:0,y:0},A={x:!1,y:!1};let D=-1;for(;!(D++>10);){const{x:S,y:x,overflows:T}=w(m);E+=S,R+=x,p.x+=S,p.y+=x;{const H=D_(m.anchor),Y=T.x.before||T.x.after,Q=T.y.before||T.y.after;let te=!1;if(["x","y"].forEach(F=>{if(F==="x"&&Y&&!A.x||F==="y"&&Q&&!A.y){const k={anchor:{...m.anchor},origin:{...m.origin}},q=F==="x"?H==="y"?Nv:Fv:H==="y"?Fv:Nv;k.anchor=q(k.anchor),k.origin=q(k.origin);const{overflows:V}=w(k);(V[F].before<=T[F].before&&V[F].after<=T[F].after||V[F].before+V[F].after<(T[F].before+T[F].after)/2)&&(m=k,te=A[F]=!0)}}),te)continue}T.x.before&&(E+=T.x.before,p.x+=T.x.before),T.x.after&&(E-=T.x.after,p.x-=T.x.after),T.y.before&&(R+=T.y.before,p.y+=T.y.before),T.y.after&&(R-=T.y.after,p.y-=T.y.after);{const H=O_(p,C);O.x=C.width-H.x.before-H.x.after,O.y=C.height-H.y.before-H.y.after,E+=H.x.before,p.x+=H.x.before,R+=H.y.before,p.y+=H.y.before}break}const L=D_(m.anchor);return Object.assign(t.value,{"--v-overlay-anchor-origin":`${m.anchor.side} ${m.anchor.align}`,transformOrigin:`${m.origin.side} ${m.origin.align}`,top:ke(Hv(R)),left:i.isRtl.value?void 0:ke(Hv(E)),right:i.isRtl.value?ke(Hv(-E)):void 0,minWidth:ke(L==="y"?Math.min(r.value,g.width):r.value),maxWidth:ke(Q_(Ai(O.x,r.value===1/0?0:r.value,l.value))),maxHeight:ke(Q_(Ai(O.y,a.value===1/0?0:a.value,c.value)))}),{available:O,contentBox:p}}return Le(()=>[s.value,o.value,e.offset,e.minWidth,e.minHeight,e.maxWidth,e.maxHeight],()=>f()),Wt(()=>{const g=f();if(!g)return;const{available:p,contentBox:v}=g;v.height>p.y&&requestAnimationFrame(()=>{f(),requestAnimationFrame(()=>{f()})})}),{updateLocation:f}}function Hv(i){return Math.round(i*devicePixelRatio)/devicePixelRatio}function Q_(i){return Math.ceil(i*devicePixelRatio)/devicePixelRatio}let wy=!0;const ug=[];function RU(i){!wy||ug.length?(ug.push(i),Sy()):(wy=!1,i(),Sy())}let Z_=-1;function Sy(){cancelAnimationFrame(Z_),Z_=requestAnimationFrame(()=>{const i=ug.shift();i&&i(),ug.length?Sy():wy=!0})}const yp={none:null,close:AU,block:DU,reposition:OU},TU=fe({scrollStrategy:{type:[String,Function],default:"block",validator:i=>typeof i=="function"||i in yp}},"VOverlay-scroll-strategies");function xU(i,e){if(!yi)return;let t;_n(async()=>{t==null||t.stop(),e.isActive.value&&i.scrollStrategy&&(t=Og(),await Wt(),t.active&&t.run(()=>{var n;typeof i.scrollStrategy=="function"?i.scrollStrategy(e,i,t):(n=yp[i.scrollStrategy])==null||n.call(yp,e,i,t)}))}),Mn(()=>{t==null||t.stop()})}function AU(i){function e(t){i.isActive.value=!1}HO(i.activatorEl.value??i.contentEl.value,e)}function DU(i,e){var r;const t=(r=i.root.value)==null?void 0:r.offsetParent,n=[...new Set([...lg(i.activatorEl.value,e.contained?t:void 0),...lg(i.contentEl.value,e.contained?t:void 0)])].filter(a=>!a.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,o=(a=>oS(a)&&a)(t||document.documentElement);o&&i.root.value.classList.add("v-overlay--scroll-blocked"),n.forEach((a,l)=>{a.style.setProperty("--v-body-scroll-x",ke(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",ke(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",ke(s)),a.classList.add("v-overlay-scroll-blocked")}),Mn(()=>{n.forEach((a,l)=>{const c=parseFloat(a.style.getPropertyValue("--v-body-scroll-x")),u=parseFloat(a.style.getPropertyValue("--v-body-scroll-y"));a.style.removeProperty("--v-body-scroll-x"),a.style.removeProperty("--v-body-scroll-y"),a.style.removeProperty("--v-scrollbar-offset"),a.classList.remove("v-overlay-scroll-blocked"),a.scrollLeft=-c,a.scrollTop=-u}),o&&i.root.value.classList.remove("v-overlay--scroll-blocked")})}function OU(i,e,t){let n=!1,s=-1,o=-1;function r(a){RU(()=>{var u,d;const l=performance.now();(d=(u=i.updateLocation).value)==null||d.call(u,a),n=(performance.now()-l)/(1e3/60)>2})}o=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{t.run(()=>{HO(i.activatorEl.value??i.contentEl.value,a=>{n?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{r(a)})})):r(a)})})}),Mn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(o),cancelAnimationFrame(s)})}function HO(i,e){const t=[document,...lg(i)];t.forEach(n=>{n.addEventListener("scroll",e,{passive:!0})}),Mn(()=>{t.forEach(n=>{n.removeEventListener("scroll",e)})})}const Ey=Symbol.for("vuetify:v-menu"),BO=fe({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function WO(i,e){const t={},n=s=>()=>{if(!yi)return Promise.resolve(!0);const o=s==="openDelay";return t.closeDelay&&window.clearTimeout(t.closeDelay),delete t.closeDelay,t.openDelay&&window.clearTimeout(t.openDelay),delete t.openDelay,new Promise(r=>{const a=parseInt(i[s]??0,10);t[s]=window.setTimeout(()=>{e==null||e(o),r(o)},a)})};return{runCloseDelay:n("closeDelay"),runOpenDelay:n("openDelay")}}const PU=fe({activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...BO()},"VOverlay-activator");function IU(i,e){let{isActive:t,isTop:n}=e;const s=Te();let o=!1,r=!1,a=!0;const l=z(()=>i.openOnFocus||i.openOnFocus==null&&i.openOnHover),c=z(()=>i.openOnClick||i.openOnClick==null&&!i.openOnHover&&!l.value),{runOpenDelay:u,runCloseDelay:d}=WO(i,m=>{m===(i.openOnHover&&o||l.value&&r)&&!(i.openOnHover&&t.value&&!n.value)&&(t.value!==m&&(a=!0),t.value=m)}),h={onClick:m=>{m.stopPropagation(),s.value=m.currentTarget||m.target,t.value=!t.value},onMouseenter:m=>{var w;(w=m.sourceCapabilities)!=null&&w.firesTouchEvents||(o=!0,s.value=m.currentTarget||m.target,u())},onMouseleave:m=>{o=!1,d()},onFocus:m=>{dy&&!m.target.matches(":focus-visible")||(r=!0,m.stopPropagation(),s.value=m.currentTarget||m.target,u())},onBlur:m=>{r=!1,m.stopPropagation(),d()}},f=z(()=>{const m={};return c.value&&(m.onClick=h.onClick),i.openOnHover&&(m.onMouseenter=h.onMouseenter,m.onMouseleave=h.onMouseleave),l.value&&(m.onFocus=h.onFocus,m.onBlur=h.onBlur),m}),g=z(()=>{const m={};if(i.openOnHover&&(m.onMouseenter=()=>{o=!0,u()},m.onMouseleave=()=>{o=!1,d()}),l.value&&(m.onFocusin=()=>{r=!0,u()},m.onFocusout=()=>{r=!1,d()}),i.closeOnContentClick){const w=ct(Ey,null);m.onClick=()=>{t.value=!1,w==null||w.closeParents()}}return m}),p=z(()=>{const m={};return i.openOnHover&&(m.onMouseenter=()=>{a&&(o=!0,a=!1,u())},m.onMouseleave=()=>{o=!1,d()}),m});Le(n,m=>{m&&(i.openOnHover&&!o&&(!l.value||!r)||l.value&&!r&&(!i.openOnHover||!o))&&(t.value=!1)});const v=Te();_n(()=>{v.value&&Wt(()=>{s.value=ry(v.value)})});const y=Ii("useActivator");let C;return Le(()=>!!i.activator,m=>{m&&yi?(C=Og(),C.run(()=>{MU(i,y,{activatorEl:s,activatorEvents:f})})):C&&C.stop()},{flush:"post",immediate:!0}),Mn(()=>{C==null||C.stop()}),{activatorEl:s,activatorRef:v,activatorEvents:f,contentEvents:g,scrimEvents:p}}function MU(i,e,t){let{activatorEl:n,activatorEvents:s}=t;Le(()=>i.activator,(l,c)=>{if(c&&l!==c){const u=a(c);u&&r(u)}l&&Wt(()=>o())},{immediate:!0}),Le(()=>i.activatorProps,()=>{o()}),Mn(()=>{r()});function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i.activatorProps;l&&uB(l,Ie(s.value,c))}function r(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i.activatorProps;l&&dB(l,Ie(s.value,c))}function a(){var u,d;let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.activator,c;if(l)if(l==="parent"){let h=(d=(u=e==null?void 0:e.proxy)==null?void 0:u.$el)==null?void 0:d.parentNode;for(;h.hasAttribute("data-no-activator");)h=h.parentNode;c=h}else typeof l=="string"?c=document.querySelector(l):"$el"in l?c=l.$el:c=l;return n.value=(c==null?void 0:c.nodeType)===Node.ELEMENT_NODE?c:null,n.value}}const Um=["sm","md","lg","xl","xxl"],_y=Symbol.for("vuetify:display"),J_={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},LU=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J_;return ys(J_,i)};function eR(i){return yi&&!i?window.innerWidth:typeof i=="object"&&i.clientWidth||0}function tR(i){return yi&&!i?window.innerHeight:typeof i=="object"&&i.clientHeight||0}function iR(i){const e=yi&&!i?window.navigator.userAgent:"ssr";function t(g){return!!e.match(g)}const n=t(/android/i),s=t(/iphone|ipad|ipod/i),o=t(/cordova/i),r=t(/electron/i),a=t(/chrome/i),l=t(/edge/i),c=t(/firefox/i),u=t(/opera/i),d=t(/win/i),h=t(/mac/i),f=t(/linux/i);return{android:n,ios:s,cordova:o,electron:r,chrome:a,edge:l,firefox:c,opera:u,win:d,mac:h,linux:f,touch:IB,ssr:e==="ssr"}}function FU(i,e){const{thresholds:t,mobileBreakpoint:n}=LU(i),s=Fe(tR(e)),o=Fe(iR(e)),r=xi({}),a=Fe(eR(e));function l(){s.value=tR(),a.value=eR()}function c(){l(),o.value=iR()}return _n(()=>{const u=a.value<t.sm,d=a.value<t.md&&!u,h=a.value<t.lg&&!(d||u),f=a.value<t.xl&&!(h||d||u),g=a.value<t.xxl&&!(f||h||d||u),p=a.value>=t.xxl,v=u?"xs":d?"sm":h?"md":f?"lg":g?"xl":"xxl",y=typeof n=="number"?n:t[n],C=a.value<y;r.xs=u,r.sm=d,r.md=h,r.lg=f,r.xl=g,r.xxl=p,r.smAndUp=!u,r.mdAndUp=!(u||d),r.lgAndUp=!(u||d||h),r.xlAndUp=!(u||d||h||f),r.smAndDown=!(h||f||g||p),r.mdAndDown=!(f||g||p),r.lgAndDown=!(g||p),r.xlAndDown=!p,r.name=v,r.height=s.value,r.width=a.value,r.mobile=C,r.mobileBreakpoint=n,r.platform=o.value,r.thresholds=t}),yi&&window.addEventListener("resize",l,{passive:!0}),{...db(r),update:c,ssr:!!e}}function $l(){const i=ct(_y);if(!i)throw new Error("Could not find Vuetify display injection");return i}function UO(){if(!yi)return Fe(!1);const{ssr:i}=$l();if(i){const e=Fe(!1);return Pi(()=>{e.value=!0}),e}else return Fe(!0)}const jm=fe({eager:Boolean},"lazy");function bS(i,e){const t=Fe(!1),n=z(()=>t.value||i.eager||e.value);Le(e,()=>t.value=!0);function s(){i.eager||(t.value=!1)}return{isBooted:t,hasContent:n,onAfterLeave:s}}function Au(){const e=Ii("useScopeId").vnode.scopeId;return{scopeId:e?{[e]:""}:void 0}}const nR=Symbol.for("vuetify:stack"),ku=xi([]);function NU(i,e,t){const n=Ii("useStack"),s=!t,o=ct(nR,void 0),r=xi({activeChildren:new Set});Ht(nR,r);const a=Fe(+e.value);mr(i,()=>{var d;const u=(d=ku.at(-1))==null?void 0:d[1];a.value=u?u+10:+e.value,s&&ku.push([n.uid,a.value]),o==null||o.activeChildren.add(n.uid),Mn(()=>{if(s){const h=it(ku).findIndex(f=>f[0]===n.uid);ku.splice(h,1)}o==null||o.activeChildren.delete(n.uid)})});const l=Fe(!0);s&&_n(()=>{var d;const u=((d=ku.at(-1))==null?void 0:d[0])===n.uid;setTimeout(()=>l.value=u)});const c=z(()=>!r.activeChildren.size);return{globalTop:bh(l),localTop:c,stackStyles:z(()=>({zIndex:a.value}))}}function kU(i){return{teleportTarget:z(()=>{const t=i.value;if(t===!0||!yi)return;const n=t===!1?document.body:typeof t=="string"?document.querySelector(t):t;if(n==null)return;let s=n.querySelector(":scope > .v-overlay-container");return s||(s=document.createElement("div"),s.className="v-overlay-container",n.appendChild(s)),s})}}function VU(){return!0}function jO(i,e,t){if(!i||$O(i,t)===!1)return!1;const n=KD(e);if(typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&n.host===i.target)return!1;const s=(typeof t.value=="object"&&t.value.include||(()=>[]))();return s.push(e),!s.some(o=>o==null?void 0:o.contains(i.target))}function $O(i,e){return(typeof e.value=="object"&&e.value.closeConditional||VU)(i)}function GU(i,e,t){const n=typeof t.value=="function"?t.value:t.value.handler;e._clickOutside.lastMousedownWasOutside&&jO(i,e,t)&&setTimeout(()=>{$O(i,t)&&n&&n(i)},0)}function sR(i,e){const t=KD(i);e(document),typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&e(t)}const zO={mounted(i,e){const t=s=>GU(s,i,e),n=s=>{i._clickOutside.lastMousedownWasOutside=jO(s,i,e)};sR(i,s=>{s.addEventListener("click",t,!0),s.addEventListener("mousedown",n,!0)}),i._clickOutside||(i._clickOutside={lastMousedownWasOutside:!1}),i._clickOutside[e.instance.$.uid]={onClick:t,onMousedown:n}},unmounted(i,e){i._clickOutside&&(sR(i,t=>{var o;if(!t||!((o=i._clickOutside)!=null&&o[e.instance.$.uid]))return;const{onClick:n,onMousedown:s}=i._clickOutside[e.instance.$.uid];t.removeEventListener("click",n,!0),t.removeEventListener("mousedown",s,!0)}),delete i._clickOutside[e.instance.$.uid])}};function HU(i){const{modelValue:e,color:t,...n}=i;return b(Po,{name:"fade-transition",appear:!0},{default:()=>[i.modelValue&&b("div",Ie({class:["v-overlay__scrim",i.color.backgroundColorClasses.value],style:i.color.backgroundColorStyles.value},n),null)]})}const gf=fe({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...PU(),...Ve(),...Vs(),...jm(),...bU(),...TU(),...St(),...Or()},"VOverlay"),yr=Ee()({name:"VOverlay",directives:{ClickOutside:zO},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...gf()},emits:{"click:outside":i=>!0,"update:modelValue":i=>!0,afterLeave:()=>!0},setup(i,e){let{slots:t,attrs:n,emit:s}=e;const o=Ke(i,"modelValue"),r=z({get:()=>o.value,set:k=>{k&&i.disabled||(o.value=k)}}),{teleportTarget:a}=kU(z(()=>i.attach||i.contained)),{themeClasses:l}=Pt(i),{rtlClasses:c,isRtl:u}=Bi(),{hasContent:d,onAfterLeave:h}=bS(i,r),f=di(z(()=>typeof i.scrim=="string"?i.scrim:null)),{globalTop:g,localTop:p,stackStyles:v}=NU(r,Se(i,"zIndex"),i._disableGlobalStack),{activatorEl:y,activatorRef:C,activatorEvents:m,contentEvents:w,scrimEvents:E}=IU(i,{isActive:r,isTop:p}),{dimensionStyles:R}=Gs(i),O=UO(),{scopeId:A}=Au();Le(()=>i.disabled,k=>{k&&(r.value=!1)});const D=Te(),L=Te(),{contentStyles:S,updateLocation:x}=wU(i,{isRtl:u,contentEl:L,activatorEl:y,isActive:r});xU(i,{root:D,contentEl:L,activatorEl:y,isActive:r,updateLocation:x});function T(k){s("click:outside",k),i.persistent?F():r.value=!1}function H(){return r.value&&g.value}yi&&Le(r,k=>{k?window.addEventListener("keydown",Y):window.removeEventListener("keydown",Y)},{immediate:!0});function Y(k){var q,V;k.key==="Escape"&&g.value&&(i.persistent?F():(r.value=!1,(q=L.value)!=null&&q.contains(document.activeElement)&&((V=y.value)==null||V.focus())))}const Q=tO();mr(()=>i.closeOnBack,()=>{mW(Q,k=>{g.value&&r.value?(k(!1),i.persistent?F():r.value=!1):k()})});const te=Te();Le(()=>r.value&&(i.absolute||i.contained)&&a.value==null,k=>{if(k){const q=sS(D.value);q&&q!==document.scrollingElement&&(te.value=q.scrollTop)}});function F(){i.noClickAnimation||L.value&&el(L.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:ah})}return _e(()=>{var k;return b(He,null,[(k=t.activator)==null?void 0:k.call(t,{isActive:r.value,props:Ie({ref:C},m.value,i.activatorProps)}),O.value&&d.value&&b(iF,{disabled:!a.value,to:a.value},{default:()=>[b("div",Ie({class:["v-overlay",{"v-overlay--absolute":i.absolute||i.contained,"v-overlay--active":r.value,"v-overlay--contained":i.contained},l.value,c.value,i.class],style:[v.value,{top:ke(te.value)},i.style],ref:D},A,n),[b(HU,Ie({color:f,modelValue:r.value&&!!i.scrim},E.value),null),b(Xs,{appear:!0,persisted:!0,transition:i.transition,target:y.value,onAfterLeave:()=>{h(),s("afterLeave")}},{default:()=>{var q;return[Mt(b("div",Ie({ref:L,class:["v-overlay__content",i.contentClass],style:[R.value,S.value]},w.value,i.contentProps),[(q=t.default)==null?void 0:q.call(t,{isActive:r})]),[[Ps,r.value],[Vi("click-outside"),{handler:T,closeConditional:H,include:()=>[y.value]}]])]}})])]})])}),{activatorEl:y,animateClick:F,contentEl:L,globalTop:g,localTop:p,updateLocation:x}}}),Bv=Symbol("Forwarded refs");function Wv(i,e){let t=i;for(;t;){const n=Reflect.getOwnPropertyDescriptor(t,e);if(n)return n;t=Object.getPrototypeOf(t)}}function po(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return i[Bv]=t,new Proxy(i,{get(s,o){if(Reflect.has(s,o))return Reflect.get(s,o);if(!(typeof o=="symbol"||o.startsWith("__"))){for(const r of t)if(r.value&&Reflect.has(r.value,o)){const a=Reflect.get(r.value,o);return typeof a=="function"?a.bind(r.value):a}}},has(s,o){if(Reflect.has(s,o))return!0;if(typeof o=="symbol"||o.startsWith("__"))return!1;for(const r of t)if(r.value&&Reflect.has(r.value,o))return!0;return!1},getOwnPropertyDescriptor(s,o){var a;const r=Reflect.getOwnPropertyDescriptor(s,o);if(r)return r;if(!(typeof o=="symbol"||o.startsWith("__"))){for(const l of t){if(!l.value)continue;const c=Wv(l.value,o)??("_"in l.value?Wv((a=l.value._)==null?void 0:a.setupState,o):void 0);if(c)return c}for(const l of t){const c=l.value&&l.value[Bv];if(!c)continue;const u=c.slice();for(;u.length;){const d=u.shift(),h=Wv(d.value,o);if(h)return h;const f=d.value&&d.value[Bv];f&&u.push(...f)}}}}})}const BU=fe({id:String,...qo(gf({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:km}}),["absolute"])},"VMenu"),$m=Ee()({name:"VMenu",props:BU(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{scopeId:s}=Au(),o=hn(),r=z(()=>i.id||`v-menu-${o}`),a=Te(),l=ct(Ey,null),c=Fe(0);Ht(Ey,{register(){++c.value},unregister(){--c.value},closeParents(){setTimeout(()=>{c.value||(n.value=!1,l==null||l.closeParents())},40)}}),Le(n,g=>{g?l==null||l.register():l==null||l.unregister()});function u(){l==null||l.closeParents()}function d(g){var p,v;i.disabled||g.key==="Tab"&&(n.value=!1,(v=(p=a.value)==null?void 0:p.activatorEl)==null||v.focus())}function h(g){var v;if(i.disabled)return;const p=(v=a.value)==null?void 0:v.contentEl;p&&n.value?g.key==="ArrowDown"?(g.preventDefault(),rg(p,"next")):g.key==="ArrowUp"&&(g.preventDefault(),rg(p,"prev")):["ArrowDown","ArrowUp"].includes(g.key)&&(n.value=!0,g.preventDefault(),setTimeout(()=>setTimeout(()=>h(g))))}const f=z(()=>Ie({"aria-haspopup":"menu","aria-expanded":String(n.value),"aria-owns":r.value,onKeydown:h},i.activatorProps));return _e(()=>{const[g]=yr.filterProps(i);return b(yr,Ie({ref:a,class:["v-menu",i.class],style:i.style},g,{modelValue:n.value,"onUpdate:modelValue":p=>n.value=p,absolute:!0,activatorProps:f.value,"onClick:outside":u,onKeydown:d},s),{activator:t.activator,default:function(){for(var p=arguments.length,v=new Array(p),y=0;y<p;y++)v[y]=arguments[y];return b(Nt,{root:"VMenu"},{default:()=>{var C;return[(C=t.default)==null?void 0:C.call(t,...v)]}})}})}),po({id:r,ΨopenChildren:c},a)}});const WU=fe({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ve(),...Or({transition:{component:gS}})},"VCounter"),zm=Ee()({name:"VCounter",functional:!0,props:WU(),setup(i,e){let{slots:t}=e;const n=z(()=>i.max?`${i.value} / ${i.max}`:String(i.value));return _e(()=>b(Xs,{transition:i.transition},{default:()=>[Mt(b("div",{class:["v-counter",i.class],style:i.style},[t.default?t.default({counter:n.value,max:i.max,value:i.value}):n.value]),[[Ps,i.active]])]})),{}}});const UU=fe({floating:Boolean,...Ve()},"VFieldLabel"),Qu=Ee()({name:"VFieldLabel",props:UU(),setup(i,e){let{slots:t}=e;return _e(()=>b(xu,{class:["v-field-label",{"v-field-label--floating":i.floating},i.class],style:i.style,"aria-hidden":i.floating||void 0},t)),{}}}),jU=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Km=fe({appendInnerIcon:tt,bgColor:String,clearable:Boolean,clearIcon:{type:tt,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:tt,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:i=>jU.includes(i)},"onClick:clear":Do(),"onClick:appendInner":Do(),"onClick:prependInner":Do(),...Ve(),...Fm(),...Zt(),...St()},"VField"),mf=Ee()({name:"VField",inheritAttrs:!1,props:{id:String,...Hm(),...Km()},emits:{"update:focused":i=>!0,"update:modelValue":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const{themeClasses:o}=Pt(i),{loaderClasses:r}=uf(i),{focusClasses:a,isFocused:l,focus:c,blur:u}=Ma(i),{InputIcon:d}=mO(i),{roundedClasses:h}=ni(i),{rtlClasses:f}=Bi(),g=z(()=>i.dirty||i.active),p=z(()=>!i.singleLine&&!!(i.label||s.label)),v=hn(),y=z(()=>i.id||`input-${v}`),C=z(()=>`${y.value}-messages`),m=Te(),w=Te(),E=Te(),R=z(()=>["plain","underlined"].includes(i.variant)),{backgroundColorClasses:O,backgroundColorStyles:A}=di(Se(i,"bgColor")),{textColorClasses:D,textColorStyles:L}=cn(z(()=>i.error||i.disabled?void 0:g.value&&l.value?i.color:i.baseColor));Le(g,T=>{if(p.value){const H=m.value.$el,Y=w.value.$el;requestAnimationFrame(()=>{const Q=eS(H),te=Y.getBoundingClientRect(),F=te.x-Q.x,k=te.y-Q.y-(Q.height/2-te.height/2),q=te.width/.75,V=Math.abs(q-Q.width)>1?{maxWidth:ke(q)}:void 0,J=getComputedStyle(H),ae=getComputedStyle(Y),se=parseFloat(J.transitionDuration)*1e3||150,ce=parseFloat(ae.getPropertyValue("--v-field-label-scale")),re=ae.getPropertyValue("color");H.style.visibility="visible",Y.style.visibility="hidden",el(H,{transform:`translate(${F}px, ${k}px) scale(${ce})`,color:re,...V},{duration:se,easing:ah,direction:T?"normal":"reverse"}).finished.then(()=>{H.style.removeProperty("visibility"),Y.style.removeProperty("visibility")})})}},{flush:"post"});const S=z(()=>({isActive:g,isFocused:l,controlRef:E,blur:u,focus:c}));function x(T){T.target!==document.activeElement&&T.preventDefault()}return _e(()=>{var F,k,q;const T=i.variant==="outlined",H=s["prepend-inner"]||i.prependInnerIcon,Y=!!(i.clearable||s.clear),Q=!!(s["append-inner"]||i.appendInnerIcon||Y),te=s.label?s.label({...S.value,label:i.label,props:{for:y.value}}):i.label;return b("div",Ie({class:["v-field",{"v-field--active":g.value,"v-field--appended":Q,"v-field--center-affix":i.centerAffix??!R.value,"v-field--disabled":i.disabled,"v-field--dirty":i.dirty,"v-field--error":i.error,"v-field--flat":i.flat,"v-field--has-background":!!i.bgColor,"v-field--persistent-clear":i.persistentClear,"v-field--prepended":H,"v-field--reverse":i.reverse,"v-field--single-line":i.singleLine,"v-field--no-label":!te,[`v-field--variant-${i.variant}`]:!0},o.value,O.value,a.value,r.value,h.value,f.value,i.class],style:[A.value,L.value,i.style],onClick:x},t),[b("div",{class:"v-field__overlay"},null),b(Nm,{name:"v-field",active:!!i.loading,color:i.error?"error":typeof i.loading=="string"?i.loading:i.color},{default:s.loader}),H&&b("div",{key:"prepend",class:"v-field__prepend-inner"},[i.prependInnerIcon&&b(d,{key:"prepend-icon",name:"prependInner"},null),(F=s["prepend-inner"])==null?void 0:F.call(s,S.value)]),b("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(i.variant)&&p.value&&b(Qu,{key:"floating-label",ref:w,class:[D.value],floating:!0,for:y.value},{default:()=>[te]}),b(Qu,{ref:m,for:y.value},{default:()=>[te]}),(k=s.default)==null?void 0:k.call(s,{...S.value,props:{id:y.value,class:"v-field__input","aria-describedby":C.value},focus:c,blur:u})]),Y&&b(mS,{key:"clear"},{default:()=>[Mt(b("div",{class:"v-field__clearable",onMousedown:V=>{V.preventDefault(),V.stopPropagation()}},[s.clear?s.clear():b(d,{name:"clear"},null)]),[[Ps,i.dirty]])]}),Q&&b("div",{key:"append",class:"v-field__append-inner"},[(q=s["append-inner"])==null?void 0:q.call(s,S.value),i.appendInnerIcon&&b(d,{key:"append-icon",name:"appendInner"},null)]),b("div",{class:["v-field__outline",D.value]},[T&&b(He,null,[b("div",{class:"v-field__outline__start"},null),p.value&&b("div",{class:"v-field__outline__notch"},[b(Qu,{ref:w,floating:!0,for:y.value},{default:()=>[te]})]),b("div",{class:"v-field__outline__end"},null)]),R.value&&p.value&&b(Qu,{ref:w,floating:!0,for:y.value},{default:()=>[te]})])])}),{controlRef:E}}});function wS(i){const e=Object.keys(mf.props).filter(t=>!Qw(t)&&t!=="class"&&t!=="style");return bu(i,e)}const $U=["color","file","time","date","datetime-local","week","month"],Ym=fe({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,type:{type:String,default:"text"},modelModifiers:Object,...Pr(),...Km()},"VTextField"),El=Ee()({name:"VTextField",directives:{Intersect:ff},inheritAttrs:!1,props:Ym(),emits:{"click:control":i=>!0,"mousedown:control":i=>!0,"update:focused":i=>!0,"update:modelValue":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const o=Ke(i,"modelValue"),{isFocused:r,focus:a,blur:l}=Ma(i),c=z(()=>typeof i.counterValue=="function"?i.counterValue(o.value):(o.value??"").toString().length),u=z(()=>{if(t.maxlength)return t.maxlength;if(!(!i.counter||typeof i.counter!="number"&&typeof i.counter!="string"))return i.counter}),d=z(()=>["plain","underlined"].includes(i.variant));function h(R,O){var A,D;!i.autofocus||!R||(D=(A=O[0].target)==null?void 0:A.focus)==null||D.call(A)}const f=Te(),g=Te(),p=Te(),v=z(()=>$U.includes(i.type)||i.persistentPlaceholder||r.value||i.active);function y(){var R;p.value!==document.activeElement&&((R=p.value)==null||R.focus()),r.value||a()}function C(R){n("mousedown:control",R),R.target!==p.value&&(y(),R.preventDefault())}function m(R){y(),n("click:control",R)}function w(R){R.stopPropagation(),y(),Wt(()=>{o.value=null,Zw(i["onClick:clear"],R)})}function E(R){var A;const O=R.target;if(o.value=O.value,(A=i.modelModifiers)!=null&&A.trim&&["text","search","password","tel","url"].includes(i.type)){const D=[O.selectionStart,O.selectionEnd];Wt(()=>{O.selectionStart=D[0],O.selectionEnd=D[1]})}}return _e(()=>{const R=!!(s.counter||i.counter||i.counterValue),O=!!(R||s.details),[A,D]=Hl(t),[{modelValue:L,...S}]=$i.filterProps(i),[x]=wS(i);return b($i,Ie({ref:f,modelValue:o.value,"onUpdate:modelValue":T=>o.value=T,class:["v-text-field",{"v-text-field--prefixed":i.prefix,"v-text-field--suffixed":i.suffix,"v-text-field--plain-underlined":["plain","underlined"].includes(i.variant)},i.class],style:i.style},A,S,{centerAffix:!d.value,focused:r.value}),{...s,default:T=>{let{id:H,isDisabled:Y,isDirty:Q,isReadonly:te,isValid:F}=T;return b(mf,Ie({ref:g,onMousedown:C,onClick:m,"onClick:clear":w,"onClick:prependInner":i["onClick:prependInner"],"onClick:appendInner":i["onClick:appendInner"],role:"textbox"},x,{id:H.value,active:v.value||Q.value,dirty:Q.value||i.dirty,disabled:Y.value,focused:r.value,error:F.value===!1}),{...s,default:k=>{let{props:{class:q,...V}}=k;const J=Mt(b("input",Ie({ref:p,value:o.value,onInput:E,autofocus:i.autofocus,readonly:te.value,disabled:Y.value,name:i.name,placeholder:i.placeholder,size:1,type:i.type,onFocus:y,onBlur:l},V,D),null),[[Vi("intersect"),{handler:h},null,{once:!0}]]);return b(He,null,[i.prefix&&b("span",{class:"v-text-field__prefix"},[b("span",{class:"v-text-field__prefix__text"},[i.prefix])]),b("div",{class:q,"data-no-activator":""},[s.default?b(He,null,[s.default(),J]):dr(J)]),i.suffix&&b("span",{class:"v-text-field__suffix"},[b("span",{class:"v-text-field__suffix__text"},[i.suffix])])])}})},details:O?T=>{var H;return b(He,null,[(H=s.details)==null?void 0:H.call(s,T),R&&b(He,null,[b("span",null,null),b(zm,{active:i.persistentCounter||r.value,value:c.value,max:u.value},s.counter)])])}:void 0})}),po({},f,g,p)}});const zU=fe({renderless:Boolean,...Ve()},"VVirtualScrollItem"),KU=Ee()({name:"VVirtualScrollItem",inheritAttrs:!1,props:zU(),emits:{"update:height":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const{resizeRef:o,contentRect:r}=Bo(void 0,"border");Le(()=>{var a;return(a=r.value)==null?void 0:a.height},a=>{a!=null&&n("update:height",a)}),_e(()=>{var a,l;return i.renderless?b(He,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:o})]):b("div",Ie({ref:o,class:["v-virtual-scroll__item",i.class],style:i.style},t),[(l=s.default)==null?void 0:l.call(s)])})}}),oR=-1,rR=1,YU=fe({itemHeight:{type:[Number,String],default:48}},"virtual");function qU(i,e,t){const n=Fe(0),s=Fe(i.itemHeight),o=z({get:()=>parseInt(s.value??0,10),set(O){s.value=O}}),r=Te(),{resizeRef:a,contentRect:l}=Bo();_n(()=>{a.value=r.value});const c=$l(),u=new Map;let d=Array.from({length:e.value.length});const h=z(()=>{const O=(!l.value||r.value===document.documentElement?c.height.value:l.value.height)-((t==null?void 0:t.value)??0);return Math.ceil(O/o.value*1.7+1)});function f(O,A){o.value=Math.max(o.value,A),d[O]=A,u.set(e.value[O],A)}function g(O){return d.slice(0,O).reduce((A,D)=>A+(D||o.value),0)}function p(O){const A=e.value.length;let D=0,L=0;for(;L<O&&D<A;)L+=d[D++]||o.value;return D-1}let v=0;function y(){if(!r.value||!l.value)return;const O=l.value.height-56,A=r.value.scrollTop,D=A<v?oR:rR,L=p(A+O/2),S=Math.round(h.value/3),x=L-S,T=n.value+S*2-1;D===oR&&L<=T?n.value=Ai(x,0,e.value.length):D===rR&&L>=T&&(n.value=Ai(x,0,e.value.length-h.value)),v=A}function C(O){if(!r.value)return;const A=g(O);r.value.scrollTop=A}const m=z(()=>Math.min(e.value.length,n.value+h.value)),w=z(()=>e.value.slice(n.value,m.value).map((O,A)=>({raw:O,index:A+n.value}))),E=z(()=>g(n.value)),R=z(()=>g(e.value.length)-g(m.value));return Le(()=>e.value.length,()=>{d=qs(e.value.length).map(()=>o.value),u.forEach((O,A)=>{const D=e.value.indexOf(A);D===-1?u.delete(A):d[D]=O})}),{containerRef:r,computedItems:w,itemHeight:o,paddingTop:E,paddingBottom:R,scrollToIndex:C,handleScroll:y,handleItemResize:f}}const XU=fe({items:{type:Array,default:()=>[]},renderless:Boolean,...YU(),...Ve(),...Vs()},"VVirtualScroll"),qm=Ee()({name:"VVirtualScroll",props:XU(),setup(i,e){let{slots:t}=e;const n=Ii("VVirtualScroll"),{dimensionStyles:s}=Gs(i),{containerRef:o,handleScroll:r,handleItemResize:a,scrollToIndex:l,paddingTop:c,paddingBottom:u,computedItems:d}=qU(i,Se(i,"items"));return mr(()=>i.renderless,()=>{Pi(()=>{var h;o.value=sS(n.vnode.el,!0),(h=o.value)==null||h.addEventListener("scroll",r)}),Mn(()=>{var h;(h=o.value)==null||h.removeEventListener("scroll",r)})}),_e(()=>{const h=d.value.map(f=>b(KU,{key:f.index,renderless:i.renderless,"onUpdate:height":g=>a(f.index,g)},{default:g=>{var p;return(p=t.default)==null?void 0:p.call(t,{item:f.raw,index:f.index,...g})}}));return i.renderless?b(He,null,[b("div",{class:"v-virtual-scroll__spacer",style:{paddingTop:ke(c.value)}},null),h,b("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:ke(u.value)}},null)]):b("div",{ref:o,class:["v-virtual-scroll",i.class],onScroll:r,style:[s.value,i.style]},[b("div",{class:"v-virtual-scroll__container",style:{paddingTop:ke(c.value),paddingBottom:ke(u.value)}},[h])])}),{scrollToIndex:l}}});function SS(i,e){const t=Fe(!1);let n;function s(a){cancelAnimationFrame(n),t.value=!0,n=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>{t.value=!1})})}async function o(){await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>{if(t.value){const l=Le(t,()=>{l(),a()})}else a()})}async function r(a){var u,d;if(a.key==="Tab"&&((u=e.value)==null||u.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=i.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await o();const c=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const h=l.getBoundingClientRect().top;for(const f of c)if(f.getBoundingClientRect().top>=h){f.focus();break}}else{const h=l.getBoundingClientRect().bottom;for(const f of[...c].reverse())if(f.getBoundingClientRect().bottom<=h){f.focus();break}}}return{onListScroll:s,onListKeydown:r}}const ES=fe({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,menu:Boolean,menuIcon:{type:tt,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,valueComparator:{type:Function,default:Da},...NO({itemChildren:!1})},"Select"),QU=fe({...ES(),...qo(Ym({modelValue:null}),["validationValue","dirty","appendInnerIcon"]),...Or({transition:{component:km}})},"VSelect"),KO=Ee()({name:"VSelect",props:QU(),emits:{"update:focused":i=>!0,"update:modelValue":i=>!0,"update:menu":i=>!0},setup(i,e){let{slots:t}=e;const{t:n}=Rn(),s=Te(),o=Te(),r=Ke(i,"menu"),a=z({get:()=>r.value,set:H=>{var Y;r.value&&!H&&((Y=o.value)!=null&&Y.ΨopenChildren)||(r.value=H)}}),{items:l,transformIn:c,transformOut:u}=yS(i),d=Ke(i,"modelValue",[],H=>c(H===null?[null]:In(H)),H=>{const Y=u(H);return i.multiple?Y:Y[0]??null}),h=Bm(),f=z(()=>d.value.map(H=>l.value.find(Y=>i.valueComparator(Y.value,H.value))||H)),g=z(()=>f.value.map(H=>H.props.value)),p=Fe(!1);let v="",y;const C=z(()=>i.hideSelected?l.value.filter(H=>!f.value.some(Y=>Y===H)):l.value),m=z(()=>i.hideNoData&&!l.value.length||i.readonly||(h==null?void 0:h.isReadonly.value)),w=Te(),{onListScroll:E,onListKeydown:R}=SS(w,s);function O(H){i.openOnClear&&(a.value=!0)}function A(){m.value||(a.value=!a.value)}function D(H){var k,q;if(i.readonly||h!=null&&h.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(H.key)&&H.preventDefault(),["Enter","ArrowDown"," "].includes(H.key)&&(a.value=!0),["Escape","Tab"].includes(H.key)&&(a.value=!1),H.key==="Home"?(k=w.value)==null||k.focus("first"):H.key==="End"&&((q=w.value)==null||q.focus("last"));const Y=1e3;function Q(V){const J=V.key.length===1,ae=!V.ctrlKey&&!V.metaKey&&!V.altKey;return J&&ae}if(i.multiple||!Q(H))return;const te=performance.now();te-y>Y&&(v=""),v+=H.key.toLowerCase(),y=te;const F=l.value.find(V=>V.title.toLowerCase().startsWith(v));F!==void 0&&(d.value=[F])}function L(H){if(i.multiple){const Y=g.value.findIndex(Q=>i.valueComparator(Q,H.value));if(Y===-1)d.value=[...d.value,H];else{const Q=[...d.value];Q.splice(Y,1),d.value=Q}}else d.value=[H],a.value=!1}function S(H){var Y;(Y=w.value)!=null&&Y.$el.contains(H.relatedTarget)||(a.value=!1)}function x(){var H;p.value&&((H=s.value)==null||H.focus())}function T(H){p.value=!0}return _e(()=>{const H=!!(i.chips||t.chip),Y=!!(!i.hideNoData||C.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),Q=d.value.length>0,[te]=El.filterProps(i),F=Q||!p.value&&i.label&&!i.persistentPlaceholder?void 0:i.placeholder;return b(El,Ie({ref:s},te,{modelValue:d.value.map(k=>k.props.value).join(", "),"onUpdate:modelValue":k=>{k==null&&(d.value=[])},focused:p.value,"onUpdate:focused":k=>p.value=k,validationValue:d.externalValue,dirty:Q,class:["v-select",{"v-select--active-menu":a.value,"v-select--chips":!!i.chips,[`v-select--${i.multiple?"multiple":"single"}`]:!0,"v-select--selected":d.value.length,"v-select--selection-slot":!!t.selection},i.class],style:i.style,readonly:!0,placeholder:F,"onClick:clear":O,"onMousedown:control":A,onBlur:S,onKeydown:D}),{...t,default:()=>b(He,null,[b($m,Ie({ref:o,modelValue:a.value,"onUpdate:modelValue":k=>a.value=k,activator:"parent",contentClass:"v-select__content",disabled:m.value,eager:i.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:i.transition,onAfterLeave:x},i.menuProps),{default:()=>[Y&&b(Wm,{ref:w,selected:g.value,selectStrategy:i.multiple?"independent":"single-independent",onMousedown:k=>k.preventDefault(),onKeydown:R,onFocusin:T,onScrollPassive:E,tabindex:"-1"},{default:()=>{var k,q,V;return[(k=t["prepend-item"])==null?void 0:k.call(t),!C.value.length&&!i.hideNoData&&(((q=t["no-data"])==null?void 0:q.call(t))??b(Cr,{title:n(i.noDataText)},null)),b(qm,{renderless:!0,items:C.value},{default:J=>{var K;let{item:ae,index:se,itemRef:ce}=J;const re=Ie(ae.props,{ref:ce,key:se,onClick:()=>L(ae)});return((K=t.item)==null?void 0:K.call(t,{item:ae,index:se,props:re}))??b(Cr,re,{prepend:he=>{let{isSelected:ne}=he;return b(He,null,[i.multiple&&!i.hideSelected?b(vr,{key:ae.value,modelValue:ne,ripple:!1,tabindex:"-1"},null):void 0,ae.props.prependIcon&&b(Gt,{icon:ae.props.prependIcon},null)])}})}}),(V=t["append-item"])==null?void 0:V.call(t)]}})]}),f.value.map((k,q)=>{var ae;function V(se){se.stopPropagation(),se.preventDefault(),L(k)}const J={"onClick:close":V,onMousedown(se){se.preventDefault(),se.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return b("div",{key:k.value,class:"v-select__selection"},[H?t.chip?b(Nt,{key:"chip-defaults",defaults:{VChip:{closable:i.closableChips,size:"small",text:k.title}}},{default:()=>{var se;return[(se=t.chip)==null?void 0:se.call(t,{item:k,index:q,props:J})]}}):b(pf,Ie({key:"chip",closable:i.closableChips,size:"small",text:k.title},J),null):((ae=t.selection)==null?void 0:ae.call(t,{item:k,index:q}))??b("span",{class:"v-select__selection-text"},[k.title,i.multiple&&q<f.value.length-1&&b("span",{class:"v-select__selection-comma"},[De(",")])])])})]),"append-inner":function(){var J;for(var k=arguments.length,q=new Array(k),V=0;V<k;V++)q[V]=arguments[V];return b(He,null,[(J=t["append-inner"])==null?void 0:J.call(t,...q),i.menuIcon?b(Gt,{class:"v-select__menu-icon",icon:i.menuIcon},null):void 0])}})}),po({isFocused:p,menu:a,select:L},s)}}),ZU=fe({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),YO=Symbol.for("vuetify:data-table-pagination");function JU(i){const e=Ke(i,"page",void 0,n=>+(n??1)),t=Ke(i,"itemsPerPage",void 0,n=>+(n??10));return{page:e,itemsPerPage:t}}function e2(i){const{page:e,itemsPerPage:t,itemsLength:n}=i,s=z(()=>t.value===-1?0:t.value*(e.value-1)),o=z(()=>t.value===-1?n.value:Math.min(n.value,s.value+t.value)),r=z(()=>t.value===-1||n.value===0?1:Math.ceil(n.value/t.value));_n(()=>{e.value>r.value&&(e.value=r.value)});function a(h){t.value=h,e.value=1}function l(){e.value=Ai(e.value+1,1,r.value)}function c(){e.value=Ai(e.value-1,1,r.value)}function u(h){e.value=Ai(h,1,r.value)}const d={page:e,itemsPerPage:t,startIndex:s,stopIndex:o,pageCount:r,itemsLength:n,nextPage:l,prevPage:c,setPage:u,setItemsPerPage:a};return Ht(YO,d),d}function t2(){const i=ct(YO);if(!i)throw new Error("Missing pagination!");return i}function i2(i){const{items:e,startIndex:t,stopIndex:n,itemsPerPage:s}=i;return{paginatedItems:z(()=>s.value<=0?e.value:e.value.slice(t.value,n.value))}}const qO=fe({prevIcon:{type:String,default:"$prev"},nextIcon:{type:String,default:"$next"},firstIcon:{type:String,default:"$first"},lastIcon:{type:String,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),aR=Ee()({name:"VDataTableFooter",props:qO(),setup(i,e){let{slots:t}=e;const{t:n}=Rn(),{page:s,pageCount:o,startIndex:r,stopIndex:a,itemsLength:l,itemsPerPage:c,setItemsPerPage:u}=t2(),d=z(()=>i.itemsPerPageOptions.map(h=>({...h,title:n(h.title)})));return()=>{var h;return b("div",{class:"v-data-table-footer"},[(h=t.prepend)==null?void 0:h.call(t),b("div",{class:"v-data-table-footer__items-per-page"},[b("span",null,[n(i.itemsPerPageText)]),b(KO,{items:d.value,modelValue:c.value,"onUpdate:modelValue":f=>u(Number(f)),density:"compact",variant:"outlined","hide-details":!0},null)]),b("div",{class:"v-data-table-footer__info"},[b("div",null,[n(i.pageText,l.value?r.value+1:0,a.value,l.value)])]),b("div",{class:"v-data-table-footer__pagination"},[b(pi,{icon:i.firstIcon,variant:"plain",onClick:()=>s.value=1,disabled:s.value===1,"aria-label":n(i.firstPageLabel)},null),b(pi,{icon:i.prevIcon,variant:"plain",onClick:()=>s.value=Math.max(1,s.value-1),disabled:s.value===1,"aria-label":n(i.prevPageLabel)},null),i.showCurrentPage&&b("span",{key:"page",class:"v-data-table-footer__page"},[s.value]),b(pi,{icon:i.nextIcon,variant:"plain",onClick:()=>s.value=Math.min(o.value,s.value+1),disabled:s.value===o.value,"aria-label":n(i.nextPageLabel)},null),b(pi,{icon:i.lastIcon,variant:"plain",onClick:()=>s.value=o.value,disabled:s.value===o.value,"aria-label":n(i.lastPageLabel)},null)])])}}}),_S=AB({align:{type:String,default:"start"},fixed:Boolean,fixedOffset:[Number,String],height:[Number,String],lastFixed:Boolean,noPadding:Boolean,tag:String,width:[Number,String]},(i,e)=>{let{slots:t,attrs:n}=e;const s=i.tag??"td";return b(s,Ie({class:["v-data-table__td",{"v-data-table-column--fixed":i.fixed,"v-data-table-column--last-fixed":i.lastFixed,"v-data-table-column--no-padding":i.noPadding},`v-data-table-column--align-${i.align}`],style:{height:ke(i.height),width:ke(i.width),left:ke(i.fixedOffset||null)}},n),{default:()=>{var o;return[(o=t.default)==null?void 0:o.call(t)]}})}),n2=fe({headers:{type:Array,default:()=>[]}},"DataTable-header"),XO=Symbol.for("vuetify:data-table-headers");function s2(i,e){const t=Te([]),n=Te([]);_n(()=>{var f,g,p;const o=i.headers.length?Array.isArray(i.headers[0])?i.headers:[i.headers]:[],r=o.flatMap((v,y)=>v.map(C=>({column:C,row:y}))),a=o.length,l={title:"",sortable:!1},c={...l,width:48};if((f=e==null?void 0:e.groupBy)!=null&&f.value.length){const v=r.findIndex(y=>{let{column:C}=y;return C.key==="data-table-group"});v<0?r.unshift({column:{...l,key:"data-table-group",title:"Group",rowspan:a},row:0}):r.splice(v,1,{column:{...l,...r[v].column},row:r[v].row})}if((g=e==null?void 0:e.showSelect)!=null&&g.value){const v=r.findIndex(y=>{let{column:C}=y;return C.key==="data-table-select"});v<0?r.unshift({column:{...c,key:"data-table-select",rowspan:a},row:0}):r.splice(v,1,{column:{...c,...r[v].column},row:r[v].row})}if((p=e==null?void 0:e.showExpand)!=null&&p.value){const v=r.findIndex(y=>{let{column:C}=y;return C.key==="data-table-expand"});v<0?r.push({column:{...c,key:"data-table-expand",rowspan:a},row:0}):r.splice(v,1,{column:{...c,...r[v].column},row:r[v].row})}const u=qs(a).map(()=>[]),d=qs(a).fill(0);r.forEach(v=>{let{column:y,row:C}=v,m=y.key;m==null&&(m="");for(let w=C;w<=C+(y.rowspan??1)-1;w++)u[w].push({...y,key:m,fixedOffset:d[w],sortable:y.sortable??!!y.key}),d[w]+=Number(y.width??0)}),u.forEach(v=>{for(let y=v.length;y--;y>=0)if(v[y].fixed){v[y].lastFixed=!0;return}});const h=new Set;t.value=u.map(v=>{const y=[];for(const C of v)h.has(C.key)||(h.add(C.key),y.push(C));return y}),n.value=u.at(-1)??[]});const s={headers:t,columns:n};return Ht(XO,s),s}function Xm(){const i=ct(XO);if(!i)throw new Error("Missing headers!");return i}const o2={showSelectAll:!1,allSelected:()=>[],select:i=>{var n;let{items:e,value:t}=i;return new Set(t?[(n=e[0])==null?void 0:n.value]:[])},selectAll:i=>{let{selected:e}=i;return e}},QO={showSelectAll:!0,allSelected:i=>{let{currentPage:e}=i;return e},select:i=>{let{items:e,value:t,selected:n}=i;for(const s of e)t?n.add(s.value):n.delete(s.value);return n},selectAll:i=>{let{value:e,currentPage:t,selected:n}=i;return QO.select({items:t,value:e,selected:n})}},ZO={showSelectAll:!0,allSelected:i=>{let{allItems:e}=i;return e},select:i=>{let{items:e,value:t,selected:n}=i;for(const s of e)t?n.add(s.value):n.delete(s.value);return n},selectAll:i=>{let{value:e,allItems:t,selected:n}=i;return ZO.select({items:t,value:e,selected:n})}},r2=fe({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]}},"DataTable-select"),JO=Symbol.for("vuetify:data-table-selection");function a2(i,e){let{allItems:t,currentPage:n}=e;const s=Ke(i,"modelValue",i.modelValue,v=>new Set(v),v=>[...v.values()]),o=z(()=>t.value.filter(v=>v.selectable)),r=z(()=>n.value.filter(v=>v.selectable)),a=z(()=>{if(typeof i.selectStrategy=="object")return i.selectStrategy;switch(i.selectStrategy){case"single":return o2;case"all":return ZO;case"page":default:return QO}});function l(v){return In(v).every(y=>s.value.has(y.value))}function c(v){return In(v).some(y=>s.value.has(y.value))}function u(v,y){const C=a.value.select({items:v,value:y,selected:new Set(s.value)});s.value=C}function d(v){u([v],!l([v]))}function h(v){const y=a.value.selectAll({value:v,allItems:o.value,currentPage:r.value,selected:new Set(s.value)});s.value=y}const f=z(()=>s.value.size>0),g=z(()=>{const v=a.value.allSelected({allItems:o.value,currentPage:r.value});return l(v)}),p={toggleSelect:d,select:u,selectAll:h,isSelected:l,isSomeSelected:c,someSelected:f,allSelected:g,showSelectAll:a.value.showSelectAll};return Ht(JO,p),p}function Qm(){const i=ct(JO);if(!i)throw new Error("Missing selection!");return i}const dg=Symbol.for("vuetify:layout"),eP=Symbol.for("vuetify:layout-item"),lR=1e3,tP=fe({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),Du=fe({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function l2(){const i=ct(dg);if(!i)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:i.getLayoutItem,mainRect:i.mainRect,mainStyles:i.mainStyles}}function Ou(i){const e=ct(dg);if(!e)throw new Error("[Vuetify] Could not find injected layout");const t=i.id??`layout-item-${hn()}`,n=Ii("useLayoutItem");Ht(eP,{id:t});const s=Fe(!1);LT(()=>s.value=!0),MT(()=>s.value=!1);const{layoutItemStyles:o,layoutItemScrimStyles:r}=e.register(n,{...i,active:z(()=>s.value?!1:i.active.value),id:t});return dn(()=>e.unregister(t)),{layoutItemStyles:o,layoutRect:e.layoutRect,layoutItemScrimStyles:r}}const c2=(i,e,t,n)=>{let s={top:0,left:0,right:0,bottom:0};const o=[{id:"",layer:{...s}}];for(const r of i){const a=e.get(r),l=t.get(r),c=n.get(r);if(!a||!l||!c)continue;const u={...s,[a.value]:parseInt(s[a.value],10)+(c.value?parseInt(l.value,10):0)};o.push({id:r,layer:u}),s=u}return o};function iP(i){const e=ct(dg,null),t=z(()=>e?e.rootZIndex.value-100:lR),n=Te([]),s=xi(new Map),o=xi(new Map),r=xi(new Map),a=xi(new Map),l=xi(new Map),{resizeRef:c,contentRect:u}=Bo(),d=z(()=>{const R=new Map,O=i.overlaps??[];for(const A of O.filter(D=>D.includes(":"))){const[D,L]=A.split(":");if(!n.value.includes(D)||!n.value.includes(L))continue;const S=s.get(D),x=s.get(L),T=o.get(D),H=o.get(L);!S||!x||!T||!H||(R.set(L,{position:S.value,amount:parseInt(T.value,10)}),R.set(D,{position:x.value,amount:-parseInt(H.value,10)}))}return R}),h=z(()=>{const R=[...new Set([...r.values()].map(A=>A.value))].sort((A,D)=>A-D),O=[];for(const A of R){const D=n.value.filter(L=>{var S;return((S=r.get(L))==null?void 0:S.value)===A});O.push(...D)}return c2(O,s,o,a)}),f=z(()=>!Array.from(l.values()).some(R=>R.value)),g=z(()=>h.value[h.value.length-1].layer),p=z(()=>({"--v-layout-left":ke(g.value.left),"--v-layout-right":ke(g.value.right),"--v-layout-top":ke(g.value.top),"--v-layout-bottom":ke(g.value.bottom),...f.value?void 0:{transition:"none"}})),v=z(()=>h.value.slice(1).map((R,O)=>{let{id:A}=R;const{layer:D}=h.value[O],L=o.get(A),S=s.get(A);return{id:A,...D,size:Number(L.value),position:S.value}})),y=R=>v.value.find(O=>O.id===R),C=Ii("createLayout"),m=Fe(!1);Pi(()=>{m.value=!0}),Ht(dg,{register:(R,O)=>{let{id:A,order:D,position:L,layoutSize:S,elementSize:x,active:T,disableTransitions:H,absolute:Y}=O;r.set(A,D),s.set(A,L),o.set(A,S),a.set(A,T),H&&l.set(A,H);const te=gd(eP,C==null?void 0:C.vnode).indexOf(R);te>-1?n.value.splice(te,0,A):n.value.push(A);const F=z(()=>v.value.findIndex(J=>J.id===A)),k=z(()=>t.value+h.value.length*2-F.value*2),q=z(()=>{const J=L.value==="left"||L.value==="right",ae=L.value==="right",se=L.value==="bottom",ce={[L.value]:0,zIndex:k.value,transform:`translate${J?"X":"Y"}(${(T.value?0:-110)*(ae||se?-1:1)}%)`,position:Y.value||t.value!==lR?"absolute":"fixed",...f.value?void 0:{transition:"none"}};if(!m.value)return ce;const re=v.value[F.value];if(!re)throw new Error(`[Vuetify] Could not find layout item "${A}"`);const K=d.value.get(A);return K&&(re[K.position]+=K.amount),{...ce,height:J?`calc(100% - ${re.top}px - ${re.bottom}px)`:x.value?`${x.value}px`:void 0,left:ae?void 0:`${re.left}px`,right:ae?`${re.right}px`:void 0,top:L.value!=="bottom"?`${re.top}px`:void 0,bottom:L.value!=="top"?`${re.bottom}px`:void 0,width:J?x.value?`${x.value}px`:void 0:`calc(100% - ${re.left}px - ${re.right}px)`}}),V=z(()=>({zIndex:k.value-1}));return{layoutItemStyles:q,layoutItemScrimStyles:V,zIndex:k}},unregister:R=>{r.delete(R),s.delete(R),o.delete(R),a.delete(R),l.delete(R),n.value=n.value.filter(O=>O!==R)},mainRect:g,mainStyles:p,getLayoutItem:y,items:v,layoutRect:u,rootZIndex:t});const w=z(()=>["v-layout",{"v-layout--full-height":i.fullHeight}]),E=z(()=>({zIndex:t.value,position:e?"relative":void 0,overflow:e?"hidden":void 0}));return{layoutClasses:w,layoutStyles:E,getLayoutItem:y,items:v,layoutRect:u,layoutRef:c}}const u2=fe({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),nP=Symbol.for("vuetify:data-table-sort");function d2(i){const e=Ke(i,"sortBy"),t=Se(i,"mustSort"),n=Se(i,"multiSort");return{sortBy:e,mustSort:t,multiSort:n}}function h2(i){const{sortBy:e,mustSort:t,multiSort:n,page:s}=i,o=l=>{let c=e.value.map(d=>({...d}))??[];const u=c.find(d=>d.key===l.key);u?u.order==="desc"?t.value?u.order="asc":c=c.filter(d=>d.key!==l.key):u.order="desc":n.value?c=[...c,{key:l.key,order:"asc"}]:c=[{key:l.key,order:"asc"}],e.value=c,s&&(s.value=1)};function r(l){return!!e.value.find(c=>c.key===l.key)}const a={sortBy:e,toggleSort:o,isSorted:r};return Ht(nP,a),a}function f2(){const i=ct(nP);if(!i)throw new Error("Missing sort!");return i}function p2(i,e,t){const n=Rn();return{sortedItems:z(()=>t.value.length?g2(e.value,t.value,n.current.value,i.customKeySort):e.value)}}function g2(i,e,t,n){const s=new Intl.Collator(t,{sensitivity:"accent",usage:"sort"});return[...i].sort((o,r)=>{for(let a=0;a<e.length;a++){const l=e[a].key,c=e[a].order??"asc";if(c===!1)continue;let u=Yc(o.raw,l),d=Yc(r.raw,l);if(c==="desc"&&([u,d]=[d,u]),n!=null&&n[l]){const h=n[l](u,d);if(!h)continue;return h}if(u instanceof Date&&d instanceof Date)return u.getTime()-d.getTime();if([u,d]=[u,d].map(h=>h!=null?h.toString().toLocaleLowerCase():h),u!==d)return Ff(u)&&Ff(d)?0:Ff(u)?-1:Ff(d)?1:!isNaN(u)&&!isNaN(d)?Number(u)-Number(d):s.compare(u,d)}return 0})}const sP=fe({color:String,sticky:Boolean,multiSort:Boolean,sortAscIcon:{type:tt,default:"$sortAsc"},sortDescIcon:{type:tt,default:"$sortDesc"},...Fm()},"VDataTableHeaders"),cR=Ee()({name:"VDataTableHeaders",props:sP(),setup(i,e){let{slots:t,emit:n}=e;const{toggleSort:s,sortBy:o,isSorted:r}=f2(),{someSelected:a,allSelected:l,selectAll:c,showSelectAll:u}=Qm(),{columns:d,headers:h}=Xm(),{loaderClasses:f}=uf(i),g=(w,E)=>{if(!(!i.sticky&&!w.fixed))return{position:"sticky",zIndex:w.fixed?4:i.sticky?3:void 0,left:w.fixed?ke(w.fixedOffset):void 0,top:i.sticky?`calc(var(--v-table-header-height) * ${E})`:void 0}};function p(w){const E=o.value.find(R=>R.key===w.key);return E?E.order==="asc"?i.sortAscIcon:i.sortDescIcon:i.sortAscIcon}const{backgroundColorClasses:v,backgroundColorStyles:y}=di(i,"color"),C=z(()=>({headers:h.value,columns:d.value,toggleSort:s,isSorted:r,sortBy:o.value,someSelected:a.value,allSelected:l.value,selectAll:c,getSortIcon:p,getFixedStyles:g})),m=w=>{let{column:E,x:R,y:O}=w;const A=E.key==="data-table-select"||E.key==="data-table-expand";return b(_S,{tag:"th",align:E.align,class:["v-data-table__th",{"v-data-table__th--sortable":E.sortable,"v-data-table__th--sorted":r(E)},f.value],style:{width:ke(E.width),minWidth:ke(E.width),...g(E,O)},colspan:E.colspan,rowspan:E.rowspan,onClick:E.sortable?()=>s(E):void 0,lastFixed:E.lastFixed,noPadding:A},{default:()=>{var S;const D=`column.${E.key}`,L={column:E,selectAll:c,isSorted:r,toggleSort:s,sortBy:o.value,someSelected:a.value,allSelected:l.value,getSortIcon:p};return t[D]?t[D](L):E.key==="data-table-select"?((S=t["column.data-table-select"])==null?void 0:S.call(t,L))??(u&&b(vr,{modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":c},null)):b("div",{class:"v-data-table-header__content"},[b("span",null,[E.title]),E.sortable&&b(Gt,{key:"icon",class:"v-data-table-header__sort-icon",icon:p(E)},null),i.multiSort&&r(E)&&b("div",{key:"badge",class:["v-data-table-header__sort-badge",...v.value],style:y.value},[o.value.findIndex(x=>x.key===E.key)+1])])}})};_e(()=>b(He,null,[t.headers?t.headers(C.value):h.value.map((w,E)=>b("tr",null,[w.map((R,O)=>b(m,{column:R,x:O,y:E},null))])),i.loading&&b("tr",{class:"v-data-table-progress"},[b("th",{colspan:d.value.length},[b(Nm,{name:"v-data-table-progress",active:!0,color:typeof i.loading=="boolean"?void 0:i.loading,indeterminate:!0},{default:t.loader})])])]))}}),m2=fe({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),oP=Symbol.for("vuetify:data-table-group");function v2(i){return{groupBy:Ke(i,"groupBy")}}function C2(i){const{groupBy:e,sortBy:t}=i,n=Te(new Set),s=z(()=>e.value.map(c=>({...c,order:c.order??!1})).concat(t.value));function o(c){return n.value.has(c.id)}function r(c){const u=new Set(n.value);o(c)?u.delete(c.id):u.add(c.id),n.value=u}function a(c){function u(d){const h=[];for(const f of d.items)"type"in f&&f.type==="group"?h.push(...u(f)):h.push(f);return h}return u({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const l={sortByWithGroups:s,toggleGroup:r,opened:n,groupBy:e,extractRows:a,isGroupOpen:o};return Ht(oP,l),l}function rP(){const i=ct(oP);if(!i)throw new Error("Missing group!");return i}function y2(i,e){if(!i.length)return[];const t=new Map;for(const n of i){const s=Yc(n.raw,e);t.has(s)||t.set(s,[]),t.get(s).push(n)}return t}function aP(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!e.length)return[];const s=y2(i,e[0]),o=[],r=e.slice(1);return s.forEach((a,l)=>{const c=e[0],u=`${n}_${c}_${l}`;o.push({depth:t,id:u,key:c,value:l,items:r.length?aP(a,r,t+1,u):a,type:"group"})}),o}function lP(i,e){const t=[];for(const n of i)"type"in n&&n.type==="group"?(n.value!=null&&t.push(n),(e.has(n.id)||n.value==null)&&t.push(...lP(n.items,e))):t.push(n);return t}function b2(i,e,t){return{flatItems:z(()=>{if(!e.value.length)return i.value;const s=aP(i.value,e.value.map(o=>o.key));return lP(s,t.value)})}}const w2=fe({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),S2=Ee()({name:"VDataTableGroupHeaderRow",props:w2(),setup(i,e){let{slots:t}=e;const{isGroupOpen:n,toggleGroup:s,extractRows:o}=rP(),{isSelected:r,isSomeSelected:a,select:l}=Qm(),{columns:c}=Xm(),u=z(()=>o([i.item]));return()=>b("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":i.item.depth}},[c.value.map(d=>{var h,f;if(d.key==="data-table-group"){const g=n(i.item)?"$expand":"$next",p=()=>s(i.item);return((h=t["data-table-group"])==null?void 0:h.call(t,{item:i.item,count:u.value.length,props:{icon:g,onClick:p}}))??b(_S,{class:"v-data-table-group-header-row__column"},{default:()=>[b(pi,{size:"small",variant:"text",icon:g,onClick:p},null),b("span",null,[i.item.value]),b("span",null,[De("("),u.value.length,De(")")])]})}if(d.key==="data-table-select"){const g=r(u.value),p=a(u.value)&&!g,v=y=>l(u.value,y);return((f=t["data-table-select"])==null?void 0:f.call(t,{props:{modelValue:g,indeterminate:p,"onUpdate:modelValue":v}}))??b("td",null,[b(vr,{modelValue:g,indeterminate:p,"onUpdate:modelValue":v},null)])}return b("td",null,null)})])}}),E2=fe({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),cP=Symbol.for("vuetify:datatable:expanded");function _2(i){const e=Se(i,"expandOnClick"),t=Ke(i,"expanded",i.expanded,a=>new Set(a),a=>[...a.values()]);function n(a,l){const c=new Set(t.value);l?c.add(a.value):c.delete(a.value),t.value=c}function s(a){return t.value.has(a.value)}function o(a){n(a,!s(a))}const r={expand:n,expanded:t,expandOnClick:e,isExpanded:s,toggleExpand:o};return Ht(cP,r),r}function uP(){const i=ct(cP);if(!i)throw new Error("foo");return i}const R2=fe({index:Number,item:Object,onClick:Function},"VDataTableRow"),vf=cs({name:"VDataTableRow",props:R2(),setup(i,e){let{slots:t}=e;const{isSelected:n,toggleSelect:s}=Qm(),{isExpanded:o,toggleExpand:r}=uP(),{columns:a}=Xm();_e(()=>b("tr",{class:["v-data-table__tr",{"v-data-table__tr--clickable":!!i.onClick}],onClick:i.onClick},[i.item&&a.value.map((l,c)=>b(_S,{align:l.align,fixed:l.fixed,fixedOffset:l.fixedOffset,lastFixed:l.lastFixed,noPadding:l.key==="data-table-select"||l.key==="data-table-expand",width:l.width},{default:()=>{var f,g;const u=i.item,d=`item.${l.key}`,h={index:i.index,item:i.item,columns:a.value,isSelected:n,toggleSelect:s,isExpanded:o,toggleExpand:r};return t[d]?t[d](h):l.key==="data-table-select"?((f=t["item.data-table-select"])==null?void 0:f.call(t,h))??b(vr,{disabled:!u.selectable,modelValue:n([u]),onClick:DC(()=>s(u),["stop"])},null):l.key==="data-table-expand"?((g=t["item.data-table-expand"])==null?void 0:g.call(t,h))??b(pi,{icon:o(u)?"$collapse":"$expand",size:"small",variant:"text",onClick:DC(()=>r(u),["stop"])},null):yn(u.columns,l.key)}}))]))}}),dP=fe({loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowHeight:Number,"onClick:row":Function},"VDataTableRows"),uR=Ee()({name:"VDataTableRows",props:dP(),setup(i,e){let{emit:t,slots:n}=e;const{columns:s}=Xm(),{expandOnClick:o,toggleExpand:r,isExpanded:a}=uP(),{isSelected:l,toggleSelect:c}=Qm(),{toggleGroup:u,isGroupOpen:d}=rP(),{t:h}=Rn();return _e(()=>{var f;return i.loading&&n.loading?b("tr",{class:"v-data-table-rows-loading",key:"loading"},[b("td",{colspan:s.value.length},[n.loading()])]):!i.loading&&!i.items.length&&!i.hideNoData?b("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[b("td",{colspan:s.value.length},[((f=n["no-data"])==null?void 0:f.call(n))??h(i.noDataText)])]):b(He,null,[i.items.map((g,p)=>{var C;if(g.type==="group")return n["group-header"]?n["group-header"]({index:p,item:g,columns:s.value,isExpanded:a,toggleExpand:r,isSelected:l,toggleSelect:c,toggleGroup:u,isGroupOpen:d}):b(S2,{key:`group-header_${g.id}`,item:g},n);const v={index:p,item:g,columns:s.value,isExpanded:a,toggleExpand:r,isSelected:l,toggleSelect:c},y={...v,props:{key:`item_${g.key??g.index}`,onClick:o.value||i["onClick:row"]?m=>{var w;o.value&&r(g),(w=i["onClick:row"])==null||w.call(i,m,{item:g})}:void 0,index:p,item:g}};return b(He,null,[n.item?n.item(y):b(vf,y.props,n),a(g)&&((C=n["expanded-row"])==null?void 0:C.call(n,v))])})])}),{}}});const hP=fe({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ve(),...Mi(),...lt(),...St()},"VTable"),Ry=Ee()({name:"VTable",props:hP(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{densityClasses:s}=fn(i);return _e(()=>b(i.tag,{class:["v-table",{"v-table--fixed-height":!!i.height,"v-table--fixed-header":i.fixedHeader,"v-table--fixed-footer":i.fixedFooter,"v-table--has-top":!!t.top,"v-table--has-bottom":!!t.bottom,"v-table--hover":i.hover},n.value,s.value,i.class],style:i.style},{default:()=>{var o,r,a;return[(o=t.top)==null?void 0:o.call(t),t.default?b("div",{class:"v-table__wrapper",style:{height:ke(i.height)}},[b("table",null,[t.default()])]):(r=t.wrapper)==null?void 0:r.call(t),(a=t.bottom)==null?void 0:a.call(t)]}})),{}}}),T2=fe({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},returnObject:Boolean},"DataTable-items");function x2(i,e,t,n){const s=i.returnObject?e:yn(e,i.itemValue),o=yn(e,i.itemSelectable,!0),r=n.reduce((a,l)=>(a[l.key]=yn(e,l.value??l.key),a),{});return{type:"item",key:i.returnObject?yn(e,i.itemValue):s,index:t,value:s,selectable:o,columns:r,raw:e}}function A2(i,e,t){return e.map((n,s)=>x2(i,n,s,t))}function D2(i,e){return{items:z(()=>A2(i,i.items,e.value))}}function O2(i){let{page:e,itemsPerPage:t,sortBy:n,groupBy:s,search:o}=i;const r=Ii("VDataTable"),a=z(()=>({page:e.value,itemsPerPage:t.value,sortBy:n.value,groupBy:s.value,search:o.value}));Le(()=>o==null?void 0:o.value,()=>{e.value=1});let l=null;Le(a,()=>{Da(l,a.value)||(r.emit("update:options",a.value),l=a.value)},{deep:!0,immediate:!0})}const P2=(i,e,t)=>i==null||e==null?-1:i.toString().toLocaleLowerCase().indexOf(e.toString().toLocaleLowerCase()),RS=fe({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function I2(i,e,t){var a;const n=[],s=(t==null?void 0:t.default)??P2,o=t!=null&&t.filterKeys?In(t.filterKeys):!1,r=Object.keys((t==null?void 0:t.customKeyFilter)??{}).length;if(!(i!=null&&i.length))return n;e:for(let l=0;l<i.length;l++){const c=i[l],u={},d={};let h=-1;if(e&&!(t!=null&&t.noFilter)){if(typeof c=="object"){const p=o||Object.keys(c);for(const v of p){const y=yn(c,v,c),C=(a=t==null?void 0:t.customKeyFilter)==null?void 0:a[v];if(h=C?C(y,e,c):s(y,e,c),h!==-1&&h!==!1)C?u[v]=h:d[v]=h;else if((t==null?void 0:t.filterMode)==="every")continue e}}else h=s(c,e,c),h!==-1&&h!==!1&&(d.title=h);const f=Object.keys(d).length,g=Object.keys(u).length;if(!f&&!g||(t==null?void 0:t.filterMode)==="union"&&g!==r&&!f||(t==null?void 0:t.filterMode)==="intersection"&&(g!==r||!f))continue}n.push({index:l,matches:{...d,...u}})}return n}function TS(i,e,t,n){const s=Te([]),o=Te(new Map),r=z(()=>n!=null&&n.transform?Ni(e).map(n==null?void 0:n.transform):Ni(e));_n(()=>{const l=typeof t=="function"?t():Ni(t),c=typeof l!="string"&&typeof l!="number"?"":String(l),u=I2(r.value,c,{customKeyFilter:i.customKeyFilter,default:i.customFilter,filterKeys:i.filterKeys,filterMode:i.filterMode,noFilter:i.noFilter}),d=Ni(e),h=[],f=new Map;u.forEach(g=>{let{index:p,matches:v}=g;const y=d[p];h.push(y),f.set(y.value,v)}),s.value=h,o.value=f});function a(l){return o.value.get(l.value)}return{filteredItems:s,filteredMatches:o,getMatches:a}}const M2=fe({...dP(),width:[String,Number],search:String,...E2(),...m2(),...n2(),...T2(),...r2(),...u2(),...sP(),...hP()},"DataTable"),L2=fe({...ZU(),...M2(),...RS(),...qO()},"VDataTable"),Cf=Ee()({name:"VDataTable",props:L2(),emits:{"update:modelValue":i=>!0,"update:page":i=>!0,"update:itemsPerPage":i=>!0,"update:sortBy":i=>!0,"update:options":i=>!0,"update:groupBy":i=>!0,"update:expanded":i=>!0},setup(i,e){let{emit:t,slots:n}=e;const{groupBy:s}=v2(i),{sortBy:o,multiSort:r,mustSort:a}=d2(i),{page:l,itemsPerPage:c}=JU(i),{columns:u,headers:d}=s2(i,{groupBy:s,showSelect:Se(i,"showSelect"),showExpand:Se(i,"showExpand")}),{items:h}=D2(i,u),f=Se(i,"search"),{filteredItems:g}=TS(i,h,f,{transform:ae=>ae.columns}),{toggleSort:p}=h2({sortBy:o,multiSort:r,mustSort:a,page:l}),{sortByWithGroups:v,opened:y,extractRows:C,isGroupOpen:m,toggleGroup:w}=C2({groupBy:s,sortBy:o}),{sortedItems:E}=p2(i,g,v),{flatItems:R}=b2(E,s,y),O=z(()=>R.value.length),{startIndex:A,stopIndex:D,pageCount:L,setItemsPerPage:S}=e2({page:l,itemsPerPage:c,itemsLength:O}),{paginatedItems:x}=i2({items:R,startIndex:A,stopIndex:D,itemsPerPage:c}),T=z(()=>C(x.value)),{isSelected:H,select:Y,selectAll:Q,toggleSelect:te,someSelected:F,allSelected:k}=a2(i,{allItems:h,currentPage:T}),{isExpanded:q,toggleExpand:V}=_2(i);O2({page:l,itemsPerPage:c,sortBy:o,groupBy:s,search:f}),Ci({VDataTableRows:{hideNoData:Se(i,"hideNoData"),noDataText:Se(i,"noDataText"),loading:Se(i,"loading"),loadingText:Se(i,"loadingText")}});const J=z(()=>({page:l.value,itemsPerPage:c.value,sortBy:o.value,pageCount:L.value,toggleSort:p,setItemsPerPage:S,someSelected:F.value,allSelected:k.value,isSelected:H,select:Y,selectAll:Q,toggleSelect:te,isExpanded:q,toggleExpand:V,isGroupOpen:m,toggleGroup:w,items:T.value,groupedItems:x.value,columns:u.value,headers:d.value}));return _e(()=>{const[ae]=aR.filterProps(i),[se]=cR.filterProps(i),[ce]=uR.filterProps(i),[re]=Ry.filterProps(i);return b(Ry,Ie({class:["v-data-table",{"v-data-table--show-select":i.showSelect,"v-data-table--loading":i.loading},i.class],style:i.style},re),{top:()=>{var K;return(K=n.top)==null?void 0:K.call(n,J.value)},default:()=>{var K,he,ne,ie;return n.default?n.default(J.value):b(He,null,[(K=n.colgroup)==null?void 0:K.call(n,J.value),b("thead",null,[b(cR,se,n)]),(he=n.thead)==null?void 0:he.call(n,J.value),b("tbody",null,[n.body?n.body(J.value):b(uR,Ie(ce,{items:x.value}),n)]),(ne=n.tbody)==null?void 0:ne.call(n,J.value),(ie=n.tfoot)==null?void 0:ie.call(n,J.value)])},bottom:()=>n.bottom?n.bottom(J.value):b(He,null,[b(aR,ae,{prepend:n["footer.prepend"]})])})}),{}}});const F2=Aa(),N2={name:"animalHistory",data(){return{columnDefs:null}},computed:{rowData(){return this.$store.state.actionList.length?this.$store.state.actionList:[]}},components:{VDataTable:Cf,VDataTableRow:vf,confirmDialog:qw},beforeMount(){this.headers=[{key:"id",title:"",sortable:!1},{key:"actionLabel",title:Oe("Action"),sortable:!0},{key:"value",sortable:!0,title:Oe("Value")},{key:"remark",title:Oe("remark"),sortable:!0},{key:"date",sortable:!0,title:Oe("Date")}]},methods:{async deleteItem(i){const e=await this.$refs.confirmDialog.show({title:"Delete",message:"Do you realy want to delete this item? It cannot be undone.",okButton:"Delete"}),t=location.host.split(":")[0],n=location.protocol+"//"+t+"/";e&&EI(n+"api/actionList/"+i)}},setup(){return{state:xi({new:""}),store:F2,t:Oe}}},k2={class:"text-h5 white--text"};function V2(i,e,t,n,s,o){const r=de("confirmDialog"),a=de("v-icon"),l=de("v-btn"),c=de("VDataTableRow"),u=de("VDataTable"),d=Vi("slots");return me(),kt(He,null,[b(r,{ref:"confirmDialog"},null,512),pt("span",k2,Me(n.t("History")),1),b(u,{style:{width:"100%",height:"600px",margin:"0"},headers:i.headers,items:o.rowData},{item:oe(({index:h,item:f})=>[Mt((me(),we(c,{class:"animal-history-row",key:`item_${f.value}`,index:h,item:f,style:yh({backgroundColor:f.raw.color})},{"item.id":oe(({item:g})=>[b(l,{onClick:p=>o.deleteItem(g.raw.id),icon:"",class:"ma-2",color:"blue-grey-darken-4"},{default:oe(()=>[b(a,{icon:"mdi-trash-can-outline",class:""})]),_:2},1032,["onClick"])]),_:2},1032,["index","item","style"])),[[d,i.slots]])]),_:1},8,["headers","items"])],64)}const G2=nt(N2,[["render",V2]]);var Uv=0;const H2={name:"animalDetail",props:["id"],computed:{disableButton(){var i=!1;return Uv&&(i=!0),console.log(this.a.actionId),this.a.actionId||(i=!0),i},action(){return fi(this.$store.state.action)},scaleValue(){return this.$store.state.scale}},data(){var i={id:1,value:0,remark:""};return{a:i}},watch:{scaleValue(){this.$store.state.autoWeight&&this.a.actionId==1&&(this.a.value=this.$store.state.scale)}},methods:{async save(){this.a.animalId=this.$store.state.animal.id,Uv=1,console.log("SAVING"),console.log(this.a),await x4(this.a),Uv=0}},setup(){return{t:Oe}}};function B2(i,e,t,n,s,o){const r=de("v-btn"),a=de("v-col"),l=de("v-select"),c=de("v-text-field"),u=de("v-row"),d=de("v-card");return me(),we(d,{elevation:"5",class:"ma-1 pa-1"},{default:oe(()=>[b(u,{dense:""},{default:oe(()=>[b(a,{md:"2",class:"d-flex align-center",style:{"font-size":"initial"}},{default:oe(()=>[(me(),we(r,{icon:"mdi-chevron-left",onClick:e[0]||(e[0]=h=>o.save()),disabled:o.disableButton,color:"success",key:i.$store.state.key},null,8,["disabled"]))]),_:1}),b(a,{md:"10"},{default:oe(()=>[b(u,{dense:""},{default:oe(()=>[b(a,{md:"6"},{default:oe(()=>[(me(),we(l,{modelValue:s.a.actionId,"onUpdate:modelValue":e[1]||(e[1]=h=>s.a.actionId=h),items:o.action,label:n.t("Action"),density:"compact",key:i.$store.state.key,"hide-details":""},null,8,["modelValue","items","label"]))]),_:1}),b(a,{md:"6"},{default:oe(()=>[(me(),we(c,{label:n.t("Value"),modelValue:s.a.value,"onUpdate:modelValue":e[2]||(e[2]=h=>s.a.value=h),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["label","modelValue"]))]),_:1})]),_:1}),b(u,{dense:""},{default:oe(()=>[b(a,{md:"8"},{default:oe(()=>[(me(),we(c,{label:n.t("Remark"),density:"compact","hide-details":"",modelValue:s.a.remark,"onUpdate:modelValue":e[3]||(e[3]=h=>s.a.remark=h),key:i.$store.state.key},null,8,["label","modelValue"]))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const W2=nt(H2,[["render",B2]]);const U2={name:"weightChip",components:{VDataTable:Cf,VDataTableRow:vf},computed:{list(){for(var i=[],e="",t=0,n=0,s=this.$store.state.actionList,o=s.length-1;o>=0;o--)if(s[o].actionId==1){if(e=-100,t>0){var r=(Date.parse(s[o].date)-Date.parse(n))/24/60/60/1e3/7;e=parseFloat((s[o].value-t)/r).toFixed(2)}t=s[o].value,n=s[o].date;var a="green";e<7&&(a="yellow"),e<0&&(a="red");var l={date:s[o].date,weight:s[o].value,gain:e,color:a};i.push(l)}return i=i.reverse().slice(0,3),i}},setup(i){},beforeMount(){this.headers=[{key:"date",title:Oe("Date"),sortable:!0},{key:"weight",title:Oe("Weight"),sortable:!0},{key:"gain",title:Oe("KG/Week"),sortable:!0}]}},j2={key:0};function $2(i,e,t,n,s,o){const r=de("v-icon"),a=de("VDataTableRow"),l=de("VDataTable"),c=Vi("slots");return me(),we(l,{class:"weightList",style:{width:"100%",margin:"0"},headers:i.headers,items:o.list},{item:oe(({index:u,item:d})=>[Mt((me(),we(a,{class:"animal-history-row",key:`item_${d.value}`,index:u,item:d},{"item.gain":oe(({item:h})=>[h.raw.gain>-99?(me(),kt("div",j2,[h.raw.color=="red"?(me(),we(r,{key:0,icon:"mdi-circle",style:{color:"red"}})):Yt("",!0),h.raw.color=="yellow"?(me(),we(r,{key:1,icon:"mdi-circle",style:{color:"yellow"}})):Yt("",!0),h.raw.color=="green"?(me(),we(r,{key:2,icon:"mdi-circle",style:{color:"green"}})):Yt("",!0),De(" "+Me(h.raw.gain),1)])):Yt("",!0)]),_:2},1032,["index","item"])),[[c,i.slots]])]),_:1},8,["headers","items"])}const z2=nt(U2,[["render",$2],["__scopeId","data-v-8e1146e9"]]),K2={name:"animalView",components:{animalDetail:ZH,animalHistory:G2,actionDetail:W2,weightList:z2},setup(){return Pi(()=>{let e=a1().params.id;e&&Ed(e)}),{t:Oe}}},Y2={class:"text-h5 white--text"};function q2(i,e,t,n,s,o){const r=de("animalDetail"),a=de("v-col"),l=de("weightList"),c=de("v-row"),u=de("animalHistory"),d=de("actionDetail");return me(),kt(He,null,[b(c,null,{default:oe(()=>[b(a,{cols:"12",md:"8"},{default:oe(()=>[b(r)]),_:1}),b(a,{cols:"12",md:"4"},{default:oe(()=>[b(l)]),_:1})]),_:1}),b(c,null,{default:oe(()=>[b(a,{cols:"12",md:"8"},{default:oe(()=>[b(u)]),_:1}),(me(),we(a,{cols:"12",md:"4",key:i.$store.state.key},{default:oe(()=>[pt("span",Y2,Me(n.t("Add Action")),1),b(d,{id:"1"}),b(d,{id:"2"}),b(d,{id:"3"}),b(d,{id:"4"}),b(d,{id:"5"}),b(d,{id:"6"})]),_:1}))]),_:1})],64)}const X2=nt(K2,[["render",q2]]),Q2={name:"helpView",setup(){return{t:Oe}}},Z2=pt("br",null,null,-1),J2=pt("br",null,null,-1),ej=pt("br",null,null,-1),tj=pt("br",null,null,-1),ij=pt("br",null,null,-1);function nj(i,e,t,n,s,o){return me(),kt(He,null,[De(" Version 0.1.1 (FIX TAG) "+Me(n.t("Shortcuts"))+":",1),Z2,De(" 'r': "+Me(n.t("Read Tag")),1),J2,De(" 'F2': "+Me(n.t("Switch Screen to Coral View")),1),ej,De(" 'F3': "+Me(n.t("Switch Screen to Sales View")),1),tj,De(" 'F4': "+Me(n.t("Switch Screen to Dashboard View")),1),ij],64)}const sj=nt(Q2,[["render",nj]]),oj={name:"offerDetail",data(){return{src:""}},mounted(){const i={animal:this.$store.state.animal,selectedData:this.$store.state.selectedData,actionList:this.$store.state.actionList,report:this.$store.state.report,price:this.$store.state.price,buyer:this.$store.state.buyer,lang:this.$store.state.reportLanguage},e={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(i)},t=location.host.split(":")[0],n=location.protocol+"//"+t+"/";fetch(n+"api/pdf/animal",e).then(s=>s.blob()).then(s=>{const o=URL.createObjectURL(s);this.src=o})}},rj=["src"];function aj(i,e,t,n,s,o){return me(),kt(He,null,[De(Me(i.animal)+" ",1),pt("iframe",{src:s.src,type:"application/pdf",height:"100%",width:"100%"},null,8,rj)],64)}const lj=nt(oj,[["render",aj]]),cj={name:"reportView",setup(){return{}},components:{reportDetail:lj}};function uj(i,e,t,n,s,o){const r=de("reportDetail");return me(),we(r)}const dj=nt(cj,[["render",uj]]);const hj=Aa(),fj={name:"animalDetailCoral",computed:{breed(){return fi(this.$store.state.breed)},gender(){return fi(this.$store.state.gender)},color(){return fi(this.$store.state.color)},hair(){return fi(this.$store.state.hair)},address(){return av(this.$store.state.address)},group(){return fi(this.$store.state.group)},selectedGroups:{get(){return cv(this.$store.state.animal.selectedGroups)},set(i){this.selectedGroupsLocal=i;var e=[];i.forEach(t=>{e.push(t.value)}),this.$store.state.animal.selectedGroups=e.toString()}}},methods:{notEmpty(i){console.log(i);var e=!1;return i!=""&&(e=!0),console.log(e),e}},data(){return{tag:[i=>i.length>=3||"Min Length"]}},setup(){return{store:hj,t:Oe,getLabel:qn}}},fP=i=>(xT("data-v-46ff8d7c"),i=i(),AT(),i),pj={class:"info"},gj=fP(()=>pt("br",null,null,-1)),mj=fP(()=>pt("br",null,null,-1));function vj(i,e,t,n,s,o){const r=de("v-card-title"),a=de("v-icon"),l=de("v-chip"),c=de("v-text-field"),u=de("v-card-text"),d=de("v-card");return me(),we(d,{class:"card"},{default:oe(()=>[b(r,{class:"cardTitle"},{default:oe(()=>[pt("p",null,Me(i.$store.state.animal.label),1)]),_:1}),(me(!0),kt(He,null,Wo(o.selectedGroups,h=>(me(),we(l,{class:"chip",color:h.color},{default:oe(()=>[b(a,{icon:h.icon},null,8,["icon"]),De(Me(h.title),1)]),_:2},1032,["color"]))),256)),b(u,null,{default:oe(()=>[pt("p",pj,[De(" Raza: "+Me(n.getLabel("breed",i.$store.state.animal.breedId)),1),gj,De(" Color: "+Me(n.getLabel("color",i.$store.state.animal.colorId)),1),mj]),(me(),we(c,{class:en(["infoBox",{alert:o.notEmpty(i.$store.state.animal.warning)}]),modelValue:i.$store.state.animal.warning,"onUpdate:modelValue":e[0]||(e[0]=h=>i.$store.state.animal.warning=h),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","class"])),(me(),we(c,{modelValue:i.$store.state.animal.remark,"onUpdate:modelValue":e[1]||(e[1]=h=>i.$store.state.animal.remark=h),class:en(["infoBox",{alert:o.notEmpty(i.$store.state.animal.remark)}]),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","class"]))]),_:1})]),_:1})}const Cj=nt(fj,[["render",vj],["__scopeId","data-v-46ff8d7c"]]);const yj={name:"weightListCoral",components:{VDataTable:Cf,VDataTableRow:vf},computed:{list(){for(var i=[],e="",t=0,n=0,s=this.$store.state.actionList,o=s.length-1;o>=0;o--)if(s[o].actionId==1){if(e=-100,t>0){var r=(Date.parse(s[o].date)-Date.parse(n))/24/60/60/1e3/7;e=parseFloat((s[o].value-t)/r).toFixed(2)}t=s[o].value,n=s[o].date;var a="green";e<7&&(a="yellow"),e<0&&(a="red");var l={date:s[o].date,weight:s[o].value,gain:e,color:a};i.push(l)}return i=i.reverse().slice(0,5),i}},setup(i){},beforeMount(){this.headers=[{key:"date",title:Oe("Date"),sortable:!0},{key:"weight",title:Oe("Weight"),sortable:!0},{key:"gain",title:Oe("KG/Week"),sortable:!0}]}},bj={key:0};function wj(i,e,t,n,s,o){const r=de("v-icon"),a=de("VDataTableRow"),l=de("VDataTable"),c=Vi("slots");return me(),we(l,{class:"weightList",headers:i.headers,items:o.list},{item:oe(({index:u,item:d})=>[Mt((me(),we(a,{class:"animal-history-row",key:`item_${d.value}`,index:u,item:d},{"item.gain":oe(({item:h})=>[h.raw.gain>-99?(me(),kt("div",bj,[h.raw.color=="red"?(me(),we(r,{key:0,icon:"mdi-circle",style:{color:"red"}})):Yt("",!0),h.raw.color=="yellow"?(me(),we(r,{key:1,icon:"mdi-circle",style:{color:"yellow"}})):Yt("",!0),h.raw.color=="green"?(me(),we(r,{key:2,icon:"mdi-circle",style:{color:"green"}})):Yt("",!0),De(" "+Me(h.raw.gain),1)])):Yt("",!0)]),_:2},1032,["index","item"])),[[c,i.slots]])]),_:1},8,["headers","items"])}const Sj=nt(yj,[["render",wj],["__scopeId","data-v-bc635054"]]);const Ej=Aa(),_j={name:"animalDetailCoral",components:{weightListCoral:Sj},computed:{breed(){return fi(this.$store.state.breed)},gender(){return fi(this.$store.state.gender)},color(){return fi(this.$store.state.color)},hair(){return fi(this.$store.state.hair)},address(){return av(this.$store.state.address)},group(){return fi(this.$store.state.group)},selectedGroups:{get(){let i=[];return this.$store.state.animal.selectedGroups&&(i=JSON.parse(this.$store.state.animal.selectedGroups)),i},set(i){this.$store.state.animal.selectedGroups=JSON.stringify(i)}}},data(){return{tag:[i=>i.length>=3||"Min Length"]}},setup(){return{store:Ej,saveAnimal:Hy,t:Oe}}};function Rj(i,e,t,n,s,o){const r=de("v-card-title"),a=de("weightListCoral"),l=de("v-card-text"),c=de("v-card");return me(),we(c,{class:"card"},{default:oe(()=>[b(r,{class:"cardTitle"},{default:oe(()=>[pt("p",null,Me(i.$store.state.animal.weight)+" Kg",1)]),_:1}),b(l,null,{default:oe(()=>[b(a)]),_:1})]),_:1})}const Tj=nt(_j,[["render",Rj],["__scopeId","data-v-95ecea07"]]);const xj=Aa(),Aj={name:"animalHistory",data(){return{columnDefs:null}},computed:{rowData(){return this.$store.state.actionList.length?this.$store.state.actionList:[]}},components:{VDataTable:Cf,VDataTableRow:vf},beforeMount(){this.headers=[{key:"actionLabel",title:Oe("Action"),sortable:!0},{key:"value",sortable:!0,title:Oe("Value")},{key:"remark",title:Oe("remark"),sortable:!0},{key:"date",sortable:!0,title:Oe("Date")}]},setup(){return{state:xi({new:""}),store:xj,t:Oe}}};function Dj(i,e,t,n,s,o){const r=de("VDataTableRow"),a=de("VDataTable"),l=Vi("slots");return me(),we(a,{class:"list",headers:i.headers,items:o.rowData},{item:oe(({index:c,item:u})=>[Mt((me(),we(r,{class:"animal-history-row",key:`item_${u.value}`,index:c,item:u,style:yh({backgroundColor:u.raw.color})},null,8,["index","item","style"])),[[l,i.slots]])]),_:1},8,["headers","items"])}const Oj=nt(Aj,[["render",Dj]]),Pj={name:"animalViewCoral",methods:{},components:{animalDetailCoral:Cj,animalWeightCoral:Tj,animalHistoryCoral:Oj},setup(){return{}},mounted(){setTimeout(()=>this.$store.state.config.displayURL="ABC",3e3)}};function Ij(i,e,t,n,s,o){const r=de("animalDetailCoral"),a=de("v-col"),l=de("v-row"),c=de("animalWeightCoral"),u=de("animalHistoryCoral");return me(),we(l,null,{default:oe(()=>[b(a,{cols:"4"},{default:oe(()=>[b(l,{style:{height:"50vh"}},{default:oe(()=>[b(a,{cols:"12"},{default:oe(()=>[b(r)]),_:1})]),_:1}),b(l,{style:{height:"50vh"}},{default:oe(()=>[b(a,{cols:"12"},{default:oe(()=>[b(c)]),_:1})]),_:1})]),_:1}),b(a,{cols:"8"},{default:oe(()=>[b(l,{style:{height:"100vh"}},{default:oe(()=>[b(u)]),_:1})]),_:1})]),_:1})}const Mj=nt(Pj,[["render",Ij]]),Lj={name:"crudComponent",props:["id"],data(){return{columnDefs:null,rowData:null,API:null}},methods:{save(i){var e=this;br(e.API,i.node.data)},add(){var i=this;br(i.API,{}),this.load()},load(){var i=this;const e=location.host.split(":")[0],t=location.protocol+"//"+e+"/";i.API=t+"api/"+this.id,console.log(i.API),si(i.API).then(n=>n.json()).then(function(n){i.rowData=n,i.columnDefs=[];for(const r in n[0]){var s=r,o={field:s,headerName:s,editable:!0};i.columnDefs.push(o)}})}},components:{AgGridVue:bD},beforeMount(){this.load()},setup(i){return{t:Oe}}};function Fj(i,e,t,n,s,o){const r=de("ag-grid-vue"),a=de("v-btn");return me(),kt(He,null,[De(Me(n.t("Edit"))+" - "+Me(n.t(t.id))+" ",1),b(r,{style:{width:"100%",height:"600px",margin:"0"},class:"ag-theme-alpine",columnDefs:s.columnDefs,rowData:s.rowData,gridOptions:i.gridOptions,onCellValueChanged:o.save},null,8,["columnDefs","rowData","gridOptions","onCellValueChanged"]),b(a,{class:"ma-4",color:"green",icon:"mdi-database-plus",onClick:o.add},null,8,["onClick"])],64)}const Nj=nt(Lj,[["render",Fj]]),kj={name:"crudView",components:{crud:Nj},setup(){return{}}};function Vj(i,e,t,n,s,o){const r=de("crud");return me(),we(r,{id:i.$route.params.id},null,8,["id"])}const Gj=nt(kj,[["render",Vj]]),Hj=Intl.NumberFormat("en-US"),Bj={name:"FormattedInput",props:{modelValue:{type:Number,default:0}},data:function(){return{isInputActive:!1}},computed:{displayValue:{get(){return this.isInputActive?this.modelValue:Hj.format(this.modelValue)},set(i){let e=parseFloat(i.replace(/[^\d\.-]/g,""));isNaN(e)&&(e=0),this.$emit("update:modelValue",e)}}},methods:{onBlur(){this.isInputActive=!1,this.$emit("blur")}}};function Wj(i,e,t,n,s,o){const r=de("v-text-field");return me(),we(r,{density:"compact","hide-details":"",variant:"solo",modelValue:o.displayValue,"onUpdate:modelValue":e[0]||(e[0]=a=>o.displayValue=a),onBlur:o.onBlur,onFocus:e[1]||(e[1]=a=>i.isInputActive=!0)},null,8,["modelValue","onBlur"])}const Uj=nt(Bj,[["render",Wj]]);/**
* Vue Currency Input 3.0.5
* (c) 2018-2023 Matthias Stiller
* @license MIT
*/var tl;(function(i){i.symbol="symbol",i.narrowSymbol="narrowSymbol",i.code="code",i.name="name",i.hidden="hidden"})(tl||(tl={}));var Qa;(function(i){i.precision="precision",i.thousands="thousands",i.millions="millions",i.billions="billions"})(Qa||(Qa={}));const bp=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),pP=i=>i.replace(/^0+(0$|[^0])/,"$1"),jv=(i,e)=>(i.match(new RegExp(bp(e),"g"))||[]).length,jj=(i,e)=>i.substring(0,i.indexOf(e)),gP=[",",".","٫"],dR="(0|[1-9]\\d*)";class $j{constructor(e){var t,n,s,o,r,a;const{currency:l,currencyDisplay:c,locale:u,precision:d,accountingSign:h,useGrouping:f}=e;this.locale=u,this.options={currency:l,useGrouping:f,style:"currency",currencySign:h?"accounting":void 0,currencyDisplay:c!==tl.hidden?c:void 0};const g=new Intl.NumberFormat(u,this.options),p=g.formatToParts(123456);this.currency=(t=p.find(({type:C})=>C==="currency"))===null||t===void 0?void 0:t.value,this.digits=[0,1,2,3,4,5,6,7,8,9].map(C=>C.toLocaleString(u)),this.decimalSymbol=(n=p.find(({type:C})=>C==="decimal"))===null||n===void 0?void 0:n.value,this.groupingSymbol=(s=p.find(({type:C})=>C==="group"))===null||s===void 0?void 0:s.value,this.minusSign=(o=g.formatToParts(-1).find(({type:C})=>C==="minusSign"))===null||o===void 0?void 0:o.value,this.decimalSymbol===void 0?this.minimumFractionDigits=this.maximumFractionDigits=0:typeof d=="number"?this.minimumFractionDigits=this.maximumFractionDigits=d:(this.minimumFractionDigits=(r=d==null?void 0:d.min)!==null&&r!==void 0?r:g.resolvedOptions().minimumFractionDigits,this.maximumFractionDigits=(a=d==null?void 0:d.max)!==null&&a!==void 0?a:g.resolvedOptions().maximumFractionDigits);const v=C=>jj(C,this.digits[1]),y=C=>C.substring(C.lastIndexOf(this.decimalSymbol?this.digits[0]:this.digits[1])+1);this.prefix=v(g.format(1)),this.suffix=y(g.format(1)),this.negativePrefix=v(g.format(-1)),this.negativeSuffix=y(g.format(-1))}parse(e){if(e){const t=this.isNegative(e);e=this.normalizeDigits(e),e=this.stripCurrency(e,t),e=this.stripSignLiterals(e);const n=this.decimalSymbol?`(?:${bp(this.decimalSymbol)}(\\d*))?`:"",s=this.stripGroupingSeparator(e).match(new RegExp(`^${dR}${n}$`));if(s&&this.isValidIntegerFormat(this.decimalSymbol?e.split(this.decimalSymbol)[0]:e,Number(s[1])))return+`${t?"-":""}${this.onlyDigits(s[1])}.${this.onlyDigits(s[2]||"")}`}return null}isValidIntegerFormat(e,t){const n={...this.options,minimumFractionDigits:0};return[this.stripCurrency(this.normalizeDigits(t.toLocaleString(this.locale,{...n,useGrouping:!0})),!1),this.stripCurrency(this.normalizeDigits(t.toLocaleString(this.locale,{...n,useGrouping:!1})),!1)].includes(e)}format(e,t={minimumFractionDigits:this.minimumFractionDigits,maximumFractionDigits:this.maximumFractionDigits}){return e!=null?e.toLocaleString(this.locale,{...this.options,...t}):""}toFraction(e){return`${this.digits[0]}${this.decimalSymbol}${this.onlyLocaleDigits(e.substr(1)).substr(0,this.maximumFractionDigits)}`}isFractionIncomplete(e){return!!this.normalizeDigits(this.stripGroupingSeparator(e)).match(new RegExp(`^${dR}${bp(this.decimalSymbol)}$`))}isNegative(e){return e.startsWith(this.negativePrefix)||this.minusSign===void 0&&(e.startsWith("(")||e.startsWith("-"))||this.minusSign!==void 0&&e.replace("-",this.minusSign).startsWith(this.minusSign)}insertCurrency(e,t){return`${t?this.negativePrefix:this.prefix}${e}${t?this.negativeSuffix:this.suffix}`}stripGroupingSeparator(e){return this.groupingSymbol!==void 0?e.replace(new RegExp(bp(this.groupingSymbol),"g"),""):e}stripSignLiterals(e){return this.minusSign!==void 0?e.replace("-",this.minusSign).replace(this.minusSign,""):e.replace(/[-()]/g,"")}stripCurrency(e,t){return e.replace(t?this.negativePrefix:this.prefix,"").replace(t?this.negativeSuffix:this.suffix,"")}normalizeDecimalSeparator(e,t){return gP.forEach(n=>{e=e.substr(0,t)+e.substr(t).replace(n,this.decimalSymbol)}),e}normalizeDigits(e){return this.digits[0]!=="0"&&this.digits.forEach((t,n)=>{e=e.replace(new RegExp(t,"g"),String(n))}),e}onlyDigits(e){return this.normalizeDigits(e).replace(/\D+/g,"")}onlyLocaleDigits(e){return e.replace(new RegExp(`[^${this.digits.join("")}]*`,"g"),"")}}class mP{constructor(e){this.currencyFormat=e}}class zj extends mP{conformToMask(e,t=""){const n=this.currencyFormat.isNegative(e),s=g=>g===""&&n&&!(this.currencyFormat.minusSign===void 0?t===this.currencyFormat.negativePrefix+this.currencyFormat.negativeSuffix:t===this.currencyFormat.negativePrefix),o=g=>{if(s(g))return"";if(this.currencyFormat.maximumFractionDigits>0){if(this.currencyFormat.isFractionIncomplete(g))return g;if(g.startsWith(this.currencyFormat.decimalSymbol))return this.currencyFormat.toFraction(g)}return null};let r=e;r=this.currencyFormat.stripCurrency(r,n),r=this.currencyFormat.stripSignLiterals(r);const a=o(r);if(a!=null)return this.currencyFormat.insertCurrency(a,n);const[l,...c]=r.split(this.currencyFormat.decimalSymbol),u=pP(this.currencyFormat.onlyDigits(l)),d=this.currencyFormat.onlyDigits(c.join("")).substr(0,this.currencyFormat.maximumFractionDigits),h=c.length>0&&d.length===0,f=u===""&&n&&(this.currencyFormat.minusSign===void 0?t===e.slice(0,-2)+this.currencyFormat.negativeSuffix:t===e.slice(0,-1));return h||f||s(u)?t:u.match(/\d+/)?{numberValue:+`${n?"-":""}${u}.${d}`,fractionDigits:d}:""}}class Kj extends mP{conformToMask(e,t=""){if(e===""||this.currencyFormat.parse(t)===0&&this.currencyFormat.stripCurrency(t,!0).slice(0,-1)===this.currencyFormat.stripCurrency(e,!0))return"";const n=this.currencyFormat.isNegative(e),s=this.currencyFormat.stripSignLiterals(e)===""?-0:+`${n?"-":""}${pP(this.currencyFormat.onlyDigits(e))}`/Math.pow(10,this.currencyFormat.maximumFractionDigits);return{numberValue:s,fractionDigits:s.toFixed(this.currencyFormat.maximumFractionDigits).slice(-this.currencyFormat.maximumFractionDigits)}}}const Yj={locale:void 0,currency:void 0,currencyDisplay:void 0,hideGroupingSeparatorOnFocus:!0,hideCurrencySymbolOnFocus:!0,hideNegligibleDecimalDigitsOnFocus:!0,precision:void 0,autoDecimalDigits:!1,valueRange:void 0,useGrouping:void 0,valueScaling:void 0};let qj=class{constructor(e){this.el=e.el,this.onInput=e.onInput,this.onChange=e.onChange,this.addEventListener(),this.init(e.options)}setOptions(e){this.init(e),this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue))),this.onChange(this.getValue())}getValue(){return{number:this.valueScaling&&this.numberValue!=null?this.toInteger(this.numberValue,this.valueScaling):this.numberValue,formatted:this.formattedValue}}setValue(e){const t=this.valueScaling!==void 0&&e!=null?this.toFloat(e,this.valueScaling):e;t!==this.numberValue&&(this.format(this.currencyFormat.format(this.validateValueRange(t))),this.onChange(this.getValue()))}init(e){this.options={...Yj,...e},this.options.autoDecimalDigits&&(this.options.hideNegligibleDecimalDigitsOnFocus=!1),this.el.getAttribute("inputmode")||this.el.setAttribute("inputmode",this.options.autoDecimalDigits?"numeric":"decimal"),this.currencyFormat=new $j(this.options),this.numberMask=this.options.autoDecimalDigits?new Kj(this.currencyFormat):new zj(this.currencyFormat);const t={[Qa.precision]:this.currencyFormat.maximumFractionDigits,[Qa.thousands]:3,[Qa.millions]:6,[Qa.billions]:9};this.valueScaling=this.options.valueScaling?t[this.options.valueScaling]:void 0,this.valueScalingFractionDigits=this.valueScaling!==void 0&&this.options.valueScaling!==Qa.precision?this.valueScaling+this.currencyFormat.maximumFractionDigits:this.currencyFormat.maximumFractionDigits,this.minValue=this.getMinValue(),this.maxValue=this.getMaxValue()}getMinValue(){var e,t;let n=this.toFloat(-Number.MAX_SAFE_INTEGER);return((e=this.options.valueRange)===null||e===void 0?void 0:e.min)!==void 0&&(n=Math.max((t=this.options.valueRange)===null||t===void 0?void 0:t.min,this.toFloat(-Number.MAX_SAFE_INTEGER))),n}getMaxValue(){var e,t;let n=this.toFloat(Number.MAX_SAFE_INTEGER);return((e=this.options.valueRange)===null||e===void 0?void 0:e.max)!==void 0&&(n=Math.min((t=this.options.valueRange)===null||t===void 0?void 0:t.max,this.toFloat(Number.MAX_SAFE_INTEGER))),n}toFloat(e,t){return e/Math.pow(10,t??this.valueScalingFractionDigits)}toInteger(e,t){return Number(e.toFixed(t??this.valueScalingFractionDigits).split(".").join(""))}validateValueRange(e){return e!=null?Math.min(Math.max(e,this.minValue),this.maxValue):e}format(e,t=!1){if(e!=null){this.decimalSymbolInsertedAt!==void 0&&(e=this.currencyFormat.normalizeDecimalSeparator(e,this.decimalSymbolInsertedAt),this.decimalSymbolInsertedAt=void 0);const n=this.numberMask.conformToMask(e,this.formattedValue);let s;if(typeof n=="object"){const{numberValue:o,fractionDigits:r}=n;let{maximumFractionDigits:a,minimumFractionDigits:l}=this.currencyFormat;this.focus?l=t?r.replace(/0+$/,"").length:Math.min(a,r.length):Number.isInteger(o)&&!this.options.autoDecimalDigits&&(this.options.precision===void 0||l===0)&&(l=a=0),s=this.toInteger(Math.abs(o))>Number.MAX_SAFE_INTEGER?this.formattedValue:this.currencyFormat.format(o,{useGrouping:this.options.useGrouping!==!1&&!(this.focus&&this.options.hideGroupingSeparatorOnFocus),minimumFractionDigits:l,maximumFractionDigits:a})}else s=n;this.maxValue<=0&&!this.currencyFormat.isNegative(s)&&this.currencyFormat.parse(s)!==0&&(s=s.replace(this.currencyFormat.prefix,this.currencyFormat.negativePrefix)),this.minValue>=0&&(s=s.replace(this.currencyFormat.negativePrefix,this.currencyFormat.prefix)),(this.options.currencyDisplay===tl.hidden||this.focus&&this.options.hideCurrencySymbolOnFocus)&&(s=s.replace(this.currencyFormat.negativePrefix,this.currencyFormat.minusSign!==void 0?this.currencyFormat.minusSign:"(").replace(this.currencyFormat.negativeSuffix,this.currencyFormat.minusSign!==void 0?"":")").replace(this.currencyFormat.prefix,"").replace(this.currencyFormat.suffix,"")),this.el.value=s,this.numberValue=this.currencyFormat.parse(s)}else this.el.value="",this.numberValue=null;this.formattedValue=this.el.value,this.onInput(this.getValue())}addEventListener(){this.el.addEventListener("input",e=>{const{value:t,selectionStart:n}=this.el,s=e;if(n&&s.data&&gP.includes(s.data)&&(this.decimalSymbolInsertedAt=n-1),this.format(t),this.focus&&n!=null){const o=()=>{const{prefix:r,suffix:a,decimalSymbol:l,maximumFractionDigits:c,groupingSymbol:u}=this.currencyFormat;let d=t.length-n;const h=this.formattedValue.length;if(this.currencyFormat.minusSign===void 0&&(t.startsWith("(")||t.startsWith("-"))&&!t.endsWith(")"))return h-this.currencyFormat.negativeSuffix.length>1?this.formattedValue.substring(n).length:1;if(this.formattedValue.substr(n,1)===u&&jv(this.formattedValue,u)===jv(t,u)+1)return h-d-1;if(h<d)return n;if(l!==void 0&&t.indexOf(l)!==-1){const f=t.indexOf(l)+1;if(Math.abs(h-t.length)>1&&n<=f)return this.formattedValue.indexOf(l)+1;!this.options.autoDecimalDigits&&n>f&&this.currencyFormat.onlyDigits(t.substr(f)).length-1===c&&(d-=1)}return this.options.hideCurrencySymbolOnFocus||this.options.currencyDisplay===tl.hidden?h-d:Math.max(h-Math.max(d,a.length),r.length)};this.setCaretPosition(o())}}),this.el.addEventListener("focus",()=>{this.focus=!0,this.numberValueOnFocus=this.numberValue,setTimeout(()=>{const{value:e,selectionStart:t,selectionEnd:n}=this.el;if(this.format(e,this.options.hideNegligibleDecimalDigitsOnFocus),t!=null&&n!=null&&Math.abs(t-n)>0)this.setCaretPosition(0,this.el.value.length);else if(t!=null){const s=this.getCaretPositionOnFocus(e,t);this.setCaretPosition(s)}})}),this.el.addEventListener("blur",()=>{this.focus=!1,this.format(this.currencyFormat.format(this.validateValueRange(this.numberValue))),this.numberValueOnFocus!==this.numberValue&&this.onChange(this.getValue())})}getCaretPositionOnFocus(e,t){if(this.numberValue==null)return t;const{prefix:n,negativePrefix:s,suffix:o,negativeSuffix:r,groupingSymbol:a,currency:l}=this.currencyFormat,c=this.numberValue<0,u=c?s:n,d=u.length;if(this.options.hideCurrencySymbolOnFocus||this.options.currencyDisplay===tl.hidden){if(c){if(t<=1)return 1;if(e.endsWith(")")&&t>e.indexOf(")"))return this.formattedValue.length-1}}else{const f=c?r.length:o.length;if(t>=e.length-f)return this.formattedValue.length-f;if(t<d)return d}let h=t;return this.options.hideCurrencySymbolOnFocus&&this.options.currencyDisplay!==tl.hidden&&t>=d&&l!==void 0&&u.includes(l)&&(h-=d,c&&(h+=1)),this.options.hideGroupingSeparatorOnFocus&&a!==void 0&&(h-=jv(e.substring(0,t),a)),h}setCaretPosition(e,t=e){this.el.setSelectionRange(e,t)}};const Xj=i=>i!=null&&i.matches("input")?i:i==null?void 0:i.querySelector("input");function Qj(i,e){var t,n,s,o;let r;const a=Te(null),l=Te(null),c=Te(null),u=Sh(),d=(u==null?void 0:u.emit)||((n=(t=u==null?void 0:u.proxy)===null||t===void 0?void 0:t.$emit)===null||n===void 0?void 0:n.bind(u==null?void 0:u.proxy)),h=(u==null?void 0:u.props)||((s=u==null?void 0:u.proxy)===null||s===void 0?void 0:s.$props),f=Eb.startsWith("3"),g=f&&((o=u==null?void 0:u.attrs.modelModifiers)===null||o===void 0?void 0:o.lazy),p=z(()=>h==null?void 0:h[f?"modelValue":"value"]),v=f?"update:modelValue":"input",y=g?"update:modelValue":"change";return Le(a,C=>{var m;if(C){const w=Xj((m=C==null?void 0:C.$el)!==null&&m!==void 0?m:C);w?(r=new qj({el:w,options:i,onInput:E=>{!g&&e!==!1&&p.value!==E.number&&(d==null||d(v,E.number)),c.value=E.number,l.value=E.formatted},onChange:E=>{e!==!1&&(d==null||d(y,E.number))}}),r.setValue(p.value)):console.error('No input element found. Please make sure that the "inputRef" template ref is properly assigned.')}else r=null}),{inputRef:a,numberValue:c,formattedValue:l,setValue:C=>r==null?void 0:r.setValue(C),setOptions:C=>r==null?void 0:r.setOptions(C)}}const Zj={name:"CurrencyInput",props:{modelValue:Number,options:Object},setup(i){const{inputRef:e,setValue:t}=Qj(i.options,!1);return Le(()=>i.modelValue,n=>{console.log("WATCH"+n),t(n)}),{inputRef:e}}};function Jj(i,e,t,n,s,o){const r=de("v-text-field");return me(),we(r,{ref:"inputRef",type:"text"},null,512)}const hR=nt(Zj,[["render",Jj]]);const e$={name:"Account",data(){return{testVModel:[12,50],API:"",balance:0,selectedAccount:"",selectedDate:"",columnDefs:null,rowData:[],pinnedRowData:null,API:null,dates:["2023-03","2023-04","2023-05","2023-06"],headers:[{title:Oe("date"),key:"date",width:"170px"},{title:Oe("Receipt"),key:"faktura",width:"70px"},{title:Oe("receipient"),key:"receipient",width:"250px"},{title:Oe("expenseType"),key:"expenseType",width:"300px"},{title:Oe("expenseLocation"),key:"expenseLocation",width:"150px"},{title:Oe("payment"),key:"payment",width:"170px"},{title:Oe("remark"),key:"remark",width:"300px"},{title:Oe("amount"),key:"amount"}]}},computed:{isDataSelected(){return this.selectedAccount!==""&&this.selectedDate!==""}},methods:{print(){var i=[];this.rowData.forEach(s=>{const o={date:s.date,faktura:s.faktura,receipient:s.receipient,paymentId:s.payment,expenseType:this.$store.state.expenseType.find(r=>r.id===s.expenseType).label,expenseLocation:this.$store.state.location.find(r=>r.id===s.expenseLocation).label,account:s.account,payment:this.$store.state.payment.find(r=>r.id===s.payment).label,remark:s.remark,amount:s.amount};i.push(o)});const e={account:this.$store.state.account.find(s=>s.id===this.selectedAccount).label,month:this.selectedDate,details:i},t={method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)},n=Os();fetch(n+"api/pdf/account",t).then(s=>s.blob()).then(s=>{const o=URL.createObjectURL(s);window.open(o)})},save(i){console.groupCollapsed("save"),console.trace(),console.groupEnd();const e=JSON.parse(JSON.stringify(i));br(this.API,e),this.sum()},sum(){var i=0;this.rowData.forEach(t=>{t.payment==1&&(i=i+t.amount*1)});let e=Intl.NumberFormat("en-US");this.balance=e.format(i)},add(){const i=new Date().toISOString().substr(0,10);var e=this,t={account:this.selectedAccount,date:i};console.debug("add",t),br(e.API,t),setTimeout(this.load(),500)},load(){var i=this;const e=i.API+"/"+this.selectedAccount+"/"+this.selectedDate;si(e).then(t=>t.json()).then(function(t){i.rowData=t,i.sum()})},getColumnClass(i){const e=i.props.title.payment;return e===2||e===3?"bg-grey-lighten-2":""}},components:{VDataTable:Cf,CurrencyInput:hR,FormattedInput:Uj},setup(){return{t:Oe,formatSelectAccount:l4,formatSelect:fi,CurrencyInput:hR}},beforeMount(){this.API=Os()+"api/accountEntries"}},t$={class:"d-flex justify-end align-center"},i$={class:"pa-4 pr-2"},n$={class:"pa-4 pl-2"};function s$(i,e,t,n,s,o){const r=de("v-select"),a=de("v-btn"),l=de("v-spacer"),c=de("v-toolbar"),u=de("v-text-field"),d=de("FormattedInput"),h=de("v-data-table");return me(),kt(He,null,[pt("nav",null,[b(c,{flat:"",app:"",color:"grey"},{default:oe(()=>[(me(),we(r,{modelValue:s.selectedAccount,"onUpdate:modelValue":[e[0]||(e[0]=f=>s.selectedAccount=f),e[1]||(e[1]=f=>o.load())],class:"mx-4",label:n.t("Account"),items:n.formatSelectAccount(this.$store.state.account),density:"compact",key:i.$store.state.key,"hide-details":""},null,8,["modelValue","label","items"])),(me(),we(r,{modelValue:s.selectedDate,"onUpdate:modelValue":[e[2]||(e[2]=f=>s.selectedDate=f),e[3]||(e[3]=f=>o.load())],class:"mx-4",items:s.dates,label:n.t("Month"),density:"compact",key:i.$store.state.key,"hide-details":""},null,8,["modelValue","items","label"])),b(a,{density:"compact",disabled:!o.isDataSelected,icon:"mdi-printer",onClick:o.print},null,8,["disabled","onClick"]),b(l),b(l)]),_:1})]),Mt(b(h,{style:{margin:"0"},items:s.rowData,headers:s.headers,height:"600px",width:"100%","items-per-page":"-1","fixed-header":"",sticky:"",onCellValueChanged:o.save},{item:oe(({item:f,index:g})=>[pt("tr",null,[pt("td",{class:en(o.getColumnClass(f))},[b(u,{class:"py-4",density:"compact","hide-details":"",variant:"solo",modelValue:f.props.title.date,"onUpdate:modelValue":p=>f.props.title.date=p,onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],2),pt("td",{class:en(o.getColumnClass(f))},[b(u,{class:"py-4",density:"compact","hide-details":"",variant:"solo",modelValue:f.props.title.faktura,"onUpdate:modelValue":p=>f.props.title.faktura=p,onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],2),pt("td",{class:en(o.getColumnClass(f))},[b(u,{class:"py-4",density:"compact","hide-details":"",variant:"solo",modelValue:f.props.title.receipient,"onUpdate:modelValue":p=>f.props.title.receipient=p,onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],2),pt("td",{class:en(o.getColumnClass(f))},[(me(),we(r,{modelValue:f.props.title.expenseType,"onUpdate:modelValue":p=>f.props.title.expenseType=p,items:n.formatSelectAccount(this.$store.state.expenseType),density:"compact",key:i.$store.state.key,"hide-details":"",onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","items","onBlur"]))],2),pt("td",{class:en(o.getColumnClass(f))},[(me(),we(r,{modelValue:f.props.title.expenseLocation,"onUpdate:modelValue":p=>f.props.title.expenseLocation=p,items:n.formatSelect(this.$store.state.location),density:"compact",key:i.$store.state.key,"hide-details":"",onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","items","onBlur"]))],2),pt("td",{class:en(o.getColumnClass(f))},[(me(),we(r,{"bg-color":f.props.title.payment===2||f.props.title.payment===3?"grey-lighten-2":null,modelValue:f.props.title.payment,"onUpdate:modelValue":p=>f.props.title.payment=p,items:n.formatSelectAccount(this.$store.state.payment),density:"compact",key:i.$store.state.key,"hide-details":"",onBlur:p=>o.save(f.props.title)},null,8,["bg-color","modelValue","onUpdate:modelValue","items","onBlur"]))],2),pt("td",{class:en(o.getColumnClass(f))},[b(u,{class:"py-4",density:"compact","hide-details":"",variant:"solo",modelValue:f.props.title.remark,"onUpdate:modelValue":p=>f.props.title.remark=p,onBlur:p=>o.save(f.props.title)},null,8,["modelValue","onUpdate:modelValue","onBlur"])],2),pt("td",{class:en(o.getColumnClass(f))},[b(d,{class:en([f.props.title.amount>=0?null:"custom-text-red-lighten-2","amount-field py-4"]),modelValue:f.props.title.amount,"onUpdate:modelValue":p=>f.props.title.amount=p,onBlur:p=>o.save(f.props.title)},null,8,["class","modelValue","onUpdate:modelValue","onBlur"])],2)])]),bottom:oe(()=>[pt("div",t$,[pt("div",i$,[o.isDataSelected?(me(),we(a,{key:0,color:"green",icon:"mdi-database-plus",onClick:o.add},null,8,["onClick"])):Yt("",!0)]),pt("div",n$,"Balance: "+Me(s.balance),1)])]),_:1},8,["items","headers","onCellValueChanged"]),[[Ps,o.isDataSelected]])],64)}const o$=nt(e$,[["render",s$]]),r$={name:"accountView",components:{Account:o$}};function a$(i,e,t,n,s,o){const r=de("Account");return me(),we(r)}const l$=nt(r$,[["render",a$]]),vP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAABDCAYAAAAmjW9nAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAADV9JREFUeJztnXtwXOV1wH/n7kpCCobwSsDYIeWZUCAUPAmlabEJhLG0d2WbkZpHmTQkmLTFtlaxY1ty6AbbMsZGD9KS1mknbUiGIjXY2rsSHhyCoUBC68CUhGlJiTItOHZ5NLaxo+fe0z/02l3de7VPWfLe38zOeM93vvMdXZ+5+33nfvc7YjZYSo4INMXazW259vfxyZZwg7VRoSXX/kYhnfHxme34Ae9TUvgB71NS+AHvU1IEPdpeRHS9V2cRu6/A/vj4eCJG4nuqxgueOirtCtc6tbkHvOpvrPbwM3n65+NTULpbl70BvOGlYzZYR93a/CmNT0nhB7xPSeEHvE9J4bVoLSrmSquKKn0G5OwksSYMo7q3teYXedv/qnUuCb0buE5Fzhflg4DkYkvgmMJB0P0jieCuJ75ZfSxv/yKxelRSn1KLvmC1he/I13Y0GjV+euT6/8rXDmADh4Ffitrfj3XU7vNSrl0dv9E29JECjDuBwMFYu/lHhbJ30gJeK2kUZFG6PGDbO4FwPraX/8Xj54wkeAlkIYDkvHlilLHu14LUBAOJOxZHn/7E/uiSgVzt1UU6KwdUHgAuSh1ILg6v6f7udIGVIRcXwAbApcAnVYwvmGviG6yO0HY3xQRaKYUbFwCFQCHtnZQpzYqGvReI4JbyNGsj8VvysT9SFvwisDAfGx5cM+/Ie8vzMTBAVYT0YB9DxWhdHH36pN2IPBH9xm2RvWdPrzh7OSkXdlhGNqOc7tZuq7bW1XX+XldXfSKnAURuIP2uLvwKnSLNlN8haTqkIjcCj+ZiKLym+4OqusFD5aozjpy4C/hWLvY9eFfh5UyVRWQ+qlemiSvKGV4EPJnFuK8hvJKFfiq2vJ1zXwdmPOBDjdbHsPWLaeJ/BL6Q9P3q/gWVdwF/k8sYonwgPbIvOHHBFbt2LRrOxZ65xupHOG3Svs7PxQ6AbRibRZmXJPoZMAxcNy5Q9L5lDbsf3dO+/Eiu4zjwr/F2szqbDuaaeCuikWSZKmdkY0OEWKzN/Fo2fYrJjE9pxKY1ZVyl9733n/5l4LUUPeW+ZQ2735/LGArleTnpzFsKP0R5UCTw7VwM1EZ6rhblzlSprhcxmtNUz7UJfj1HPwuI/Xy6xFDJaeE/W5jRO3woYpkoNyeJEoZhbNgfXTISXhP/uop2JrWdl9DgJmDtTProRLBs+KLdO1e8la8dW/VBUhdhP7Law08AmA2xZ0EmshEK91Q39vxtITJWOSOS25RyFjNjd/iVKw+UibIjVSqPdLfV/Awg1lHzz8BLqc2sCq22LpspH90oRLCHVlvVoLcmiVTEnli4C9qU1qXcsO206zXDqBY0QzIbmLE7/KGqw18BrkgS9RvGyL2TX0VFeppV7SeSdMrFkB3AsmL6tnRV7wIjaGc8DdKg/LZ3R83hTPUXR58OypHjO1NsKI9Z7bUHxr/H2mufNxusHqBmXCYQro3Eb+luC/0w07EKiYgsSV8L2aJZLfxVCZsR68PT6Z022H9n18P1x7OxnQszEvA1fxY/C/QvU4SiD41tBJog1lazN/2nHbQ2tNr6VPwh86li+VcWSFiqzrvrHBmy9wJLM1Wfd/S9lSAfTbaghqTP21GDZrFZStIvb94Zq0k+HmqwMsrvG1ChcKE65NQDItkupK9AU250jhyrOOMrWdrNiRmZ0gQqdBNwTpLo3YAm7nfSdfhpRwxa6+o65+TPa936fWeiEk2WKXyrpy00ZWt1vNX8d1U608TjGat8OUfglkw+Cn+I8wOkftHhAw7yOUPRAz4c6b5U4Z4UoehWt5RbrL32eaAnTXzN4IKqLxXJxaIyODTQDJyXJDoqAba4dlDuBUaSRflkrAqIgqzPIVV6BOib7lOp/XYhnXWj6FMaVdlOappwCDVGwpH4Svc+dl/6thdV3Vy3ft9jXdtvdd3rnLuPukUM4xyP9r8CyrK1WxOJX6yqq9PEL4stK8KRuJc//wlclSQqRMbqqAivZ9tJbX0bjD5D+X73QyHPFy+cEOHbsykPX9SANyOxm1BZkSYuB33Ie+njmOr9wNjdsuAXz+oI/8Cr3VxjdSDZB3xAdbtCRZp4saouztYWwqrqxp5deaQpX4i1Zffg6VSkaFOaaDRqoOycXjNzVFkzG9KUmRBqsH5f4fYCmiwP2PpAAe2VJEUL+JeOLroDh92QeVJuCK679WYPKgLt5Lgd2cNurRmxPl1Ym6VFUaY05kqrCtX0hdkzovLX2dhRsYMgu2Byo5kKy8ON8SWx1tDTbv0EhvLcETyNXzLk1R5qiH8O+HiaUxvFll9mNQ4sRvTP04Q76uo6nypAmrIkKc4cvlLXKrIgSaJAY6wj9JJbFzdCDdblAtFkmdraVlfXeb3rf7ryTvq99VDVoSGzwcp2eEcEXJ+8ju51J/34weesNtMxDetFXaQzPqCVJqlbncczVruytXcyUGWd2WCty8tIgPOsB813CuFPwac04Xu65yOStrCULqvdzDrYASqH+h8EDqWJP9Y/v/JOJ30ARV7MZayMUf2JW9OAntZI2l58W2TKs4VM6Gqr7xeRKZvIxjJWZ+Zis9QpeMBrwNgCvC9JNCKauNdNfzq6Hq4/juo30uUibF66qtdxq2qwbOg7KBk/+s8GgV8MllX8k1Nb9bqe80FS97orvT1toX/JdbzrzjzwCEzZTz6esfLJkoIGfE1D/KMIYYTfTHxUdsU6al+bvrc775017+9F+GmKXaE8GBhZ5aS/e+eKtyRhX6+wDdW9wM+Bt9P6Z/YZnb68gtKrEE0Myg1P7rzthNO4wWF7HcJwUt//S0zd+psV0WjUFjHWp/ulNnfUNu5xf6tr6t9S9H0qhhjDOV3jaT7BgeGCLcnE9bhs1b1WRzjj/SI+PrMFs8HaD9zk1OYf0+FTUvgB71NS+AHvU1L4Ae9TUvgB71NS+AHvU1L4Ae9TUvgB71NS+AHvU1L4Ae9TUvgB71NS+AHvU1L4Ae9TUvgB71NSzM5KEx5YzVyoSj3KhxCqptMXZUjgkBo8a27lOTe92CZuxuaPs3Bl0BD6hmweWbGNd92UOqOcXjnIZ1W4BDgrE8OiDAAHAwF+UL0F1/dgrWY+r8rosYTKc+FteNZXsjbyERUiAAL9ZgsNTnrRKMZ1Q9kVZDCEwwr7vK7xbGBOBXzvJi5J2LwiUJXxeQAyVqNJUauZ282t7HZUs7kacD0cyglVKBPWPb6Ra5yC/sBKyg4N8TLCpVkdXzCmnLDZEtvAH4Tv59+cHeCTMu6zYIB3wCNcKJN/41FwDvgrX0XksuyvBXCv1cRdZgt/l03fmWROBfyIcpswcVc/jsfL1Em8D8Yq+NncDs4Bn8YxBPcqeMp84IKxb/PLhaXA99LVDp7NVcZoUTAYPT7vfzIYG0bP4TwTKDMMasEl4GeOnyMMOjWIUqlwGZMns30J/IAvFBcm/TtutvDZ6TrEmqgXeAwAg4xefFbhhfBW79OBrSZ+BCwB0MngTyFgMD/pdbJfmy1cksn48Y3sUBk9Vk+LV5wtYwIGy7ymVvGNrFBh/PQ2x2sxW5hTAW/YlGuWRxsZNgcElo7YvFL7AL8umDPCmxMl0tRlgqVUFOAopmKU7ykoAgeLeQ5QIZlTAZ8LofsnTqgtLJr9WZOnKnaASmbk7N/8OaUCPraRtWLwGVcF5VWzJaVaoCOinB9vps6t3VYWAJPla1zmt6cKts26WBOOx2SLUonN5PF/St5VyovJKRXwIixAud5DJdPj6a51KEwwOU76dyWnQ6bmCgp3u87MplyMrGq4zjinVMAjPKWjOewJDPiIQm0RRksAb6I8HNpGzgctzRHeYLSWrBeHgSf7+5nVJxyfUgFvbsUCUg6QHMvSZBXwKuwdz9L0rqIiMY9HgfFy8+8Ywu01W3m2IE7PAQIGS7yyNHMJf2vBNFR/k8HTy6kHvjsmOtdWnow18acn0S2fHJlbd3hJWRB9yGthOYFyw3jKTEafLmbNkigjnXXcWXk5gyh3ARUC34lv5Hd/+zob6ruc1wYqKeNVZeQvoElV7zx9Fo4lpUYvzsD+VUmVVwpeOmguMKcCXoU+Jv/DblTlxqz6k32No3Hqu0go3B1v4hjw1TF/1lZezpX71vO5W7dPDSCx+ZVO/oae67UQdsNWd5/Vpm+iELxws6ZWOffGw+6pzJya0pQPskcgo1qjDvyHbdCRz/gCarawVmDyNGSleiDAj7s3TGwhmGDsGUAHaVX5suAnUsE/uDUmKnhMyWktcZAAm3P0aU4zp+7wt+3kBPDp7q8x3whwkQRSjuV2JsFgQjn08mn0RaPuj0cSwuNB4VUAe8R99yNAqIXNsWb2GTJZmSRgO29bMFto2BvlvuEhPiwGZ0/rL5BI0B80eLNmK//tpbc8yhHgpj3NLAzCwul2jyqMCPzv+W/x+qJd7lmXui7snk2TzxmOnyjgE+qTjPvpwfAiouu9Ohti96VX0/bxKSa1jXsW2mo4FU2eQFTaFefK6l53+E+gst/LsGqgCaaUd/HxKRpqB/4EaPHU8WibU3N4H5988QPep6TwA96npPAD3qek+H/h35b3D0FCKAAAAABJRU5ErkJggg==",c$={name:"loginView",components:{},data(){return{email:null,password:null,loginError:!1}},computed:{isDataValid(){const i=String(this.email??"").length>4,e=String(this.password??"").length>2;return i&&e}},setup(){return{t:Oe,logo:vP}},mounted(){},methods:{login(){var i=this,e={email:this.email,password:this.password};console.log(Os()+"api/login");try{fetch(Os()+"api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>t.text()).then(function(t){localStorage.token=t,t!="NOK"?(Rs.push("/"),window.location.replace("/")):(console.log({text:t}),i.loginError=!0)})}catch{console.log("Error")}}}},u$=pt("br",null,null,-1),d$=["src"],h$=pt("h1",null,"LOGIN",-1);function f$(i,e,t,n,s,o){const r=de("v-col"),a=de("v-row"),l=de("v-text-field"),c=de("v-btn"),u=de("v-alert"),d=de("v-responsive");return me(),kt(He,null,[u$,b(d,{class:"mx-auto","max-width":"350"},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{align:"center"},{default:oe(()=>[pt("img",{src:n.logo,alt:"Establo logo."},null,8,d$)]),_:1})]),_:1}),b(a,null,{default:oe(()=>[b(r,null,{default:oe(()=>[h$]),_:1})]),_:1}),b(a,null,{default:oe(()=>[b(r,null,{default:oe(()=>[(me(),we(l,{modelValue:s.email,"onUpdate:modelValue":e[0]||(e[0]=h=>s.email=h),label:n.t("email"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1})]),_:1}),b(a,null,{default:oe(()=>[b(r,null,{default:oe(()=>[(me(),we(l,{modelValue:s.password,"onUpdate:modelValue":e[1]||(e[1]=h=>s.password=h),label:n.t("Password"),type:"password",density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1})]),_:1}),b(a,null,{default:oe(()=>[b(r,null,{default:oe(()=>[b(c,{disabled:!o.isDataValid,onClick:o.login,"prepend-icon":"mdi-account-circle"},{default:oe(()=>[De("Login")]),_:1},8,["disabled","onClick"])]),_:1})]),_:1}),Mt(b(a,null,{default:oe(()=>[b(r,null,{default:oe(()=>[b(u,{type:"error",title:"Login Error",text:"The inserted credentials are not valid. Please try again!"})]),_:1})]),_:1},512),[[Ps,s.loginError]])]),_:1})],64)}const p$=nt(c$,[["render",f$]]);var vo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g$(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Gf(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var CP={exports:{}};(function(i,e){(function(t){i.exports=t()})(function(){return function(){function t(n,s,o){function r(c,u){if(!s[c]){if(!n[c]){var d=typeof Gf=="function"&&Gf;if(!u&&d)return d(c,!0);if(a)return a(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var f=s[c]={exports:{}};n[c][0].call(f.exports,function(g){var p=n[c][1][g];return r(p||g)},f,f.exports,t,n,s,o)}return s[c].exports}for(var a=typeof Gf=="function"&&Gf,l=0;l<o.length;l++)r(o[l]);return r}return t}()({1:[function(t,n,s){(function(o,r){(function(){const a=t("events").EventEmitter,l=t("./store"),c=t("./topic-alias-recv"),u=t("./topic-alias-send"),d=t("mqtt-packet"),h=t("./default-message-id-provider"),f=t("readable-stream").Writable,g=t("inherits"),p=t("reinterval"),v=t("rfdc/default"),y=t("./validations"),C=t("xtend"),m=t("debug")("mqttjs:client"),w=o?o.nextTick:function(F){setTimeout(F,0)},E=r.setImmediate||function(F){w(F)},R={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0},O=["ECONNREFUSED","EADDRINUSE","ECONNRESET","ENOTFOUND"],A={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function D(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function L(F,k){if(F.options.protocolVersion===5&&k.cmd==="publish"){let q;k.properties&&(q=k.properties.topicAlias);const V=k.topic.toString();if(F.topicAliasSend)if(q){if(V.length!==0&&(m("applyTopicAlias :: register topic: %s - alias: %d",V,q),!F.topicAliasSend.put(V,q)))return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",V,q),new Error("Sending Topic Alias out of range")}else V.length!==0&&(F.options.autoAssignTopicAlias?(q=F.topicAliasSend.getAliasByTopic(V),q?(k.topic="",k.properties={...k.properties,topicAlias:q},m("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",V,q)):(q=F.topicAliasSend.getLruAlias(),F.topicAliasSend.put(V,q),k.properties={...k.properties,topicAlias:q},m("applyTopicAlias :: auto assign topic: %s - alias: %d",V,q))):F.options.autoUseTopicAlias&&(q=F.topicAliasSend.getAliasByTopic(V),q&&(k.topic="",k.properties={...k.properties,topicAlias:q},m("applyTopicAlias :: auto use topic: %s - alias: %d",V,q))));else if(q)return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",V,q),new Error("Sending Topic Alias out of range")}}function S(F,k){let q;k.properties&&(q=k.properties.topicAlias);let V=k.topic.toString();if(V.length===0){if(typeof q>"u")return new Error("Unregistered Topic Alias");if(V=F.topicAliasSend.getTopicByAlias(q),typeof V>"u")return new Error("Unregistered Topic Alias");k.topic=V}q&&delete k.properties.topicAlias}function x(F,k,q){m("sendPacket :: packet: %O",k),m("sendPacket :: emitting `packetsend`"),F.emit("packetsend",k),m("sendPacket :: writing to stream");const V=d.writeToStream(k,F.stream,F.options);m("sendPacket :: writeToStream result %s",V),!V&&q&&q!==Q?(m("sendPacket :: handle events on `drain` once through callback."),F.stream.once("drain",q)):q&&(m("sendPacket :: invoking cb"),q())}function T(F){F&&(m("flush: queue exists? %b",!!F),Object.keys(F).forEach(function(k){typeof F[k].cb=="function"&&(F[k].cb(new Error("Connection closed")),delete F[k])}))}function H(F){F&&(m("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(F).forEach(function(k){F[k].volatile&&typeof F[k].cb=="function"&&(F[k].cb(new Error("Connection closed")),delete F[k])}))}function Y(F,k,q,V){m("storeAndSend :: store packet with cmd %s to outgoingStore",k.cmd);let J=k,ae;if(J.cmd==="publish"&&(J=v(k),ae=S(F,J),ae))return q&&q(ae);F.outgoingStore.put(J,function(ce){if(ce)return q&&q(ce);V(),x(F,k,q)})}function Q(F){m("nop ::",F)}function te(F,k){let q;const V=this;if(!(this instanceof te))return new te(F,k);this.options=k||{};for(q in R)typeof this.options[q]>"u"?this.options[q]=R[q]:this.options[q]=k[q];m("MqttClient :: options.protocol",k.protocol),m("MqttClient :: options.protocolVersion",k.protocolVersion),m("MqttClient :: options.username",k.username),m("MqttClient :: options.keepalive",k.keepalive),m("MqttClient :: options.reconnectPeriod",k.reconnectPeriod),m("MqttClient :: options.rejectUnauthorized",k.rejectUnauthorized),m("MqttClient :: options.topicAliasMaximum",k.topicAliasMaximum),this.options.clientId=typeof k.clientId=="string"?k.clientId:D(),m("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=k.protocolVersion===5&&k.customHandleAcks?k.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=F,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new h:this.options.messageIdProvider,this.outgoingStore=k.outgoingStore||new l,this.incomingStore=k.incomingStore||new l,this.queueQoSZero=k.queueQoSZero===void 0?!0:k.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,k.topicAliasMaximum>0&&(k.topicAliasMaximum>65535?m("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new c(k.topicAliasMaximum)),this.on("connect",function(){const J=this.queue;function ae(){const se=J.shift();m("deliver :: entry %o",se);let ce=null;if(!se){V._resubscribe();return}ce=se.packet,m("deliver :: call _sendPacket for %o",ce);let re=!0;ce.messageId&&ce.messageId!==0&&(V.messageIdProvider.register(ce.messageId)||(re=!1)),re?V._sendPacket(ce,function(K){se.cb&&se.cb(K),ae()}):(m("messageId: %d has already used. The message is skipped and removed.",ce.messageId),ae())}m("connect :: sending queued packets"),ae()}),this.on("close",function(){m("close :: connected set to `false`"),this.connected=!1,m("close :: clearing connackTimer"),clearTimeout(this.connackTimer),m("close :: clearing ping timer"),V.pingTimer!==null&&(V.pingTimer.clear(),V.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),m("close :: calling _setupReconnect"),this._setupReconnect()}),a.call(this),m("MqttClient :: setting up stream"),this._setupStream()}g(te,a),te.prototype._setupStream=function(){const F=this,k=new f,q=d.parser(this.options);let V=null;const J=[];m("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),m("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),q.on("packet",function(K){m("parser :: on packet push to packets array."),J.push(K)});function ae(){if(J.length)w(se);else{const K=V;V=null,K()}}function se(){m("work :: getting next packet in queue");const K=J.shift();if(K)m("work :: packet pulled from queue"),F._handlePacket(K,ae);else{m("work :: no packets in queue");const he=V;V=null,m("work :: done flag is %s",!!he),he&&he()}}k._write=function(K,he,ne){V=ne,m("writable stream :: parsing buffer"),q.parse(K),se()};function ce(K){m("streamErrorHandler :: error",K.message),O.includes(K.code)?(m("streamErrorHandler :: emitting error"),F.emit("error",K)):Q(K)}m("_setupStream :: pipe stream to writable stream"),this.stream.pipe(k),this.stream.on("error",ce),this.stream.on("close",function(){m("(%s)stream :: on close",F.options.clientId),H(F.outgoing),m("stream: emit close to MqttClient"),F.emit("close")}),m("_setupStream: sending packet `connect`");const re=Object.create(this.options);if(re.cmd="connect",this.topicAliasRecv&&(re.properties||(re.properties={}),this.topicAliasRecv&&(re.properties.topicAliasMaximum=this.topicAliasRecv.max)),x(this,re),q.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return F.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){const K=C({cmd:"auth",reasonCode:0},this.options.authPacket);x(this,K)}}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){m("!!connectTimeout hit!! Calling _cleanUp with force `true`"),F._cleanUp(!0)},this.options.connectTimeout)},te.prototype._handlePacket=function(F,k){const q=this.options;if(q.protocolVersion===5&&q.properties&&q.properties.maximumPacketSize&&q.properties.maximumPacketSize<F.length)return this.emit("error",new Error("exceeding packets size "+F.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(m("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",F),F.cmd){case"publish":this._handlePublish(F,k);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(F),k();break;case"pubrel":this._handlePubrel(F,k);break;case"connack":this._handleConnack(F),k();break;case"auth":this._handleAuth(F),k();break;case"pingresp":this._handlePingresp(F),k();break;case"disconnect":this._handleDisconnect(F),k();break}},te.prototype._checkDisconnecting=function(F){return this.disconnecting&&(F&&F!==Q?F(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},te.prototype.publish=function(F,k,q,V){m("publish :: message `%s` to topic `%s`",k,F);const J=this.options;if(typeof q=="function"&&(V=q,q=null),q=C({qos:0,retain:!1,dup:!1},q),this._checkDisconnecting(V))return this;const se=this,ce=function(){let re=0;if((q.qos===1||q.qos===2)&&(re=se._nextId(),re===null))return m("No messageId left"),!1;const K={cmd:"publish",topic:F,payload:k,qos:q.qos,retain:q.retain,messageId:re,dup:q.dup};switch(J.protocolVersion===5&&(K.properties=q.properties),m("publish :: qos",q.qos),q.qos){case 1:case 2:se.outgoing[K.messageId]={volatile:!1,cb:V||Q},m("MqttClient:publish: packet cmd: %s",K.cmd),se._sendPacket(K,void 0,q.cbStorePut);break;default:m("MqttClient:publish: packet cmd: %s",K.cmd),se._sendPacket(K,V,q.cbStorePut);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!ce())&&this._storeProcessingQueue.push({invoke:ce,cbStorePut:q.cbStorePut,callback:V}),this},te.prototype.subscribe=function(){const F=this,k=new Array(arguments.length);for(let ne=0;ne<arguments.length;ne++)k[ne]=arguments[ne];const q=[];let V=k.shift();const J=V.resubscribe;let ae=k.pop()||Q,se=k.pop();const ce=this.options.protocolVersion;delete V.resubscribe,typeof V=="string"&&(V=[V]),typeof ae!="function"&&(se=ae,ae=Q);const re=y.validateTopics(V);if(re!==null)return E(ae,new Error("Invalid topic "+re)),this;if(this._checkDisconnecting(ae))return m("subscribe: discconecting true"),this;const K={qos:0};if(ce===5&&(K.nl=!1,K.rap=!1,K.rh=0),se=C(K,se),Array.isArray(V)?V.forEach(function(ne){if(m("subscribe: array topic %s",ne),!Object.prototype.hasOwnProperty.call(F._resubscribeTopics,ne)||F._resubscribeTopics[ne].qos<se.qos||J){const ie={topic:ne,qos:se.qos};ce===5&&(ie.nl=se.nl,ie.rap=se.rap,ie.rh=se.rh,ie.properties=se.properties),m("subscribe: pushing topic `%s` and qos `%s` to subs list",ie.topic,ie.qos),q.push(ie)}}):Object.keys(V).forEach(function(ne){if(m("subscribe: object topic %s",ne),!Object.prototype.hasOwnProperty.call(F._resubscribeTopics,ne)||F._resubscribeTopics[ne].qos<V[ne].qos||J){const ie={topic:ne,qos:V[ne].qos};ce===5&&(ie.nl=V[ne].nl,ie.rap=V[ne].rap,ie.rh=V[ne].rh,ie.properties=se.properties),m("subscribe: pushing `%s` to subs list",ie),q.push(ie)}}),!q.length)return ae(null,[]),this;const he=function(){const ne=F._nextId();if(ne===null)return m("No messageId left"),!1;const ie={cmd:"subscribe",subscriptions:q,qos:1,retain:!1,dup:!1,messageId:ne};if(se.properties&&(ie.properties=se.properties),F.options.resubscribe){m("subscribe :: resubscribe true");const ee=[];q.forEach(function(j){if(F.options.reconnectPeriod>0){const M={qos:j.qos};ce===5&&(M.nl=j.nl||!1,M.rap=j.rap||!1,M.rh=j.rh||0,M.properties=j.properties),F._resubscribeTopics[j.topic]=M,ee.push(j.topic)}}),F.messageIdToTopic[ie.messageId]=ee}return F.outgoing[ie.messageId]={volatile:!0,cb:function(ee,j){if(!ee){const M=j.granted;for(let B=0;B<M.length;B+=1)q[B].qos=M[B]}ae(ee,q)}},m("subscribe :: call _sendPacket"),F._sendPacket(ie),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!he())&&this._storeProcessingQueue.push({invoke:he,callback:ae}),this},te.prototype.unsubscribe=function(){const F=this,k=new Array(arguments.length);for(let ce=0;ce<arguments.length;ce++)k[ce]=arguments[ce];let q=k.shift(),V=k.pop()||Q,J=k.pop();typeof q=="string"&&(q=[q]),typeof V!="function"&&(J=V,V=Q);const ae=y.validateTopics(q);if(ae!==null)return E(V,new Error("Invalid topic "+ae)),this;if(F._checkDisconnecting(V))return this;const se=function(){const ce=F._nextId();if(ce===null)return m("No messageId left"),!1;const re={cmd:"unsubscribe",qos:1,messageId:ce};return typeof q=="string"?re.unsubscriptions=[q]:Array.isArray(q)&&(re.unsubscriptions=q),F.options.resubscribe&&re.unsubscriptions.forEach(function(K){delete F._resubscribeTopics[K]}),typeof J=="object"&&J.properties&&(re.properties=J.properties),F.outgoing[re.messageId]={volatile:!0,cb:V},m("unsubscribe: call _sendPacket"),F._sendPacket(re),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!se())&&this._storeProcessingQueue.push({invoke:se,callback:V}),this},te.prototype.end=function(F,k,q){const V=this;m("end :: (%s)",this.options.clientId),(F==null||typeof F!="boolean")&&(q=k||Q,k=F,F=!1,typeof k!="object"&&(q=k,k=null,typeof q!="function"&&(q=Q))),typeof k!="object"&&(q=k,k=null),m("end :: cb? %s",!!q),q=q||Q;function J(){m("end :: closeStores: closing incoming and outgoing stores"),V.disconnected=!0,V.incomingStore.close(function(se){V.outgoingStore.close(function(ce){if(m("end :: closeStores: emitting end"),V.emit("end"),q){const re=se||ce;m("end :: closeStores: invoking callback with args"),q(re)}})}),V._deferredReconnect&&V._deferredReconnect()}function ae(){m("end :: (%s) :: finish :: calling _cleanUp with force %s",V.options.clientId,F),V._cleanUp(F,()=>{m("end :: finish :: calling process.nextTick on closeStores"),w(J.bind(V))},k)}return this.disconnecting?(q(),this):(this._clearReconnect(),this.disconnecting=!0,!F&&Object.keys(this.outgoing).length>0?(m("end :: (%s) :: calling finish in 10ms once outgoing is empty",V.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,ae,10))):(m("end :: (%s) :: immediately calling finish",V.options.clientId),ae()),this)},te.prototype.removeOutgoingMessage=function(F){const k=this.outgoing[F]?this.outgoing[F].cb:null;return delete this.outgoing[F],this.outgoingStore.del({messageId:F},function(){k(new Error("Message removed"))}),this},te.prototype.reconnect=function(F){m("client reconnect");const k=this,q=function(){F?(k.options.incomingStore=F.incomingStore,k.options.outgoingStore=F.outgoingStore):(k.options.incomingStore=null,k.options.outgoingStore=null),k.incomingStore=k.options.incomingStore||new l,k.outgoingStore=k.options.outgoingStore||new l,k.disconnecting=!1,k.disconnected=!1,k._deferredReconnect=null,k._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=q:q(),this},te.prototype._reconnect=function(){m("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),m("client already connected. disconnecting first.")):(m("_reconnect: calling _setupStream"),this._setupStream())},te.prototype._setupReconnect=function(){const F=this;!F.disconnecting&&!F.reconnectTimer&&F.options.reconnectPeriod>0?(this.reconnecting||(m("_setupReconnect :: emit `offline` state"),this.emit("offline"),m("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),m("_setupReconnect :: setting reconnectTimer for %d ms",F.options.reconnectPeriod),F.reconnectTimer=setInterval(function(){m("reconnectTimer :: reconnect triggered!"),F._reconnect()},F.options.reconnectPeriod)):m("_setupReconnect :: doing nothing...")},te.prototype._clearReconnect=function(){m("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},te.prototype._cleanUp=function(F,k){const q=arguments[2];if(k&&(m("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",k)),m("_cleanUp :: forced? %s",F),F)this.options.reconnectPeriod===0&&this.options.clean&&T(this.outgoing),m("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const V=C({cmd:"disconnect"},q);m("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(V,E.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(m("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(m("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),k&&!this.connected&&(m("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",k),k())},te.prototype._sendPacket=function(F,k,q){m("_sendPacket :: (%s) :: start",this.options.clientId),q=q||Q,k=k||Q;const V=L(this,F);if(V){k(V);return}if(!this.connected){if(F.cmd==="auth"){this._shiftPingInterval(),x(this,F,k);return}m("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(F,k,q);return}switch(this._shiftPingInterval(),F.cmd){case"publish":break;case"pubrel":Y(this,F,k,q);return;default:x(this,F,k);return}switch(F.qos){case 2:case 1:Y(this,F,k,q);break;case 0:default:x(this,F,k);break}m("_sendPacket :: (%s) :: end",this.options.clientId)},te.prototype._storePacket=function(F,k,q){m("_storePacket :: packet: %o",F),m("_storePacket :: cb? %s",!!k),q=q||Q;let V=F;if(V.cmd==="publish"){V=v(F);const J=S(this,V);if(J)return k&&k(J)}(V.qos||0)===0&&this.queueQoSZero||V.cmd!=="publish"?this.queue.push({packet:V,cb:k}):V.qos>0?(k=this.outgoing[V.messageId]?this.outgoing[V.messageId].cb:null,this.outgoingStore.put(V,function(J){if(J)return k&&k(J);q()})):k&&k(new Error("No connection to broker"))},te.prototype._setupPingTimer=function(){m("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const F=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=p(function(){F._checkPing()},this.options.keepalive*1e3))},te.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},te.prototype._checkPing=function(){m("_checkPing :: checking ping..."),this.pingResp?(m("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(m("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},te.prototype._handlePingresp=function(){this.pingResp=!0},te.prototype._handleConnack=function(F){m("_handleConnack");const k=this.options,V=k.protocolVersion===5?F.reasonCode:F.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,F.properties){if(F.properties.topicAliasMaximum){if(F.properties.topicAliasMaximum>65535){this.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}F.properties.topicAliasMaximum>0&&(this.topicAliasSend=new u(F.properties.topicAliasMaximum))}F.properties.serverKeepAlive&&k.keepalive&&(k.keepalive=F.properties.serverKeepAlive,this._shiftPingInterval()),F.properties.maximumPacketSize&&(k.properties||(k.properties={}),k.properties.maximumPacketSize=F.properties.maximumPacketSize)}if(V===0)this.reconnecting=!1,this._onConnect(F);else if(V>0){const J=new Error("Connection refused: "+A[V]);J.code=V,this.emit("error",J)}},te.prototype._handleAuth=function(F){const q=this.options.protocolVersion,V=q===5?F.reasonCode:F.returnCode;if(q!==5){const ae=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+q);ae.code=V,this.emit("error",ae);return}const J=this;this.handleAuth(F,function(ae,se){if(ae){J.emit("error",ae);return}if(V===24)J.reconnecting=!1,J._sendPacket(se);else{const ce=new Error("Connection refused: "+A[V]);ae.code=V,J.emit("error",ce)}})},te.prototype.handleAuth=function(F,k){k()},te.prototype._handlePublish=function(F,k){m("_handlePublish: packet %o",F),k=typeof k<"u"?k:Q;let q=F.topic.toString();const V=F.payload,J=F.qos,ae=F.messageId,se=this,ce=this.options,re=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let K;if(F.properties&&(K=F.properties.topicAlias),typeof K<"u")if(q.length===0)if(K>0&&K<=65535){const he=this.topicAliasRecv.getTopicByAlias(K);if(he)q=he,m("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",q,K);else{m("_handlePublish :: unregistered topic alias. alias: %d",K),this.emit("error",new Error("Received unregistered Topic Alias"));return}}else{m("_handlePublish :: topic alias out of range. alias: %d",K),this.emit("error",new Error("Received Topic Alias is out of range"));return}else if(this.topicAliasRecv.put(q,K))m("_handlePublish :: registered topic: %s - alias: %d",q,K);else{m("_handlePublish :: topic alias out of range. alias: %d",K),this.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(m("_handlePublish: qos %d",J),J){case 2:{ce.customHandleAcks(q,V,F,function(K,he){if(K instanceof Error||(he=K,K=null),K)return se.emit("error",K);if(re.indexOf(he)===-1)return se.emit("error",new Error("Wrong reason code for pubrec"));he?se._sendPacket({cmd:"pubrec",messageId:ae,reasonCode:he},k):se.incomingStore.put(F,function(){se._sendPacket({cmd:"pubrec",messageId:ae},k)})});break}case 1:{ce.customHandleAcks(q,V,F,function(K,he){if(K instanceof Error||(he=K,K=null),K)return se.emit("error",K);if(re.indexOf(he)===-1)return se.emit("error",new Error("Wrong reason code for puback"));he||se.emit("message",q,V,F),se.handleMessage(F,function(ne){if(ne)return k&&k(ne);se._sendPacket({cmd:"puback",messageId:ae,reasonCode:he},k)})});break}case 0:this.emit("message",q,V,F),this.handleMessage(F,k);break;default:m("_handlePublish: unknown QoS. Doing nothing.");break}},te.prototype.handleMessage=function(F,k){k()},te.prototype._handleAck=function(F){const k=F.messageId,q=F.cmd;let V=null;const J=this.outgoing[k]?this.outgoing[k].cb:null,ae=this;let se;if(!J){m("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(m("_handleAck :: packet type",q),q){case"pubcomp":case"puback":{const ce=F.reasonCode;ce&&ce>0&&ce!==16&&(se=new Error("Publish error: "+A[ce]),se.code=ce,J(se,F)),delete this.outgoing[k],this.outgoingStore.del(F,J),this.messageIdProvider.deallocate(k),this._invokeStoreProcessingQueue();break}case"pubrec":{V={cmd:"pubrel",qos:2,messageId:k};const ce=F.reasonCode;ce&&ce>0&&ce!==16?(se=new Error("Publish error: "+A[ce]),se.code=ce,J(se,F)):this._sendPacket(V);break}case"suback":{delete this.outgoing[k],this.messageIdProvider.deallocate(k);for(let ce=0;ce<F.granted.length;ce++)if(F.granted[ce]&128){const re=this.messageIdToTopic[k];re&&re.forEach(function(K){delete ae._resubscribeTopics[K]})}this._invokeStoreProcessingQueue(),J(null,F);break}case"unsuback":{delete this.outgoing[k],this.messageIdProvider.deallocate(k),this._invokeStoreProcessingQueue(),J(null);break}default:ae.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")},te.prototype._handlePubrel=function(F,k){m("handling pubrel packet"),k=typeof k<"u"?k:Q;const q=F.messageId,V=this,J={cmd:"pubcomp",messageId:q};V.incomingStore.get(F,function(ae,se){ae?V._sendPacket(J,k):(V.emit("message",se.topic,se.payload,se),V.handleMessage(se,function(ce){if(ce)return k(ce);V.incomingStore.del(se,Q),V._sendPacket(J,k)}))})},te.prototype._handleDisconnect=function(F){this.emit("disconnect",F)},te.prototype._nextId=function(){return this.messageIdProvider.allocate()},te.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},te.prototype._resubscribe=function(){m("_resubscribe");const F=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&F.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){m("_resubscribe: protocolVersion 5");for(let k=0;k<F.length;k++){const q={};q[F[k]]=this._resubscribeTopics[F[k]],q.resubscribe=!0,this.subscribe(q,{properties:q[F[k]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},te.prototype._onConnect=function(F){if(this.disconnected){this.emit("connect",F);return}const k=this;this.connackPacket=F,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0;function q(){let V=k.outgoingStore.createStream();function J(){k._storeProcessing=!1,k._packetIdsDuringStoreProcessing={}}k.once("close",ae),V.on("error",function(ce){J(),k._flushStoreProcessingQueue(),k.removeListener("close",ae),k.emit("error",ce)});function ae(){V.destroy(),V=null,k._flushStoreProcessingQueue(),J()}function se(){if(!V)return;k._storeProcessing=!0;const ce=V.read(1);let re;if(!ce){V.once("readable",se);return}if(k._packetIdsDuringStoreProcessing[ce.messageId]){se();return}!k.disconnecting&&!k.reconnectTimer?(re=k.outgoing[ce.messageId]?k.outgoing[ce.messageId].cb:null,k.outgoing[ce.messageId]={volatile:!1,cb:function(K,he){re&&re(K,he),se()}},k._packetIdsDuringStoreProcessing[ce.messageId]=!0,k.messageIdProvider.register(ce.messageId)?k._sendPacket(ce):m("messageId: %d has already used.",ce.messageId)):V.destroy&&V.destroy()}V.on("end",function(){let ce=!0;for(const re in k._packetIdsDuringStoreProcessing)if(!k._packetIdsDuringStoreProcessing[re]){ce=!1;break}ce?(J(),k.removeListener("close",ae),k._invokeAllStoreProcessingQueue(),k.emit("connect",F)):q()}),se()}q()},te.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const F=this._storeProcessingQueue[0];if(F&&F.invoke())return this._storeProcessingQueue.shift(),!0}return!1},te.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},te.prototype._flushStoreProcessingQueue=function(){for(const F of this._storeProcessingQueue)F.cbStorePut&&F.cbStorePut(new Error("Connection closed")),F.callback&&F.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},n.exports=te}).call(this)}).call(this,t("_process"),typeof vo<"u"?vo:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,n,s){const{Buffer:o}=t("buffer"),r=t("readable-stream").Transform,a=t("duplexify");let l,c,u,d=!1;function h(){const y=new r;return y._write=function(C,m,w){l.sendSocketMessage({data:C.buffer,success:function(){w()},fail:function(){w(new Error)}})},y._flush=function(m){l.closeSocket({success:function(){m()}})},y}function f(y){y.hostname||(y.hostname="localhost"),y.path||(y.path="/"),y.wsOptions||(y.wsOptions={})}function g(y,C){const m=y.protocol==="alis"?"wss":"ws";let w=m+"://"+y.hostname+y.path;return y.port&&y.port!==80&&y.port!==443&&(w=m+"://"+y.hostname+":"+y.port+y.path),typeof y.transformWsUrl=="function"&&(w=y.transformWsUrl(w,y,C)),w}function p(){d||(d=!0,l.onSocketOpen(function(){u.setReadable(c),u.setWritable(c),u.emit("connect")}),l.onSocketMessage(function(y){if(typeof y.data=="string"){const C=o.from(y.data,"base64");c.push(C)}else{const C=new FileReader;C.addEventListener("load",function(){let m=C.result;m instanceof ArrayBuffer?m=o.from(m):m=o.from(m,"utf8"),c.push(m)}),C.readAsArrayBuffer(y.data)}}),l.onSocketClose(function(){u.end(),u.destroy()}),l.onSocketError(function(y){u.destroy(y)}))}function v(y,C){if(C.hostname=C.hostname||C.host,!C.hostname)throw new Error("Could not determine host. Specify host manually.");const m=C.protocolId==="MQIsdp"&&C.protocolVersion===3?"mqttv3.1":"mqtt";f(C);const w=g(C,y);return l=C.my,l.connectSocket({url:w,protocols:m}),c=h(),u=a.obj(),p(),u}n.exports=v},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,n,s){const o=t("net"),r=t("debug")("mqttjs:tcp");function a(l,c){c.port=c.port||1883,c.hostname=c.hostname||c.host||"localhost";const u=c.port,d=c.hostname;return r("port %d and host %s",u,d),o.createConnection(u,d)}n.exports=a},{debug:18,net:16}],4:[function(t,n,s){const o=t("tls"),r=t("net"),a=t("debug")("mqttjs:tls");function l(c,u){u.port=u.port||8883,u.host=u.hostname||u.host||"localhost",r.isIP(u.host)===0&&(u.servername=u.host),u.rejectUnauthorized=u.rejectUnauthorized!==!1,delete u.path,a("port %d host %s rejectUnauthorized %b",u.port,u.host,u.rejectUnauthorized);const d=o.connect(u);d.on("secureConnect",function(){u.rejectUnauthorized&&!d.authorized?d.emit("error",new Error("TLS not authorized")):d.removeListener("error",h)});function h(f){u.rejectUnauthorized&&c.emit("error",f),d.end()}return d.on("error",h),d}n.exports=l},{debug:18,net:16,tls:16}],5:[function(t,n,s){(function(o){(function(){const{Buffer:r}=t("buffer"),a=t("ws"),l=t("debug")("mqttjs:ws"),c=t("duplexify"),u=t("readable-stream").Transform,d=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],h=typeof o<"u"&&o.title==="browser"||typeof __webpack_require__=="function";function f(w,E){let R=w.protocol+"://"+w.hostname+":"+w.port+w.path;return typeof w.transformWsUrl=="function"&&(R=w.transformWsUrl(R,w,E)),R}function g(w){const E=w;return w.hostname||(E.hostname="localhost"),w.port||(w.protocol==="wss"?E.port=443:E.port=80),w.path||(E.path="/"),w.wsOptions||(E.wsOptions={}),!h&&w.protocol==="wss"&&d.forEach(function(R){Object.prototype.hasOwnProperty.call(w,R)&&!Object.prototype.hasOwnProperty.call(w.wsOptions,R)&&(E.wsOptions[R]=w[R])}),E}function p(w){const E=g(w);if(E.hostname||(E.hostname=E.host),!E.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");const R=new URL(document.URL);E.hostname=R.hostname,E.port||(E.port=R.port)}return E.objectMode===void 0&&(E.objectMode=!(E.binary===!0||E.binary===void 0)),E}function v(w,E,R){l("createWebSocket"),l("protocol: "+R.protocolId+" "+R.protocolVersion);const O=R.protocolId==="MQIsdp"&&R.protocolVersion===3?"mqttv3.1":"mqtt";return l("creating new Websocket for url: "+E+" and protocol: "+O),new a(E,[O],R.wsOptions)}function y(w,E){const R=E.protocolId==="MQIsdp"&&E.protocolVersion===3?"mqttv3.1":"mqtt",O=f(E,w),A=new WebSocket(O,[R]);return A.binaryType="arraybuffer",A}function C(w,E){l("streamBuilder");const R=g(E),O=f(R,w),A=v(w,O,R),D=a.createWebSocketStream(A,R.wsOptions);return D.url=O,A.on("close",()=>{D.destroy()}),D}function m(w,E){l("browserStreamBuilder");let R;const A=p(E).browserBufferSize||1024*512,D=E.browserBufferTimeout||1e3,L=!E.objectMode,S=y(w,E),x=H(E,q,V);E.objectMode||(x._writev=k),x.on("close",()=>{S.close()});const T=typeof S.addEventListener<"u";S.readyState===S.OPEN?R=x:(R=R=c(void 0,void 0,E),E.objectMode||(R._writev=k),T?S.addEventListener("open",Y):S.onopen=Y),R.socket=S,T?(S.addEventListener("close",Q),S.addEventListener("error",te),S.addEventListener("message",F)):(S.onclose=Q,S.onerror=te,S.onmessage=F);function H(J,ae,se){const ce=new u({objectModeMode:J.objectMode});return ce._write=ae,ce._flush=se,ce}function Y(){R.setReadable(x),R.setWritable(x),R.emit("connect")}function Q(){R.end(),R.destroy()}function te(J){R.destroy(J)}function F(J){let ae=J.data;ae instanceof ArrayBuffer?ae=r.from(ae):ae=r.from(ae,"utf8"),x.push(ae)}function k(J,ae){const se=new Array(J.length);for(let ce=0;ce<J.length;ce++)typeof J[ce].chunk=="string"?se[ce]=r.from(J[ce],"utf8"):se[ce]=J[ce].chunk;this._write(r.concat(se),"binary",ae)}function q(J,ae,se){S.bufferedAmount>A&&setTimeout(q,D,J,ae,se),L&&typeof J=="string"&&(J=r.from(J,"utf8"));try{S.send(J)}catch(ce){return se(ce)}se()}function V(J){S.close(),J()}return R}h?n.exports=m:n.exports=C}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,n,s){const{Buffer:o}=t("buffer"),r=t("readable-stream").Transform,a=t("duplexify");let l,c,u;function d(){const v=new r;return v._write=function(y,C,m){l.send({data:y.buffer,success:function(){m()},fail:function(w){m(new Error(w))}})},v._flush=function(C){l.close({success:function(){C()}})},v}function h(v){v.hostname||(v.hostname="localhost"),v.path||(v.path="/"),v.wsOptions||(v.wsOptions={})}function f(v,y){const C=v.protocol==="wxs"?"wss":"ws";let m=C+"://"+v.hostname+v.path;return v.port&&v.port!==80&&v.port!==443&&(m=C+"://"+v.hostname+":"+v.port+v.path),typeof v.transformWsUrl=="function"&&(m=v.transformWsUrl(m,v,y)),m}function g(){l.onOpen(function(){u.setReadable(c),u.setWritable(c),u.emit("connect")}),l.onMessage(function(v){let y=v.data;y instanceof ArrayBuffer?y=o.from(y):y=o.from(y,"utf8"),c.push(y)}),l.onClose(function(){u.end(),u.destroy()}),l.onError(function(v){u.destroy(new Error(v.errMsg))})}function p(v,y){if(y.hostname=y.hostname||y.host,!y.hostname)throw new Error("Could not determine host. Specify host manually.");const C=y.protocolId==="MQIsdp"&&y.protocolVersion===3?"mqttv3.1":"mqtt";h(y);const m=f(y,v);l=wx.connectSocket({url:m,protocols:[C]}),c=d(),u=a.obj(),u._destroy=function(E,R){l.close({success:function(){R&&R(E)}})};const w=u.destroy;return u.destroy=(function(){u.destroy=w;const E=this;setTimeout(function(){l.close({fail:function(){E._destroy(new Error)}})},0)}).bind(u),g(),u}n.exports=p},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,n,s){function o(){if(!(this instanceof o))return new o;this.nextId=Math.max(1,Math.floor(Math.random()*65535))}o.prototype.allocate=function(){const r=this.nextId++;return this.nextId===65536&&(this.nextId=1),r},o.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},o.prototype.register=function(r){return!0},o.prototype.deallocate=function(r){},o.prototype.clear=function(){},n.exports=o},{}],8:[function(t,n,s){const o=t("xtend"),r=t("readable-stream").Readable,a={objectMode:!0},l={clean:!0};function c(u){if(!(this instanceof c))return new c(u);this.options=u||{},this.options=o(l,u),this._inflights=new Map}c.prototype.put=function(u,d){return this._inflights.set(u.messageId,u),d&&d(),this},c.prototype.createStream=function(){const u=new r(a),d=[];let h=!1,f=0;return this._inflights.forEach(function(g,p){d.push(g)}),u._read=function(){!h&&f<d.length?this.push(d[f++]):this.push(null)},u.destroy=function(){if(h)return;const g=this;h=!0,setTimeout(function(){g.emit("close")},0)},u},c.prototype.del=function(u,d){return u=this._inflights.get(u.messageId),u?(this._inflights.delete(u.messageId),d(null,u)):d&&d(new Error("missing packet")),this},c.prototype.get=function(u,d){return u=this._inflights.get(u.messageId),u?d(null,u):d&&d(new Error("missing packet")),this},c.prototype.close=function(u){this.options.clean&&(this._inflights=null),u&&u()},n.exports=c},{"readable-stream":69,xtend:81}],9:[function(t,n,s){function o(r){if(!(this instanceof o))return new o(r);this.aliasToTopic={},this.max=r}o.prototype.put=function(r,a){return a===0||a>this.max?!1:(this.aliasToTopic[a]=r,this.length=Object.keys(this.aliasToTopic).length,!0)},o.prototype.getTopicByAlias=function(r){return this.aliasToTopic[r]},o.prototype.clear=function(){this.aliasToTopic={}},n.exports=o},{}],10:[function(t,n,s){const o=t("lru-cache"),r=t("number-allocator").NumberAllocator;function a(l){if(!(this instanceof a))return new a(l);l>0&&(this.aliasToTopic=new o({max:l}),this.topicToAlias={},this.numberAllocator=new r(1,l),this.max=l,this.length=0)}a.prototype.put=function(l,c){if(c===0||c>this.max)return!1;const u=this.aliasToTopic.get(c);return u&&delete this.topicToAlias[u],this.aliasToTopic.set(c,l),this.topicToAlias[l]=c,this.numberAllocator.use(c),this.length=this.aliasToTopic.length,!0},a.prototype.getTopicByAlias=function(l){return this.aliasToTopic.get(l)},a.prototype.getAliasByTopic=function(l){const c=this.topicToAlias[l];return typeof c<"u"&&this.aliasToTopic.get(c),c},a.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},a.prototype.getLruAlias=function(){const l=this.numberAllocator.firstVacant();return l||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},n.exports=a},{"lru-cache":37,"number-allocator":46}],11:[function(t,n,s){function o(a){const l=a.split("/");for(let c=0;c<l.length;c++)if(l[c]!=="+"){if(l[c]==="#")return c===l.length-1;if(l[c].indexOf("+")!==-1||l[c].indexOf("#")!==-1)return!1}return!0}function r(a){if(a.length===0)return"empty_topic_list";for(let l=0;l<a.length;l++)if(!o(a[l]))return a[l];return null}n.exports={validateTopics:r}},{}],12:[function(t,n,s){(function(o){(function(){const r=t("../client"),a=t("../store"),l=t("url"),c=t("xtend"),u=t("debug")("mqttjs"),d={};typeof o<"u"&&o.title!=="browser"||typeof __webpack_require__!="function"?(d.mqtt=t("./tcp"),d.tcp=t("./tcp"),d.ssl=t("./tls"),d.tls=t("./tls"),d.mqtts=t("./tls")):(d.wx=t("./wx"),d.wxs=t("./wx"),d.ali=t("./ali"),d.alis=t("./ali")),d.ws=t("./ws"),d.wss=t("./ws");function h(g){let p;g.auth&&(p=g.auth.match(/^(.+):(.+)$/),p?(g.username=p[1],g.password=p[2]):g.username=g.auth)}function f(g,p){if(u("connecting to an MQTT broker..."),typeof g=="object"&&!p&&(p=g,g=null),p=p||{},g){const C=l.parse(g,!0);if(C.port!=null&&(C.port=Number(C.port)),p=c(C,p),p.protocol===null)throw new Error("Missing protocol");p.protocol=p.protocol.replace(/:$/,"")}if(h(p),p.query&&typeof p.query.clientId=="string"&&(p.clientId=p.query.clientId),p.cert&&p.key)if(p.protocol){if(["mqtts","wss","wxs","alis"].indexOf(p.protocol)===-1)switch(p.protocol){case"mqtt":p.protocol="mqtts";break;case"ws":p.protocol="wss";break;case"wx":p.protocol="wxs";break;case"ali":p.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+p.protocol+'"!')}}else throw new Error("Missing secure protocol key");if(!d[p.protocol]){const C=["mqtts","wss"].indexOf(p.protocol)!==-1;p.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(m,w){return C&&w%2===0?!1:typeof d[m]=="function"})[0]}if(p.clean===!1&&!p.clientId)throw new Error("Missing clientId for unclean clients");p.protocol&&(p.defaultProtocol=p.protocol);function v(C){return p.servers&&((!C._reconnectCount||C._reconnectCount===p.servers.length)&&(C._reconnectCount=0),p.host=p.servers[C._reconnectCount].host,p.port=p.servers[C._reconnectCount].port,p.protocol=p.servers[C._reconnectCount].protocol?p.servers[C._reconnectCount].protocol:p.defaultProtocol,p.hostname=p.host,C._reconnectCount++),u("calling streambuilder for",p.protocol),d[p.protocol](C,p)}const y=new r(v,p);return y.on("error",function(){}),y}n.exports=f,n.exports.connect=f,n.exports.MqttClient=r,n.exports.Store=a}).call(this)}).call(this,t("_process"))},{"../client":1,"../store":8,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:50,debug:18,url:76,xtend:81}],13:[function(t,n,s){s.byteLength=h,s.toByteArray=g,s.fromByteArray=y;for(var o=[],r=[],a=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=l.length;c<u;++c)o[c]=l[c],r[l.charCodeAt(c)]=c;r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63;function d(C){var m=C.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=C.indexOf("=");w===-1&&(w=m);var E=w===m?0:4-w%4;return[w,E]}function h(C){var m=d(C),w=m[0],E=m[1];return(w+E)*3/4-E}function f(C,m,w){return(m+w)*3/4-w}function g(C){var m,w=d(C),E=w[0],R=w[1],O=new a(f(C,E,R)),A=0,D=R>0?E-4:E,L;for(L=0;L<D;L+=4)m=r[C.charCodeAt(L)]<<18|r[C.charCodeAt(L+1)]<<12|r[C.charCodeAt(L+2)]<<6|r[C.charCodeAt(L+3)],O[A++]=m>>16&255,O[A++]=m>>8&255,O[A++]=m&255;return R===2&&(m=r[C.charCodeAt(L)]<<2|r[C.charCodeAt(L+1)]>>4,O[A++]=m&255),R===1&&(m=r[C.charCodeAt(L)]<<10|r[C.charCodeAt(L+1)]<<4|r[C.charCodeAt(L+2)]>>2,O[A++]=m>>8&255,O[A++]=m&255),O}function p(C){return o[C>>18&63]+o[C>>12&63]+o[C>>6&63]+o[C&63]}function v(C,m,w){for(var E,R=[],O=m;O<w;O+=3)E=(C[O]<<16&16711680)+(C[O+1]<<8&65280)+(C[O+2]&255),R.push(p(E));return R.join("")}function y(C){for(var m,w=C.length,E=w%3,R=[],O=16383,A=0,D=w-E;A<D;A+=O)R.push(v(C,A,A+O>D?D:A+O));return E===1?(m=C[w-1],R.push(o[m>>2]+o[m<<4&63]+"==")):E===2&&(m=(C[w-2]<<8)+C[w-1],R.push(o[m>>10]+o[m>>4&63]+o[m<<2&63]+"=")),R.join("")}},{}],14:[function(t,n,s){const{Buffer:o}=t("buffer"),r=Symbol.for("BufferList");function a(l){if(!(this instanceof a))return new a(l);a._init.call(this,l)}a._init=function(c){Object.defineProperty(this,r,{value:!0}),this._bufs=[],this.length=0,c&&this.append(c)},a.prototype._new=function(c){return new a(c)},a.prototype._offset=function(c){if(c===0)return[0,0];let u=0;for(let d=0;d<this._bufs.length;d++){const h=u+this._bufs[d].length;if(c<h||d===this._bufs.length-1)return[d,c-u];u=h}},a.prototype._reverseOffset=function(l){const c=l[0];let u=l[1];for(let d=0;d<c;d++)u+=this._bufs[d].length;return u},a.prototype.get=function(c){if(c>this.length||c<0)return;const u=this._offset(c);return this._bufs[u[0]][u[1]]},a.prototype.slice=function(c,u){return typeof c=="number"&&c<0&&(c+=this.length),typeof u=="number"&&u<0&&(u+=this.length),this.copy(null,0,c,u)},a.prototype.copy=function(c,u,d,h){if((typeof d!="number"||d<0)&&(d=0),(typeof h!="number"||h>this.length)&&(h=this.length),d>=this.length||h<=0)return c||o.alloc(0);const f=!!c,g=this._offset(d),p=h-d;let v=p,y=f&&u||0,C=g[1];if(d===0&&h===this.length){if(!f)return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length);for(let m=0;m<this._bufs.length;m++)this._bufs[m].copy(c,y),y+=this._bufs[m].length;return c}if(v<=this._bufs[g[0]].length-C)return f?this._bufs[g[0]].copy(c,u,C,C+v):this._bufs[g[0]].slice(C,C+v);f||(c=o.allocUnsafe(p));for(let m=g[0];m<this._bufs.length;m++){const w=this._bufs[m].length-C;if(v>w)this._bufs[m].copy(c,y,C),y+=w;else{this._bufs[m].copy(c,y,C,C+v),y+=w;break}v-=w,C&&(C=0)}return c.length>y?c.slice(0,y):c},a.prototype.shallowSlice=function(c,u){if(c=c||0,u=typeof u!="number"?this.length:u,c<0&&(c+=this.length),u<0&&(u+=this.length),c===u)return this._new();const d=this._offset(c),h=this._offset(u),f=this._bufs.slice(d[0],h[0]+1);return h[1]===0?f.pop():f[f.length-1]=f[f.length-1].slice(0,h[1]),d[1]!==0&&(f[0]=f[0].slice(d[1])),this._new(f)},a.prototype.toString=function(c,u,d){return this.slice(u,d).toString(c)},a.prototype.consume=function(c){if(c=Math.trunc(c),Number.isNaN(c)||c<=0)return this;for(;this._bufs.length;)if(c>=this._bufs[0].length)c-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(c),this.length-=c;break}return this},a.prototype.duplicate=function(){const c=this._new();for(let u=0;u<this._bufs.length;u++)c.append(this._bufs[u]);return c},a.prototype.append=function(c){if(c==null)return this;if(c.buffer)this._appendBuffer(o.from(c.buffer,c.byteOffset,c.byteLength));else if(Array.isArray(c))for(let u=0;u<c.length;u++)this.append(c[u]);else if(this._isBufferList(c))for(let u=0;u<c._bufs.length;u++)this.append(c._bufs[u]);else typeof c=="number"&&(c=c.toString()),this._appendBuffer(o.from(c));return this},a.prototype._appendBuffer=function(c){this._bufs.push(c),this.length+=c.length},a.prototype.indexOf=function(l,c,u){if(u===void 0&&typeof c=="string"&&(u=c,c=void 0),typeof l=="function"||Array.isArray(l))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof l=="number"?l=o.from([l]):typeof l=="string"?l=o.from(l,u):this._isBufferList(l)?l=l.slice():Array.isArray(l.buffer)?l=o.from(l.buffer,l.byteOffset,l.byteLength):o.isBuffer(l)||(l=o.from(l)),c=Number(c||0),isNaN(c)&&(c=0),c<0&&(c=this.length+c),c<0&&(c=0),l.length===0)return c>this.length?this.length:c;const d=this._offset(c);let h=d[0],f=d[1];for(;h<this._bufs.length;h++){const g=this._bufs[h];for(;f<g.length;)if(g.length-f>=l.length){const v=g.indexOf(l,f);if(v!==-1)return this._reverseOffset([h,v]);f=g.length-l.length+1}else{const v=this._reverseOffset([h,f]);if(this._match(v,l))return v;f++}f=0}return-1},a.prototype._match=function(l,c){if(this.length-l<c.length)return!1;for(let u=0;u<c.length;u++)if(this.get(l+u)!==c[u])return!1;return!0},function(){const l={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const c in l)(function(u){l[u]===null?a.prototype[u]=function(d,h){return this.slice(d,d+h)[u](0,h)}:a.prototype[u]=function(d=0){return this.slice(d,d+l[u])[u](0)}})(c)}(),a.prototype._isBufferList=function(c){return c instanceof a||a.isBufferList(c)},a.isBufferList=function(c){return c!=null&&c[r]},n.exports=a},{buffer:17}],15:[function(t,n,s){const o=t("readable-stream").Duplex,r=t("inherits"),a=t("./BufferList");function l(c){if(!(this instanceof l))return new l(c);if(typeof c=="function"){this._callback=c;const u=(function(h){this._callback&&(this._callback(h),this._callback=null)}).bind(this);this.on("pipe",function(h){h.on("error",u)}),this.on("unpipe",function(h){h.removeListener("error",u)}),c=null}a._init.call(this,c),o.call(this)}r(l,o),Object.assign(l.prototype,a.prototype),l.prototype._new=function(u){return new l(u)},l.prototype._write=function(u,d,h){this._appendBuffer(u),typeof h=="function"&&h()},l.prototype._read=function(u){if(!this.length)return this.push(null);u=Math.min(u,this.length),this.push(this.slice(0,u)),this.consume(u)},l.prototype.end=function(u){o.prototype.end.call(this,u),this._callback&&(this._callback(null,this.slice()),this._callback=null)},l.prototype._destroy=function(u,d){this._bufs.length=0,this.length=0,d(u)},l.prototype._isBufferList=function(u){return u instanceof l||u instanceof a||l.isBufferList(u)},l.isBufferList=a.isBufferList,n.exports=l,n.exports.BufferListStream=l,n.exports.BufferList=a},{"./BufferList":14,inherits:24,"readable-stream":69}],16:[function(t,n,s){},{}],17:[function(t,n,s){(function(o){(function(){var r=t("base64-js"),a=t("ieee754");s.Buffer=d,s.SlowBuffer=E,s.INSPECT_MAX_BYTES=50;var l=2147483647;s.kMaxLength=l,d.TYPED_ARRAY_SUPPORT=c(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var I=new Uint8Array(1);return I.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},I.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function u(I){if(I>l)throw new RangeError('The value "'+I+'" is invalid for option "size"');var _=new Uint8Array(I);return _.__proto__=d.prototype,_}function d(I,_,P){if(typeof I=="number"){if(typeof _=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(I)}return h(I,_,P)}typeof Symbol<"u"&&Symbol.species!=null&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),d.poolSize=8192;function h(I,_,P){if(typeof I=="string")return v(I,_);if(ArrayBuffer.isView(I))return y(I);if(I==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(G(I,ArrayBuffer)||I&&G(I.buffer,ArrayBuffer))return C(I,_,P);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var $=I.valueOf&&I.valueOf();if($!=null&&$!==I)return d.from($,_,P);var le=m(I);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return d.from(I[Symbol.toPrimitive]("string"),_,P);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}d.from=function(I,_,P){return h(I,_,P)},d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array;function f(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function g(I,_,P){return f(I),I<=0?u(I):_!==void 0?typeof P=="string"?u(I).fill(_,P):u(I).fill(_):u(I)}d.alloc=function(I,_,P){return g(I,_,P)};function p(I){return f(I),u(I<0?0:w(I)|0)}d.allocUnsafe=function(I){return p(I)},d.allocUnsafeSlow=function(I){return p(I)};function v(I,_){if((typeof _!="string"||_==="")&&(_="utf8"),!d.isEncoding(_))throw new TypeError("Unknown encoding: "+_);var P=R(I,_)|0,$=u(P),le=$.write(I,_);return le!==P&&($=$.slice(0,le)),$}function y(I){for(var _=I.length<0?0:w(I.length)|0,P=u(_),$=0;$<_;$+=1)P[$]=I[$]&255;return P}function C(I,_,P){if(_<0||I.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(I.byteLength<_+(P||0))throw new RangeError('"length" is outside of buffer bounds');var $;return _===void 0&&P===void 0?$=new Uint8Array(I):P===void 0?$=new Uint8Array(I,_):$=new Uint8Array(I,_,P),$.__proto__=d.prototype,$}function m(I){if(d.isBuffer(I)){var _=w(I.length)|0,P=u(_);return P.length===0||I.copy(P,0,0,_),P}if(I.length!==void 0)return typeof I.length!="number"||U(I.length)?u(0):y(I);if(I.type==="Buffer"&&Array.isArray(I.data))return y(I.data)}function w(I){if(I>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return I|0}function E(I){return+I!=I&&(I=0),d.alloc(+I)}d.isBuffer=function(_){return _!=null&&_._isBuffer===!0&&_!==d.prototype},d.compare=function(_,P){if(G(_,Uint8Array)&&(_=d.from(_,_.offset,_.byteLength)),G(P,Uint8Array)&&(P=d.from(P,P.offset,P.byteLength)),!d.isBuffer(_)||!d.isBuffer(P))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===P)return 0;for(var $=_.length,le=P.length,pe=0,ve=Math.min($,le);pe<ve;++pe)if(_[pe]!==P[pe]){$=_[pe],le=P[pe];break}return $<le?-1:le<$?1:0},d.isEncoding=function(_){switch(String(_).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(_,P){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(_.length===0)return d.alloc(0);var $;if(P===void 0)for(P=0,$=0;$<_.length;++$)P+=_[$].length;var le=d.allocUnsafe(P),pe=0;for($=0;$<_.length;++$){var ve=_[$];if(G(ve,Uint8Array)&&(ve=d.from(ve)),!d.isBuffer(ve))throw new TypeError('"list" argument must be an Array of Buffers');ve.copy(le,pe),pe+=ve.length}return le};function R(I,_){if(d.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||G(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);var P=I.length,$=arguments.length>2&&arguments[2]===!0;if(!$&&P===0)return 0;for(var le=!1;;)switch(_){case"ascii":case"latin1":case"binary":return P;case"utf8":case"utf-8":return M(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P*2;case"hex":return P>>>1;case"base64":return Z(I).length;default:if(le)return $?-1:M(I).length;_=(""+_).toLowerCase(),le=!0}}d.byteLength=R;function O(I,_,P){var $=!1;if((_===void 0||_<0)&&(_=0),_>this.length||((P===void 0||P>this.length)&&(P=this.length),P<=0)||(P>>>=0,_>>>=0,P<=_))return"";for(I||(I="utf8");;)switch(I){case"hex":return ae(this,_,P);case"utf8":case"utf-8":return F(this,_,P);case"ascii":return V(this,_,P);case"latin1":case"binary":return J(this,_,P);case"base64":return te(this,_,P);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se(this,_,P);default:if($)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),$=!0}}d.prototype._isBuffer=!0;function A(I,_,P){var $=I[_];I[_]=I[P],I[P]=$}d.prototype.swap16=function(){var _=this.length;if(_%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var P=0;P<_;P+=2)A(this,P,P+1);return this},d.prototype.swap32=function(){var _=this.length;if(_%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var P=0;P<_;P+=4)A(this,P,P+3),A(this,P+1,P+2);return this},d.prototype.swap64=function(){var _=this.length;if(_%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var P=0;P<_;P+=8)A(this,P,P+7),A(this,P+1,P+6),A(this,P+2,P+5),A(this,P+3,P+4);return this},d.prototype.toString=function(){var _=this.length;return _===0?"":arguments.length===0?F(this,0,_):O.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(_){if(!d.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_?!0:d.compare(this,_)===0},d.prototype.inspect=function(){var _="",P=s.INSPECT_MAX_BYTES;return _=this.toString("hex",0,P).replace(/(.{2})/g,"$1 ").trim(),this.length>P&&(_+=" ... "),"<Buffer "+_+">"},d.prototype.compare=function(_,P,$,le,pe){if(G(_,Uint8Array)&&(_=d.from(_,_.offset,_.byteLength)),!d.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(P===void 0&&(P=0),$===void 0&&($=_?_.length:0),le===void 0&&(le=0),pe===void 0&&(pe=this.length),P<0||$>_.length||le<0||pe>this.length)throw new RangeError("out of range index");if(le>=pe&&P>=$)return 0;if(le>=pe)return-1;if(P>=$)return 1;if(P>>>=0,$>>>=0,le>>>=0,pe>>>=0,this===_)return 0;for(var ve=pe-le,Ge=$-P,Ue=Math.min(ve,Ge),et=this.slice(le,pe),At=_.slice(P,$),Et=0;Et<Ue;++Et)if(et[Et]!==At[Et]){ve=et[Et],Ge=At[Et];break}return ve<Ge?-1:Ge<ve?1:0};function D(I,_,P,$,le){if(I.length===0)return-1;if(typeof P=="string"?($=P,P=0):P>2147483647?P=2147483647:P<-2147483648&&(P=-2147483648),P=+P,U(P)&&(P=le?0:I.length-1),P<0&&(P=I.length+P),P>=I.length){if(le)return-1;P=I.length-1}else if(P<0)if(le)P=0;else return-1;if(typeof _=="string"&&(_=d.from(_,$)),d.isBuffer(_))return _.length===0?-1:L(I,_,P,$,le);if(typeof _=="number")return _=_&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(I,_,P):Uint8Array.prototype.lastIndexOf.call(I,_,P):L(I,[_],P,$,le);throw new TypeError("val must be string, number or Buffer")}function L(I,_,P,$,le){var pe=1,ve=I.length,Ge=_.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(I.length<2||_.length<2)return-1;pe=2,ve/=2,Ge/=2,P/=2}function Ue(Tn,hs){return pe===1?Tn[hs]:Tn.readUInt16BE(hs*pe)}var et;if(le){var At=-1;for(et=P;et<ve;et++)if(Ue(I,et)===Ue(_,At===-1?0:et-At)){if(At===-1&&(At=et),et-At+1===Ge)return At*pe}else At!==-1&&(et-=et-At),At=-1}else for(P+Ge>ve&&(P=ve-Ge),et=P;et>=0;et--){for(var Et=!0,Hs=0;Hs<Ge;Hs++)if(Ue(I,et+Hs)!==Ue(_,Hs)){Et=!1;break}if(Et)return et}return-1}d.prototype.includes=function(_,P,$){return this.indexOf(_,P,$)!==-1},d.prototype.indexOf=function(_,P,$){return D(this,_,P,$,!0)},d.prototype.lastIndexOf=function(_,P,$){return D(this,_,P,$,!1)};function S(I,_,P,$){P=Number(P)||0;var le=I.length-P;$?($=Number($),$>le&&($=le)):$=le;var pe=_.length;$>pe/2&&($=pe/2);for(var ve=0;ve<$;++ve){var Ge=parseInt(_.substr(ve*2,2),16);if(U(Ge))return ve;I[P+ve]=Ge}return ve}function x(I,_,P,$){return ue(M(_,I.length-P),I,P,$)}function T(I,_,P,$){return ue(B(_),I,P,$)}function H(I,_,P,$){return T(I,_,P,$)}function Y(I,_,P,$){return ue(Z(_),I,P,$)}function Q(I,_,P,$){return ue(X(_,I.length-P),I,P,$)}d.prototype.write=function(_,P,$,le){if(P===void 0)le="utf8",$=this.length,P=0;else if($===void 0&&typeof P=="string")le=P,$=this.length,P=0;else if(isFinite(P))P=P>>>0,isFinite($)?($=$>>>0,le===void 0&&(le="utf8")):(le=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-P;if(($===void 0||$>pe)&&($=pe),_.length>0&&($<0||P<0)||P>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var ve=!1;;)switch(le){case"hex":return S(this,_,P,$);case"utf8":case"utf-8":return x(this,_,P,$);case"ascii":return T(this,_,P,$);case"latin1":case"binary":return H(this,_,P,$);case"base64":return Y(this,_,P,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,_,P,$);default:if(ve)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),ve=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function te(I,_,P){return _===0&&P===I.length?r.fromByteArray(I):r.fromByteArray(I.slice(_,P))}function F(I,_,P){P=Math.min(I.length,P);for(var $=[],le=_;le<P;){var pe=I[le],ve=null,Ge=pe>239?4:pe>223?3:pe>191?2:1;if(le+Ge<=P){var Ue,et,At,Et;switch(Ge){case 1:pe<128&&(ve=pe);break;case 2:Ue=I[le+1],(Ue&192)===128&&(Et=(pe&31)<<6|Ue&63,Et>127&&(ve=Et));break;case 3:Ue=I[le+1],et=I[le+2],(Ue&192)===128&&(et&192)===128&&(Et=(pe&15)<<12|(Ue&63)<<6|et&63,Et>2047&&(Et<55296||Et>57343)&&(ve=Et));break;case 4:Ue=I[le+1],et=I[le+2],At=I[le+3],(Ue&192)===128&&(et&192)===128&&(At&192)===128&&(Et=(pe&15)<<18|(Ue&63)<<12|(et&63)<<6|At&63,Et>65535&&Et<1114112&&(ve=Et))}}ve===null?(ve=65533,Ge=1):ve>65535&&(ve-=65536,$.push(ve>>>10&1023|55296),ve=56320|ve&1023),$.push(ve),le+=Ge}return q($)}var k=4096;function q(I){var _=I.length;if(_<=k)return String.fromCharCode.apply(String,I);for(var P="",$=0;$<_;)P+=String.fromCharCode.apply(String,I.slice($,$+=k));return P}function V(I,_,P){var $="";P=Math.min(I.length,P);for(var le=_;le<P;++le)$+=String.fromCharCode(I[le]&127);return $}function J(I,_,P){var $="";P=Math.min(I.length,P);for(var le=_;le<P;++le)$+=String.fromCharCode(I[le]);return $}function ae(I,_,P){var $=I.length;(!_||_<0)&&(_=0),(!P||P<0||P>$)&&(P=$);for(var le="",pe=_;pe<P;++pe)le+=j(I[pe]);return le}function se(I,_,P){for(var $=I.slice(_,P),le="",pe=0;pe<$.length;pe+=2)le+=String.fromCharCode($[pe]+$[pe+1]*256);return le}d.prototype.slice=function(_,P){var $=this.length;_=~~_,P=P===void 0?$:~~P,_<0?(_+=$,_<0&&(_=0)):_>$&&(_=$),P<0?(P+=$,P<0&&(P=0)):P>$&&(P=$),P<_&&(P=_);var le=this.subarray(_,P);return le.__proto__=d.prototype,le};function ce(I,_,P){if(I%1!==0||I<0)throw new RangeError("offset is not uint");if(I+_>P)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUIntLE=function(_,P,$){_=_>>>0,P=P>>>0,$||ce(_,P,this.length);for(var le=this[_],pe=1,ve=0;++ve<P&&(pe*=256);)le+=this[_+ve]*pe;return le},d.prototype.readUIntBE=function(_,P,$){_=_>>>0,P=P>>>0,$||ce(_,P,this.length);for(var le=this[_+--P],pe=1;P>0&&(pe*=256);)le+=this[_+--P]*pe;return le},d.prototype.readUInt8=function(_,P){return _=_>>>0,P||ce(_,1,this.length),this[_]},d.prototype.readUInt16LE=function(_,P){return _=_>>>0,P||ce(_,2,this.length),this[_]|this[_+1]<<8},d.prototype.readUInt16BE=function(_,P){return _=_>>>0,P||ce(_,2,this.length),this[_]<<8|this[_+1]},d.prototype.readUInt32LE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+this[_+3]*16777216},d.prototype.readUInt32BE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),this[_]*16777216+(this[_+1]<<16|this[_+2]<<8|this[_+3])},d.prototype.readIntLE=function(_,P,$){_=_>>>0,P=P>>>0,$||ce(_,P,this.length);for(var le=this[_],pe=1,ve=0;++ve<P&&(pe*=256);)le+=this[_+ve]*pe;return pe*=128,le>=pe&&(le-=Math.pow(2,8*P)),le},d.prototype.readIntBE=function(_,P,$){_=_>>>0,P=P>>>0,$||ce(_,P,this.length);for(var le=P,pe=1,ve=this[_+--le];le>0&&(pe*=256);)ve+=this[_+--le]*pe;return pe*=128,ve>=pe&&(ve-=Math.pow(2,8*P)),ve},d.prototype.readInt8=function(_,P){return _=_>>>0,P||ce(_,1,this.length),this[_]&128?(255-this[_]+1)*-1:this[_]},d.prototype.readInt16LE=function(_,P){_=_>>>0,P||ce(_,2,this.length);var $=this[_]|this[_+1]<<8;return $&32768?$|4294901760:$},d.prototype.readInt16BE=function(_,P){_=_>>>0,P||ce(_,2,this.length);var $=this[_+1]|this[_]<<8;return $&32768?$|4294901760:$},d.prototype.readInt32LE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},d.prototype.readInt32BE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},d.prototype.readFloatLE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),a.read(this,_,!0,23,4)},d.prototype.readFloatBE=function(_,P){return _=_>>>0,P||ce(_,4,this.length),a.read(this,_,!1,23,4)},d.prototype.readDoubleLE=function(_,P){return _=_>>>0,P||ce(_,8,this.length),a.read(this,_,!0,52,8)},d.prototype.readDoubleBE=function(_,P){return _=_>>>0,P||ce(_,8,this.length),a.read(this,_,!1,52,8)};function re(I,_,P,$,le,pe){if(!d.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>le||_<pe)throw new RangeError('"value" argument is out of bounds');if(P+$>I.length)throw new RangeError("Index out of range")}d.prototype.writeUIntLE=function(_,P,$,le){if(_=+_,P=P>>>0,$=$>>>0,!le){var pe=Math.pow(2,8*$)-1;re(this,_,P,$,pe,0)}var ve=1,Ge=0;for(this[P]=_&255;++Ge<$&&(ve*=256);)this[P+Ge]=_/ve&255;return P+$},d.prototype.writeUIntBE=function(_,P,$,le){if(_=+_,P=P>>>0,$=$>>>0,!le){var pe=Math.pow(2,8*$)-1;re(this,_,P,$,pe,0)}var ve=$-1,Ge=1;for(this[P+ve]=_&255;--ve>=0&&(Ge*=256);)this[P+ve]=_/Ge&255;return P+$},d.prototype.writeUInt8=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,1,255,0),this[P]=_&255,P+1},d.prototype.writeUInt16LE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,2,65535,0),this[P]=_&255,this[P+1]=_>>>8,P+2},d.prototype.writeUInt16BE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,2,65535,0),this[P]=_>>>8,this[P+1]=_&255,P+2},d.prototype.writeUInt32LE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,4,4294967295,0),this[P+3]=_>>>24,this[P+2]=_>>>16,this[P+1]=_>>>8,this[P]=_&255,P+4},d.prototype.writeUInt32BE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,4,4294967295,0),this[P]=_>>>24,this[P+1]=_>>>16,this[P+2]=_>>>8,this[P+3]=_&255,P+4},d.prototype.writeIntLE=function(_,P,$,le){if(_=+_,P=P>>>0,!le){var pe=Math.pow(2,8*$-1);re(this,_,P,$,pe-1,-pe)}var ve=0,Ge=1,Ue=0;for(this[P]=_&255;++ve<$&&(Ge*=256);)_<0&&Ue===0&&this[P+ve-1]!==0&&(Ue=1),this[P+ve]=(_/Ge>>0)-Ue&255;return P+$},d.prototype.writeIntBE=function(_,P,$,le){if(_=+_,P=P>>>0,!le){var pe=Math.pow(2,8*$-1);re(this,_,P,$,pe-1,-pe)}var ve=$-1,Ge=1,Ue=0;for(this[P+ve]=_&255;--ve>=0&&(Ge*=256);)_<0&&Ue===0&&this[P+ve+1]!==0&&(Ue=1),this[P+ve]=(_/Ge>>0)-Ue&255;return P+$},d.prototype.writeInt8=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,1,127,-128),_<0&&(_=255+_+1),this[P]=_&255,P+1},d.prototype.writeInt16LE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,2,32767,-32768),this[P]=_&255,this[P+1]=_>>>8,P+2},d.prototype.writeInt16BE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,2,32767,-32768),this[P]=_>>>8,this[P+1]=_&255,P+2},d.prototype.writeInt32LE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,4,2147483647,-2147483648),this[P]=_&255,this[P+1]=_>>>8,this[P+2]=_>>>16,this[P+3]=_>>>24,P+4},d.prototype.writeInt32BE=function(_,P,$){return _=+_,P=P>>>0,$||re(this,_,P,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[P]=_>>>24,this[P+1]=_>>>16,this[P+2]=_>>>8,this[P+3]=_&255,P+4};function K(I,_,P,$,le,pe){if(P+$>I.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("Index out of range")}function he(I,_,P,$,le){return _=+_,P=P>>>0,le||K(I,_,P,4),a.write(I,_,P,$,23,4),P+4}d.prototype.writeFloatLE=function(_,P,$){return he(this,_,P,!0,$)},d.prototype.writeFloatBE=function(_,P,$){return he(this,_,P,!1,$)};function ne(I,_,P,$,le){return _=+_,P=P>>>0,le||K(I,_,P,8),a.write(I,_,P,$,52,8),P+8}d.prototype.writeDoubleLE=function(_,P,$){return ne(this,_,P,!0,$)},d.prototype.writeDoubleBE=function(_,P,$){return ne(this,_,P,!1,$)},d.prototype.copy=function(_,P,$,le){if(!d.isBuffer(_))throw new TypeError("argument should be a Buffer");if($||($=0),!le&&le!==0&&(le=this.length),P>=_.length&&(P=_.length),P||(P=0),le>0&&le<$&&(le=$),le===$||_.length===0||this.length===0)return 0;if(P<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_.length-P<le-$&&(le=_.length-P+$);var pe=le-$;if(this===_&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(P,$,le);else if(this===_&&$<P&&P<le)for(var ve=pe-1;ve>=0;--ve)_[ve+P]=this[ve+$];else Uint8Array.prototype.set.call(_,this.subarray($,le),P);return pe},d.prototype.fill=function(_,P,$,le){if(typeof _=="string"){if(typeof P=="string"?(le=P,P=0,$=this.length):typeof $=="string"&&(le=$,$=this.length),le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!d.isEncoding(le))throw new TypeError("Unknown encoding: "+le);if(_.length===1){var pe=_.charCodeAt(0);(le==="utf8"&&pe<128||le==="latin1")&&(_=pe)}}else typeof _=="number"&&(_=_&255);if(P<0||this.length<P||this.length<$)throw new RangeError("Out of range index");if($<=P)return this;P=P>>>0,$=$===void 0?this.length:$>>>0,_||(_=0);var ve;if(typeof _=="number")for(ve=P;ve<$;++ve)this[ve]=_;else{var Ge=d.isBuffer(_)?_:d.from(_,le),Ue=Ge.length;if(Ue===0)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(ve=0;ve<$-P;++ve)this[ve+P]=Ge[ve%Ue]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ee(I){if(I=I.split("=")[0],I=I.trim().replace(ie,""),I.length<2)return"";for(;I.length%4!==0;)I=I+"=";return I}function j(I){return I<16?"0"+I.toString(16):I.toString(16)}function M(I,_){_=_||1/0;for(var P,$=I.length,le=null,pe=[],ve=0;ve<$;++ve){if(P=I.charCodeAt(ve),P>55295&&P<57344){if(!le){if(P>56319){(_-=3)>-1&&pe.push(239,191,189);continue}else if(ve+1===$){(_-=3)>-1&&pe.push(239,191,189);continue}le=P;continue}if(P<56320){(_-=3)>-1&&pe.push(239,191,189),le=P;continue}P=(le-55296<<10|P-56320)+65536}else le&&(_-=3)>-1&&pe.push(239,191,189);if(le=null,P<128){if((_-=1)<0)break;pe.push(P)}else if(P<2048){if((_-=2)<0)break;pe.push(P>>6|192,P&63|128)}else if(P<65536){if((_-=3)<0)break;pe.push(P>>12|224,P>>6&63|128,P&63|128)}else if(P<1114112){if((_-=4)<0)break;pe.push(P>>18|240,P>>12&63|128,P>>6&63|128,P&63|128)}else throw new Error("Invalid code point")}return pe}function B(I){for(var _=[],P=0;P<I.length;++P)_.push(I.charCodeAt(P)&255);return _}function X(I,_){for(var P,$,le,pe=[],ve=0;ve<I.length&&!((_-=2)<0);++ve)P=I.charCodeAt(ve),$=P>>8,le=P%256,pe.push(le),pe.push($);return pe}function Z(I){return r.toByteArray(ee(I))}function ue(I,_,P,$){for(var le=0;le<$&&!(le+P>=_.length||le>=I.length);++le)_[le+P]=I[le];return le}function G(I,_){return I instanceof _||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===_.name}function U(I){return I!==I}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,n,s){(function(o){(function(){s.formatArgs=a,s.save=l,s.load=c,s.useColors=r,s.storage=u(),s.destroy=(()=>{let h=!1;return()=>{h||(h=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(h){if(h[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+h[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;h.splice(1,0,f,"color: inherit");let g=0,p=0;h[0].replace(/%[a-zA-Z%]/g,v=>{v!=="%%"&&(g++,v==="%c"&&(p=g))}),h.splice(p,0,f)}s.log=console.debug||console.log||(()=>{});function l(h){try{h?s.storage.setItem("debug",h):s.storage.removeItem("debug")}catch{}}function c(){let h;try{h=s.storage.getItem("debug")}catch{}return!h&&typeof o<"u"&&"env"in o&&(h={}.DEBUG),h}function u(){try{return localStorage}catch{}}n.exports=t("./common")(s);const{formatters:d}=n.exports;d.j=function(h){try{return JSON.stringify(h)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,n,s){function o(r){l.debug=l,l.default=l,l.coerce=g,l.disable=d,l.enable=u,l.enabled=h,l.humanize=t("ms"),l.destroy=p,Object.keys(r).forEach(v=>{l[v]=r[v]}),l.names=[],l.skips=[],l.formatters={};function a(v){let y=0;for(let C=0;C<v.length;C++)y=(y<<5)-y+v.charCodeAt(C),y|=0;return l.colors[Math.abs(y)%l.colors.length]}l.selectColor=a;function l(v){let y,C=null,m,w;function E(...R){if(!E.enabled)return;const O=E,A=Number(new Date),D=A-(y||A);O.diff=D,O.prev=y,O.curr=A,y=A,R[0]=l.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");let L=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(x,T)=>{if(x==="%%")return"%";L++;const H=l.formatters[T];if(typeof H=="function"){const Y=R[L];x=H.call(O,Y),R.splice(L,1),L--}return x}),l.formatArgs.call(O,R),(O.log||l.log).apply(O,R)}return E.namespace=v,E.useColors=l.useColors(),E.color=l.selectColor(v),E.extend=c,E.destroy=l.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>C!==null?C:(m!==l.namespaces&&(m=l.namespaces,w=l.enabled(v)),w),set:R=>{C=R}}),typeof l.init=="function"&&l.init(E),E}function c(v,y){const C=l(this.namespace+(typeof y>"u"?":":y)+v);return C.log=this.log,C}function u(v){l.save(v),l.namespaces=v,l.names=[],l.skips=[];let y;const C=(typeof v=="string"?v:"").split(/[\s,]+/),m=C.length;for(y=0;y<m;y++)C[y]&&(v=C[y].replace(/\*/g,".*?"),v[0]==="-"?l.skips.push(new RegExp("^"+v.substr(1)+"$")):l.names.push(new RegExp("^"+v+"$")))}function d(){const v=[...l.names.map(f),...l.skips.map(f).map(y=>"-"+y)].join(",");return l.enable(""),v}function h(v){if(v[v.length-1]==="*")return!0;let y,C;for(y=0,C=l.skips.length;y<C;y++)if(l.skips[y].test(v))return!1;for(y=0,C=l.names.length;y<C;y++)if(l.names[y].test(v))return!0;return!1}function f(v){return v.toString().substring(2,v.toString().length-2).replace(/\.\*\?$/,"*")}function g(v){return v instanceof Error?v.stack||v.message:v}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return l.enable(l.load()),l}n.exports=o},{ms:45}],20:[function(t,n,s){(function(o,r){(function(){var a=t("readable-stream"),l=t("end-of-stream"),c=t("inherits"),u=t("stream-shift"),d=r.from&&r.from!==Uint8Array.from?r.from([0]):new r([0]),h=function(m,w){m._corked?m.once("uncork",w):w()},f=function(m,w){m._autoDestroy&&m.destroy(w)},g=function(m,w){return function(E){E?f(m,E.message==="premature close"?null:E):w&&!m._ended&&m.end()}},p=function(m,w){if(!m||m._writableState&&m._writableState.finished)return w();if(m._writableState)return m.end(w);m.end(),w()},v=function(){},y=function(m){return new a.Readable({objectMode:!0,highWaterMark:16}).wrap(m)},C=function(m,w,E){if(!(this instanceof C))return new C(m,w,E);a.Duplex.call(this,E),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!E||E.autoDestroy!==!1,this._forwardDestroy=!E||E.destroy!==!1,this._forwardEnd=!E||E.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),w&&this.setReadable(w)};c(C,a.Duplex),C.obj=function(m,w,E){return E||(E={}),E.objectMode=!0,E.highWaterMark=16,new C(m,w,E)},C.prototype.cork=function(){++this._corked===1&&this.emit("cork")},C.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},C.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.end();return}var w=this,E=l(m,{writable:!0,readable:!1},g(this,this._forwardEnd)),R=function(){var A=w._ondrain;w._ondrain=null,A&&A()},O=function(){w._writable.removeListener("drain",R),E()};this._unwrite&&o.nextTick(R),this._writable=m,this._writable.on("drain",R),this._unwrite=O,this.uncork()},C.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.push(null),this.resume();return}var w=this,E=l(m,{writable:!1,readable:!0},g(this)),R=function(){w._forward()},O=function(){w.push(null)},A=function(){w._readable2.removeListener("readable",R),w._readable2.removeListener("end",O),E()};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:y(m),this._readable2.on("readable",R),this._readable2.on("end",O),this._unread=A,this._forward()},C.prototype._read=function(){this._drained=!0,this._forward()},C.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var m;this._drained&&(m=u(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},C.prototype.destroy=function(m,w){if(w||(w=v),this.destroyed)return w(null);this.destroyed=!0;var E=this;o.nextTick(function(){E._destroy(m),w(null)})},C.prototype._destroy=function(m){if(m){var w=this._ondrain;this._ondrain=null,w?w(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},C.prototype._write=function(m,w,E){if(!this.destroyed){if(this._corked)return h(this,this._write.bind(this,m,w,E));if(m===d)return this._finish(E);if(!this._writable)return E();this._writable.write(m)===!1?this._ondrain=E:this.destroyed||E()}},C.prototype._finish=function(m){var w=this;this.emit("preend"),h(this,function(){p(w._forwardEnd&&w._writable,function(){w._writableState.prefinished===!1&&(w._writableState.prefinished=!0),w.emit("prefinish"),h(w,m)})})},C.prototype.end=function(m,w,E){return typeof m=="function"?this.end(null,null,m):typeof w=="function"?this.end(m,null,w):(this._ended=!0,m&&this.write(m),!this._writableState.ending&&!this._writableState.destroyed&&this.write(d),a.Writable.prototype.end.call(this,E))},n.exports=C}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,n,s){(function(o){(function(){var r=t("once"),a=function(){},l=function(d){return d.setHeader&&typeof d.abort=="function"},c=function(d){return d.stdio&&Array.isArray(d.stdio)&&d.stdio.length===3},u=function(d,h,f){if(typeof h=="function")return u(d,null,h);h||(h={}),f=r(f||a);var g=d._writableState,p=d._readableState,v=h.readable||h.readable!==!1&&d.readable,y=h.writable||h.writable!==!1&&d.writable,C=!1,m=function(){d.writable||w()},w=function(){y=!1,v||f.call(d)},E=function(){v=!1,y||f.call(d)},R=function(S){f.call(d,S?new Error("exited with error code: "+S):null)},O=function(S){f.call(d,S)},A=function(){o.nextTick(D)},D=function(){if(!C){if(v&&!(p&&p.ended&&!p.destroyed))return f.call(d,new Error("premature close"));if(y&&!(g&&g.ended&&!g.destroyed))return f.call(d,new Error("premature close"))}},L=function(){d.req.on("finish",w)};return l(d)?(d.on("complete",w),d.on("abort",A),d.req?L():d.on("request",L)):y&&!g&&(d.on("end",m),d.on("close",m)),c(d)&&d.on("exit",R),d.on("end",E),d.on("finish",w),h.error!==!1&&d.on("error",O),d.on("close",A),function(){C=!0,d.removeListener("complete",w),d.removeListener("abort",A),d.removeListener("request",L),d.req&&d.req.removeListener("finish",w),d.removeListener("end",m),d.removeListener("close",m),d.removeListener("finish",w),d.removeListener("exit",R),d.removeListener("end",E),d.removeListener("error",O),d.removeListener("close",A)}};n.exports=u}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,n,s){var o=Object.create||L,r=Object.keys||S,a=Function.prototype.bind||x;function l(){(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events"))&&(this._events=o(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}n.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0;var c=10,u;try{var d={};Object.defineProperty&&Object.defineProperty(d,"x",{value:0}),u=d.x===0}catch{u=!1}u?Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(T){if(typeof T!="number"||T<0||T!==T)throw new TypeError('"defaultMaxListeners" must be a positive number');c=T}}):l.defaultMaxListeners=c,l.prototype.setMaxListeners=function(H){if(typeof H!="number"||H<0||isNaN(H))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=H,this};function h(T){return T._maxListeners===void 0?l.defaultMaxListeners:T._maxListeners}l.prototype.getMaxListeners=function(){return h(this)};function f(T,H,Y){if(H)T.call(Y);else for(var Q=T.length,te=A(T,Q),F=0;F<Q;++F)te[F].call(Y)}function g(T,H,Y,Q){if(H)T.call(Y,Q);else for(var te=T.length,F=A(T,te),k=0;k<te;++k)F[k].call(Y,Q)}function p(T,H,Y,Q,te){if(H)T.call(Y,Q,te);else for(var F=T.length,k=A(T,F),q=0;q<F;++q)k[q].call(Y,Q,te)}function v(T,H,Y,Q,te,F){if(H)T.call(Y,Q,te,F);else for(var k=T.length,q=A(T,k),V=0;V<k;++V)q[V].call(Y,Q,te,F)}function y(T,H,Y,Q){if(H)T.apply(Y,Q);else for(var te=T.length,F=A(T,te),k=0;k<te;++k)F[k].apply(Y,Q)}l.prototype.emit=function(H){var Y,Q,te,F,k,q,V=H==="error";if(q=this._events,q)V=V&&q.error==null;else if(!V)return!1;if(V){if(arguments.length>1&&(Y=arguments[1]),Y instanceof Error)throw Y;var J=new Error('Unhandled "error" event. ('+Y+")");throw J.context=Y,J}if(Q=q[H],!Q)return!1;var ae=typeof Q=="function";switch(te=arguments.length,te){case 1:f(Q,ae,this);break;case 2:g(Q,ae,this,arguments[1]);break;case 3:p(Q,ae,this,arguments[1],arguments[2]);break;case 4:v(Q,ae,this,arguments[1],arguments[2],arguments[3]);break;default:for(F=new Array(te-1),k=1;k<te;k++)F[k-1]=arguments[k];y(Q,ae,this,F)}return!0};function C(T,H,Y,Q){var te,F,k;if(typeof Y!="function")throw new TypeError('"listener" argument must be a function');if(F=T._events,F?(F.newListener&&(T.emit("newListener",H,Y.listener?Y.listener:Y),F=T._events),k=F[H]):(F=T._events=o(null),T._eventsCount=0),!k)k=F[H]=Y,++T._eventsCount;else if(typeof k=="function"?k=F[H]=Q?[Y,k]:[k,Y]:Q?k.unshift(Y):k.push(Y),!k.warned&&(te=h(T),te&&te>0&&k.length>te)){k.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+k.length+' "'+String(H)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');q.name="MaxListenersExceededWarning",q.emitter=T,q.type=H,q.count=k.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",q.name,q.message)}return T}l.prototype.addListener=function(H,Y){return C(this,H,Y,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(H,Y){return C(this,H,Y,!0)};function m(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var T=new Array(arguments.length),H=0;H<T.length;++H)T[H]=arguments[H];this.listener.apply(this.target,T)}}function w(T,H,Y){var Q={fired:!1,wrapFn:void 0,target:T,type:H,listener:Y},te=a.call(m,Q);return te.listener=Y,Q.wrapFn=te,te}l.prototype.once=function(H,Y){if(typeof Y!="function")throw new TypeError('"listener" argument must be a function');return this.on(H,w(this,H,Y)),this},l.prototype.prependOnceListener=function(H,Y){if(typeof Y!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(H,w(this,H,Y)),this},l.prototype.removeListener=function(H,Y){var Q,te,F,k,q;if(typeof Y!="function")throw new TypeError('"listener" argument must be a function');if(te=this._events,!te)return this;if(Q=te[H],!Q)return this;if(Q===Y||Q.listener===Y)--this._eventsCount===0?this._events=o(null):(delete te[H],te.removeListener&&this.emit("removeListener",H,Q.listener||Y));else if(typeof Q!="function"){for(F=-1,k=Q.length-1;k>=0;k--)if(Q[k]===Y||Q[k].listener===Y){q=Q[k].listener,F=k;break}if(F<0)return this;F===0?Q.shift():O(Q,F),Q.length===1&&(te[H]=Q[0]),te.removeListener&&this.emit("removeListener",H,q||Y)}return this},l.prototype.removeAllListeners=function(H){var Y,Q,te;if(Q=this._events,!Q)return this;if(!Q.removeListener)return arguments.length===0?(this._events=o(null),this._eventsCount=0):Q[H]&&(--this._eventsCount===0?this._events=o(null):delete Q[H]),this;if(arguments.length===0){var F=r(Q),k;for(te=0;te<F.length;++te)k=F[te],k!=="removeListener"&&this.removeAllListeners(k);return this.removeAllListeners("removeListener"),this._events=o(null),this._eventsCount=0,this}if(Y=Q[H],typeof Y=="function")this.removeListener(H,Y);else if(Y)for(te=Y.length-1;te>=0;te--)this.removeListener(H,Y[te]);return this};function E(T,H,Y){var Q=T._events;if(!Q)return[];var te=Q[H];return te?typeof te=="function"?Y?[te.listener||te]:[te]:Y?D(te):A(te,te.length):[]}l.prototype.listeners=function(H){return E(this,H,!0)},l.prototype.rawListeners=function(H){return E(this,H,!1)},l.listenerCount=function(T,H){return typeof T.listenerCount=="function"?T.listenerCount(H):R.call(T,H)},l.prototype.listenerCount=R;function R(T){var H=this._events;if(H){var Y=H[T];if(typeof Y=="function")return 1;if(Y)return Y.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function O(T,H){for(var Y=H,Q=Y+1,te=T.length;Q<te;Y+=1,Q+=1)T[Y]=T[Q];T.pop()}function A(T,H){for(var Y=new Array(H),Q=0;Q<H;++Q)Y[Q]=T[Q];return Y}function D(T){for(var H=new Array(T.length),Y=0;Y<H.length;++Y)H[Y]=T[Y].listener||T[Y];return H}function L(T){var H=function(){};return H.prototype=T,new H}function S(T){for(var H in T)Object.prototype.hasOwnProperty.call(T,H);return H}function x(T){var H=this;return function(){return H.apply(T,arguments)}}},{}],23:[function(t,n,s){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */s.read=function(o,r,a,l,c){var u,d,h=c*8-l-1,f=(1<<h)-1,g=f>>1,p=-7,v=a?c-1:0,y=a?-1:1,C=o[r+v];for(v+=y,u=C&(1<<-p)-1,C>>=-p,p+=h;p>0;u=u*256+o[r+v],v+=y,p-=8);for(d=u&(1<<-p)-1,u>>=-p,p+=l;p>0;d=d*256+o[r+v],v+=y,p-=8);if(u===0)u=1-g;else{if(u===f)return d?NaN:(C?-1:1)*(1/0);d=d+Math.pow(2,l),u=u-g}return(C?-1:1)*d*Math.pow(2,u-l)},s.write=function(o,r,a,l,c,u){var d,h,f,g=u*8-c-1,p=(1<<g)-1,v=p>>1,y=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=l?0:u-1,m=l?1:-1,w=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,d=p):(d=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+v>=1?r+=y/f:r+=y*Math.pow(2,1-v),r*f>=2&&(d++,f/=2),d+v>=p?(h=0,d=p):d+v>=1?(h=(r*f-1)*Math.pow(2,c),d=d+v):(h=r*Math.pow(2,v-1)*Math.pow(2,c),d=0));c>=8;o[a+C]=h&255,C+=m,h/=256,c-=8);for(d=d<<c|h,g+=c;g>0;o[a+C]=d&255,C+=m,d/=256,g-=8);o[a+C-m]|=w*128}},{}],24:[function(t,n,s){typeof Object.create=="function"?n.exports=function(r,a){a&&(r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(r,a){if(a){r.super_=a;var l=function(){};l.prototype=a.prototype,r.prototype=new l,r.prototype.constructor=r}}},{}],25:[function(t,n,s){Object.defineProperty(s,"__esModule",{value:!0});var o=function(){function r(a,l){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=a,this.value=l}return r.prototype.rotateLeft=function(){var a=this.parent,l=this.brother,c=this.leftChild,u=this.rightChild;if(!u)throw new Error("unknown error");var d=u.leftChild,h=u.rightChild;return a&&(a.leftChild===this?a.leftChild=u:a.rightChild===this&&(a.rightChild=u)),u.parent=a,u.brother=l,u.leftChild=this,u.rightChild=h,l&&(l.brother=u),this.parent=u,this.brother=h,this.leftChild=c,this.rightChild=d,h&&(h.parent=u,h.brother=this),c&&(c.parent=this,c.brother=d),d&&(d.parent=this,d.brother=c),u},r.prototype.rotateRight=function(){var a=this.parent,l=this.brother,c=this.leftChild;if(!c)throw new Error("unknown error");var u=this.rightChild,d=c.leftChild,h=c.rightChild;return a&&(a.leftChild===this?a.leftChild=c:a.rightChild===this&&(a.rightChild=c)),c.parent=a,c.brother=l,c.leftChild=d,c.rightChild=this,l&&(l.brother=c),d&&(d.parent=c,d.brother=this),this.parent=c,this.brother=d,this.leftChild=h,this.rightChild=u,h&&(h.parent=this,h.brother=u),u&&(u.parent=this,u.brother=h),c},r.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},r.TreeNodeColorType={red:!0,black:!1},r}();Object.freeze(o),s.default=o},{}],26:[function(t,n,s){var o=this&&this.__generator||function(a,l){var c={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},u,d,h,f;return f={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function g(v){return function(y){return p([v,y])}}function p(v){if(u)throw new TypeError("Generator is already executing.");for(;c;)try{if(u=1,d&&(h=v[0]&2?d.return:v[0]?d.throw||((h=d.return)&&h.call(d),0):d.next)&&!(h=h.call(d,v[1])).done)return h;switch(d=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return c.label++,{value:v[1],done:!1};case 5:c.label++,d=v[1],v=[0];continue;case 7:v=c.ops.pop(),c.trys.pop();continue;default:if(h=c.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){c=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){c.label=v[1];break}if(v[0]===6&&c.label<h[1]){c.label=h[1],h=v;break}if(h&&c.label<h[2]){c.label=h[2],c.ops.push(v);break}h[2]&&c.ops.pop(),c.trys.pop();continue}v=l.call(a,c)}catch(y){v=[6,y],d=0}finally{u=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(s,"__esModule",{value:!0}),r.sigma=3,r.bucketSize=5e3;function r(a){var l=this;a===void 0&&(a=[]);var c=[],u=0,d=0,h=0,f=0,g=0,p=0;this.size=function(){return p},this.empty=function(){return p===0},this.clear=function(){u=h=d=f=g=p=0,y.call(this,r.bucketSize),p=0},this.front=function(){return c[u][d]},this.back=function(){return c[h][f]},this.forEach=function(C){if(!this.empty()){var m=0;if(u===h){for(var w=d;w<=f;++w)C(c[u][w],m++);return}for(var w=d;w<r.bucketSize;++w)C(c[u][w],m++);for(var w=u+1;w<h;++w)for(var E=0;E<r.bucketSize;++E)C(c[w][E],m++);for(var w=0;w<=f;++w)C(c[h][w],m++)}};var v=function(C){var m=u*r.bucketSize+d,w=m+C,E=h*r.bucketSize+f;if(w<m||w>E)throw new Error("pos should more than 0 and less than queue's size");var R=Math.floor(w/r.bucketSize),O=w%r.bucketSize;return{curNodeBucketIndex:R,curNodePointerIndex:O}};this.getElementByPos=function(C){var m=v(C),w=m.curNodeBucketIndex,E=m.curNodePointerIndex;return c[w][E]},this.eraseElementByPos=function(C){var m=this;if(C<0||C>p)throw new Error("pos should more than 0 and less than queue's size");if(C===0)this.popFront();else if(C===this.size())this.popBack();else{for(var w=[],E=C+1;E<p;++E)w.push(this.getElementByPos(E));this.cut(C),this.popBack(),w.forEach(function(R){return m.pushBack(R)})}},this.eraseElementByValue=function(C){if(!this.empty()){var m=[];this.forEach(function(R){R!==C&&m.push(R)});for(var w=m.length,E=0;E<w;++E)this.setElementByPos(E,m[E]);this.cut(w-1)}};var y=function(C){for(var m=[],w=C*r.sigma,E=Math.max(Math.ceil(w/r.bucketSize),2),R=0;R<E;++R)m.push(new Array(r.bucketSize));var O=Math.ceil(C/r.bucketSize),A=Math.floor(E/2)-Math.floor(O/2),D=A,L=0;if(this.size())for(var R=0;R<O;++R){for(var S=0;S<r.bucketSize;++S)if(m[A+R][S]=this.front(),this.popFront(),this.empty()){D=A+R,L=S;break}if(this.empty())break}c=m,u=A,d=0,h=D,f=L,g=E,p=C};this.pushBack=function(C){this.empty()||(h===g-1&&f===r.bucketSize-1&&y.call(this,this.size()),f<r.bucketSize-1?++f:h<g-1&&(++h,f=0)),++p,c[h][f]=C},this.popBack=function(){this.empty()||(this.size()!==1&&(f>0?--f:u<h&&(--h,f=r.bucketSize-1)),p>0&&--p)},this.setElementByPos=function(C,m){var w=v(C),E=w.curNodeBucketIndex,R=w.curNodePointerIndex;c[E][R]=m},this.insert=function(C,m,w){var E=this;if(w===void 0&&(w=1),C===0)for(;w--;)this.pushFront(m);else if(C===this.size())for(;w--;)this.pushBack(m);else{for(var R=[],O=C;O<p;++O)R.push(this.getElementByPos(O));this.cut(C-1);for(var O=0;O<w;++O)this.pushBack(m);R.forEach(function(A){return E.pushBack(A)})}},this.find=function(C){if(u===h){for(var m=d;m<=f;++m)if(c[u][m]===C)return!0;return!1}for(var m=d;m<r.bucketSize;++m)if(c[u][m]===C)return!0;for(var m=u+1;m<h;++m)for(var w=0;w<r.bucketSize;++w)if(c[m][w]===C)return!0;for(var m=0;m<=f;++m)if(c[h][m]===C)return!0;return!1},this.reverse=function(){for(var C=0,m=p-1;C<m;){var w=this.getElementByPos(C);this.setElementByPos(C,this.getElementByPos(m)),this.setElementByPos(m,w),++C,--m}},this.unique=function(){if(!this.empty()){var C=[],m=this.front();this.forEach(function(E,R){(R===0||E!==m)&&(C.push(E),m=E)});for(var w=0;w<p;++w)this.setElementByPos(w,C[w]);this.cut(C.length-1)}},this.sort=function(C){var m=[];this.forEach(function(E){m.push(E)}),m.sort(C);for(var w=0;w<p;++w)this.setElementByPos(w,m[w])},this.pushFront=function(C){this.empty()||(u===0&&d===0&&y.call(this,this.size()),d>0?--d:u>0&&(--u,d=r.bucketSize-1)),++p,c[u][d]=C},this.popFront=function(){this.empty()||(this.size()!==1&&(d<r.bucketSize-1?++d:u<h&&(++u,d=0)),p>0&&--p)},this.shrinkToFit=function(){var C=this,m=[];this.forEach(function(O){m.push(O)});var w=m.length;c=[];for(var E=Math.ceil(w/r.bucketSize),R=0;R<E;++R)c.push(new Array(r.bucketSize));this.clear(),m.forEach(function(O){return C.pushBack(O)})},this.cut=function(C){if(C<0){this.clear();return}var m=v(C),w=m.curNodeBucketIndex,E=m.curNodePointerIndex;h=w,f=E,p=C+1},this[Symbol.iterator]=function(){return function(){var m,m,m,C,m;return o(this,function(w){switch(w.label){case 0:if(p===0)return[2];if(u!==h)return[3,5];m=d,w.label=1;case 1:return m<=f?[4,c[u][m]]:[3,4];case 2:w.sent(),w.label=3;case 3:return++m,[3,1];case 4:return[2];case 5:m=d,w.label=6;case 6:return m<r.bucketSize?[4,c[u][m]]:[3,9];case 7:w.sent(),w.label=8;case 8:return++m,[3,6];case 9:m=u+1,w.label=10;case 10:if(!(m<h))return[3,15];C=0,w.label=11;case 11:return C<r.bucketSize?[4,c[m][C]]:[3,14];case 12:w.sent(),w.label=13;case 13:return++C,[3,11];case 14:return++m,[3,10];case 15:m=0,w.label=16;case 16:return m<=f?[4,c[h][m]]:[3,19];case 17:w.sent(),w.label=18;case 18:return++m,[3,16];case 19:return[2]}})}()},function(){var C=r.bucketSize;a.size?C=a.size():a.length&&(C=a.length);var m=C*r.sigma;g=Math.ceil(m/r.bucketSize),g=Math.max(g,3);for(var w=0;w<g;++w)c.push(new Array(r.bucketSize));var E=Math.ceil(C/r.bucketSize);u=Math.floor(g/2)-Math.floor(E/2),h=u,a.forEach(function(R){return l.pushBack(R)})}(),Object.freeze(this)}Object.freeze(r),s.default=r},{}],27:[function(t,n,s){var o=this&&this.__generator||function(u,d){var h={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,g,p,v;return v={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(m){return function(w){return C([m,w])}}function C(m){if(f)throw new TypeError("Generator is already executing.");for(;h;)try{if(f=1,g&&(p=m[0]&2?g.return:m[0]?g.throw||((p=g.return)&&p.call(g),0):g.next)&&!(p=p.call(g,m[1])).done)return p;switch(g=0,p&&(m=[m[0]&2,p.value]),m[0]){case 0:case 1:p=m;break;case 4:return h.label++,{value:m[1],done:!1};case 5:h.label++,g=m[1],m=[0];continue;case 7:m=h.ops.pop(),h.trys.pop();continue;default:if(p=h.trys,!(p=p.length>0&&p[p.length-1])&&(m[0]===6||m[0]===2)){h=0;continue}if(m[0]===3&&(!p||m[1]>p[0]&&m[1]<p[3])){h.label=m[1];break}if(m[0]===6&&h.label<p[1]){h.label=p[1],p=m;break}if(p&&h.label<p[2]){h.label=p[2],h.ops.push(m);break}p[2]&&h.ops.pop(),h.trys.pop();continue}m=d.call(u,h)}catch(w){m=[6,w],g=0}finally{f=p=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},r=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&u[d],f=0;if(h)return h.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&f>=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0});var a=t("../LinkList/LinkList"),l=t("../Map/Map");c.initSize=16,c.maxSize=1<<30,c.sigma=.75,c.treeifyThreshold=8,c.untreeifyThreshold=6,c.minTreeifySize=64;function c(u,d,h){var f=this;if(u===void 0&&(u=[]),d===void 0&&(d=c.initSize),h=h||function(C){var m,w,E=0,R="";if(typeof C=="number")E=Math.floor(C),E=(E<<5)-E,E=E&E;else{typeof C!="string"?R=JSON.stringify(C):R=C;try{for(var O=r(R),A=O.next();!A.done;A=O.next()){var D=A.value,L=D.charCodeAt(0);E=(E<<5)-E+L,E=E&E}}catch(S){m={error:S}}finally{try{A&&!A.done&&(w=O.return)&&w.call(O)}finally{if(m)throw m.error}}}return E^=E>>>16,E},d&d-1)throw new Error("initBucketNum must be 2 to the power of n");var g=0,p=[],v=Math.max(c.initSize,Math.min(c.maxSize,d));this.size=function(){return g},this.empty=function(){return g===0},this.clear=function(){g=0,v=d,p=[]},this.forEach=function(C){var m=0;p.forEach(function(w){w.forEach(function(E){C(E,m++)})})};var y=function(C){if(!(C>=c.maxSize)){v=C*2;var m=[];p.forEach(function(w,E){if(!w.empty()){if(w instanceof a.default&&w.size()===1){var R=w.front(),O=R.key,A=R.value;m[h(O)&v-1]=new a.default([{key:O,value:A}])}else if(w instanceof l.default){var D=new a.default,L=new a.default;w.forEach(function(T){var H=h(T.key);H&C?L.pushBack(T):D.pushBack(T)}),D.size()>c.untreeifyThreshold?m[E]=new l.default(D):D.size()&&(m[E]=D),L.size()>c.untreeifyThreshold?m[E+C]=new l.default(L):L.size()&&(m[E+C]=L)}else{var S=new a.default,x=new a.default;w.forEach(function(T){var H=h(T.key);H&C?x.pushBack(T):S.pushBack(T)}),S.size()&&(m[E]=S),x.size()&&(m[E+C]=x)}p[E].clear()}}),p=m}};this.setElement=function(C,m){var w,E;if(C==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(m==null){this.eraseElementByKey(C);return}var R=h(C)&v-1;if(!p[R])++g,p[R]=new a.default([{key:C,value:m}]);else{var O=p[R].size();if(p[R]instanceof a.default){try{for(var A=r(p[R]),D=A.next();!D.done;D=A.next()){var L=D.value;if(L.key===C){L.value=m;return}}}catch(x){w={error:x}}finally{try{D&&!D.done&&(E=A.return)&&E.call(A)}finally{if(w)throw w.error}}p[R].pushBack({key:C,value:m}),p[R].size()>=c.treeifyThreshold&&(p[R]=new l.default(p[R]))}else p[R].setElement(C,m);var S=p[R].size();g+=S-O}g>v*c.sigma&&y.call(this,v)},this.getElementByKey=function(C){var m,w,E=h(C)&v-1;if(p[E]){if(p[E]instanceof l.default)return p[E].getElementByKey(C);try{for(var R=r(p[E]),O=R.next();!O.done;O=R.next()){var A=O.value;if(A.key===C)return A.value}}catch(D){m={error:D}}finally{try{O&&!O.done&&(w=R.return)&&w.call(R)}finally{if(m)throw m.error}}}},this.eraseElementByKey=function(C){var m,w,E=h(C)&v-1;if(p[E]){var R=p[E].size();if(p[E]instanceof l.default)p[E].eraseElementByKey(C),p[E].size()<=c.untreeifyThreshold&&(p[E]=new a.default(p[E]));else{var O=-1;try{for(var A=r(p[E]),D=A.next();!D.done;D=A.next()){var L=D.value;if(++O,L.key===C){p[E].eraseElementByPos(O);break}}}catch(x){m={error:x}}finally{try{D&&!D.done&&(w=A.return)&&w.call(A)}finally{if(m)throw m.error}}}var S=p[E].size();g+=S-R}},this.find=function(C){var m,w,E=h(C)&v-1;if(!p[E])return!1;if(p[E]instanceof l.default)return p[E].find(C);try{for(var R=r(p[E]),O=R.next();!O.done;O=R.next()){var A=O.value;if(A.key===C)return!0}}catch(D){m={error:D}}finally{try{O&&!O.done&&(w=R.return)&&w.call(R)}finally{if(m)throw m.error}}return!1},this[Symbol.iterator]=function(){return function(){var C,m,w,E,R,O,A;return o(this,function(D){switch(D.label){case 0:C=0,D.label=1;case 1:if(!(C<v))return[3,10];for(;C<v&&!p[C];)++C;if(C>=v)return[3,10];D.label=2;case 2:D.trys.push([2,7,8,9]),m=(O=void 0,r(p[C])),w=m.next(),D.label=3;case 3:return w.done?[3,6]:(E=w.value,[4,E]);case 4:D.sent(),D.label=5;case 5:return w=m.next(),[3,3];case 6:return[3,9];case 7:return R=D.sent(),O={error:R},[3,9];case 8:try{w&&!w.done&&(A=m.return)&&A.call(m)}finally{if(O)throw O.error}return[7];case 9:return++C,[3,1];case 10:return[2]}})}()},u.forEach(function(C){var m=C.key,w=C.value;return f.setElement(m,w)}),Object.freeze(this)}Object.freeze(c),s.default=c},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(t,n,s){var o=this&&this.__generator||function(u,d){var h={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,g,p,v;return v={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(m){return function(w){return C([m,w])}}function C(m){if(f)throw new TypeError("Generator is already executing.");for(;h;)try{if(f=1,g&&(p=m[0]&2?g.return:m[0]?g.throw||((p=g.return)&&p.call(g),0):g.next)&&!(p=p.call(g,m[1])).done)return p;switch(g=0,p&&(m=[m[0]&2,p.value]),m[0]){case 0:case 1:p=m;break;case 4:return h.label++,{value:m[1],done:!1};case 5:h.label++,g=m[1],m=[0];continue;case 7:m=h.ops.pop(),h.trys.pop();continue;default:if(p=h.trys,!(p=p.length>0&&p[p.length-1])&&(m[0]===6||m[0]===2)){h=0;continue}if(m[0]===3&&(!p||m[1]>p[0]&&m[1]<p[3])){h.label=m[1];break}if(m[0]===6&&h.label<p[1]){h.label=p[1],p=m;break}if(p&&h.label<p[2]){h.label=p[2],h.ops.push(m);break}p[2]&&h.ops.pop(),h.trys.pop();continue}m=d.call(u,h)}catch(w){m=[6,w],g=0}finally{f=p=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},r=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&u[d],f=0;if(h)return h.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&f>=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0});var a=t("../Set/Set"),l=t("../LinkList/LinkList");c.initSize=16,c.maxSize=1<<30,c.sigma=.75,c.treeifyThreshold=8,c.untreeifyThreshold=6,c.minTreeifySize=64;function c(u,d,h){var f=this;if(u===void 0&&(u=[]),d===void 0&&(d=c.initSize),h=h||function(C){var m=0,w="";if(typeof C=="number")m=Math.floor(C),m=(m<<5)-m,m=m&m;else{typeof C!="string"?w=JSON.stringify(C):w=C;for(var E=0;E<w.length;E++){var R=w.charCodeAt(E);m=(m<<5)-m+R,m=m&m}}return m^=m>>>16,m},d&d-1)throw new Error("initBucketNum must be 2 to the power of n");var g=0,p=[],v=Math.max(c.initSize,Math.min(c.maxSize,d));this.size=function(){return g},this.empty=function(){return g===0},this.clear=function(){g=0,v=d,p=[]},this.forEach=function(C){var m=0;p.forEach(function(w){w.forEach(function(E){C(E,m++)})})};var y=function(C){if(!(C>=c.maxSize)){v=C*2;var m=[];p.forEach(function(w,E){if(!w.empty()){if(w instanceof l.default&&w.size()===1){var R=w.front();if(R===void 0)throw new Error("unknown error");m[h(R)&v-1]=new l.default([R])}else if(w instanceof a.default){var O=new l.default,A=new l.default;w.forEach(function(S){var x=h(S);x&C?A.pushBack(S):O.pushBack(S)}),O.size()>c.untreeifyThreshold?m[E]=new a.default(O):O.size()&&(m[E]=O),A.size()>c.untreeifyThreshold?m[E+C]=new a.default(A):A.size()&&(m[E+C]=A)}else{var D=new l.default,L=new l.default;w.forEach(function(S){var x=h(S);x&C?L.pushBack(S):D.pushBack(S)}),D.size()&&(m[E]=D),L.size()&&(m[E+C]=L)}p[E].clear()}}),p=m}};this.insert=function(C){if(C==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var m=h(C)&v-1;if(!p[m])p[m]=new l.default([C]),++g;else{var w=p[m].size();if(p[m]instanceof l.default){if(p[m].find(C))return;p[m].pushBack(C),p[m].size()>=c.treeifyThreshold&&(p[m]=new a.default(p[m]))}else p[m].insert(C);var E=p[m].size();g+=E-w}g>v*c.sigma&&y.call(this,v)},this.eraseElementByValue=function(C){var m=h(C)&v-1;if(p[m]){var w=p[m].size();p[m].eraseElementByValue(C),p[m]instanceof a.default&&p[m].size()<=c.untreeifyThreshold&&(p[m]=new l.default(p[m]));var E=p[m].size();g+=E-w}},this.find=function(C){var m=h(C)&v-1;return p[m]?p[m].find(C):!1},this[Symbol.iterator]=function(){return function(){var C,m,w,E,R,O,A;return o(this,function(D){switch(D.label){case 0:C=0,D.label=1;case 1:if(!(C<v))return[3,10];for(;C<v&&!p[C];)++C;if(C>=v)return[3,10];D.label=2;case 2:D.trys.push([2,7,8,9]),m=(O=void 0,r(p[C])),w=m.next(),D.label=3;case 3:return w.done?[3,6]:(E=w.value,[4,E]);case 4:D.sent(),D.label=5;case 5:return w=m.next(),[3,3];case 6:return[3,9];case 7:return R=D.sent(),O={error:R},[3,9];case 8:try{w&&!w.done&&(A=m.return)&&A.call(m)}finally{if(O)throw O.error}return[7];case 9:return++C,[3,1];case 10:return[2]}})}()},u.forEach(function(C){return f.insert(C)}),Object.freeze(this)}Object.freeze(c),s.default=c},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(t,n,s){var o=this&&this.__generator||function(l,c){var u={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},d,h,f,g;return g={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function p(y){return function(C){return v([y,C])}}function v(y){if(d)throw new TypeError("Generator is already executing.");for(;u;)try{if(d=1,h&&(f=y[0]&2?h.return:y[0]?h.throw||((f=h.return)&&f.call(h),0):h.next)&&!(f=f.call(h,y[1])).done)return f;switch(h=0,f&&(y=[y[0]&2,f.value]),y[0]){case 0:case 1:f=y;break;case 4:return u.label++,{value:y[1],done:!1};case 5:u.label++,h=y[1],y=[0];continue;case 7:y=u.ops.pop(),u.trys.pop();continue;default:if(f=u.trys,!(f=f.length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){u=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){u.label=y[1];break}if(y[0]===6&&u.label<f[1]){u.label=f[1],f=y;break}if(f&&u.label<f[2]){u.label=f[2],u.ops.push(y);break}f[2]&&u.ops.pop(),u.trys.pop();continue}y=c.call(l,u)}catch(C){y=[6,C],h=0}finally{d=f=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}};Object.defineProperty(s,"__esModule",{value:!0});var r=function(){function l(c){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=c}return l}();function a(l){var c=this;l===void 0&&(l=[]);var u=0,d=void 0,h=void 0;this.size=function(){return u},this.empty=function(){return u===0},this.clear=function(){d=h=void 0,u=0},this.front=function(){return d==null?void 0:d.value},this.back=function(){return h==null?void 0:h.value},this.forEach=function(f){for(var g=d,p=0;g;){if(g.value===void 0)throw new Error("unknown error");f(g.value,p++),g=g.next}},this.getElementByPos=function(f){if(f<0||f>=u)throw new Error("pos must more then 0 and less then the list length");for(var g=d;f--&&g;)g=g.next;if(!g||g.value===void 0)throw new Error("unknown error");return g.value},this.eraseElementByPos=function(f){if(f<0||f>=u)throw new Error("erase pos must more then 0 and less then the list length");if(f===0)this.popFront();else if(f===u-1)this.popBack();else{for(var g=d;f--;){if(!(g!=null&&g.next))throw new Error("unknown error");g=g.next}if(!g||!g.pre||!g.next)throw new Error("unknown error");var p=g.pre,v=g.next;v.pre=p,p.next=v,u>0&&--u}},this.eraseElementByValue=function(f){for(;d&&d.value===f;)this.popFront();for(;h&&h.value===f;)this.popBack();if(d)for(var g=d;g;){if(g.value===f){var p=g.pre,v=g.next;v&&(v.pre=p),p&&(p.next=v),u>0&&--u}g=g.next}},this.pushBack=function(f){if(f==null)throw new Error("you can't push null or undefined here");++u;var g=new r(f);h?(h.next=g,g.pre=h,h=g):d=h=g},this.popBack=function(){h&&(u>0&&--u,h&&(d===h?d=h=void 0:(h=h.pre,h&&(h.next=void 0))))},this.setElementByPos=function(f,g){if(g==null)throw new Error("you can't set null or undefined here");if(f<0||f>=u)throw new Error("pos must more then 0 and less then the list length");for(var p=d;f--;){if(!p)throw new Error("unknown error");p=p.next}p&&(p.value=g)},this.insert=function(f,g,p){if(p===void 0&&(p=1),g==null)throw new Error("you can't insert null or undefined here");if(f<0||f>u)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(p<0)throw new Error("insert size must more than 0");if(f===0)for(;p--;)this.pushFront(g);else if(f===u)for(;p--;)this.pushBack(g);else{for(var v=d,y=1;y<f;++y){if(!(v!=null&&v.next))throw new Error("unknown error");v=v==null?void 0:v.next}if(!v)throw new Error("unknown error");var C=v.next;for(u+=p;p--;)v.next=new r(g),v.next.pre=v,v=v.next;v.next=C,C&&(C.pre=v)}},this.find=function(f){for(var g=d;g;){if(g.value===f)return!0;g=g.next}return!1},this.reverse=function(){for(var f=d,g=h,p=0;f&&g&&p*2<u;){var v=f.value;f.value=g.value,g.value=v,f=f.next,g=g.pre,++p}},this.unique=function(){for(var f=d;f;){for(var g=f;g&&g.next&&g.value===g.next.value;)g=g.next,u>0&&--u;f.next=g.next,f.next&&(f.next.pre=f),f=f.next}},this.sort=function(f){var g=[];this.forEach(function(v){g.push(v)}),g.sort(f);var p=d;g.forEach(function(v){p&&(p.value=v,p=p.next)})},this.pushFront=function(f){if(f==null)throw new Error("you can't push null or undefined here");++u;var g=new r(f);d?(g.next=d,d.pre=g,d=g):d=h=g},this.popFront=function(){d&&(u>0&&--u,d&&(d===h?d=h=void 0:(d=d.next,d&&(d.pre=void 0))))},this.merge=function(f){var g=this,p=d;f.forEach(function(v){for(;p&&p.value!==void 0&&p.value<=v;)p=p.next;if(p===void 0)g.pushBack(v),p=h;else if(p===d)g.pushFront(v),p=d;else{++u;var y=p.pre;y&&(y.next=new r(v),y.next.pre=y,y.next.next=p,p&&(p.pre=y.next))}})},this[Symbol.iterator]=function(){return function(){var f;return o(this,function(g){switch(g.label){case 0:f=d,g.label=1;case 1:if(f===void 0)return[3,3];if(!f.value)throw new Error("unknown error");return[4,f.value];case 2:return g.sent(),f=f.next,[3,1];case 3:return[2]}})}()},l.forEach(function(f){return c.pushBack(f)}),Object.freeze(this)}Object.freeze(a),s.default=a},{}],30:[function(t,n,s){var o=this&&this.__generator||function(c,u){var d={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,f,g,p;return p={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function v(C){return function(m){return y([C,m])}}function y(C){if(h)throw new TypeError("Generator is already executing.");for(;d;)try{if(h=1,f&&(g=C[0]&2?f.return:C[0]?f.throw||((g=f.return)&&g.call(f),0):f.next)&&!(g=g.call(f,C[1])).done)return g;switch(f=0,g&&(C=[C[0]&2,g.value]),C[0]){case 0:case 1:g=C;break;case 4:return d.label++,{value:C[1],done:!1};case 5:d.label++,f=C[1],C=[0];continue;case 7:C=d.ops.pop(),d.trys.pop();continue;default:if(g=d.trys,!(g=g.length>0&&g[g.length-1])&&(C[0]===6||C[0]===2)){d=0;continue}if(C[0]===3&&(!g||C[1]>g[0]&&C[1]<g[3])){d.label=C[1];break}if(C[0]===6&&d.label<g[1]){d.label=g[1],g=C;break}if(g&&d.label<g[2]){d.label=g[2],d.ops.push(C);break}g[2]&&d.ops.pop(),d.trys.pop();continue}C=u.call(c,d)}catch(m){C=[6,m],f=0}finally{h=g=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}},r=this&&this.__values||function(c){var u=typeof Symbol=="function"&&Symbol.iterator,d=u&&c[u],h=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&h>=c.length&&(c=void 0),{value:c&&c[h++],done:!c}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0});var a=t("../Base/TreeNode");function l(c,u){var d=this;c===void 0&&(c=[]),u=u||function(S,x){return S<x?-1:S>x?1:0};var h=0,f=new a.default;f.color=a.default.TreeNodeColorType.black,this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,f.key=f.value=void 0,f.leftChild=f.rightChild=f.brother=void 0};var g=function(S){if(!S||S.key===void 0)throw new Error("unknown error");return S.leftChild?g(S.leftChild):S},p=function(S){if(!S||S.key===void 0)throw new Error("unknown error");return S.rightChild?p(S.rightChild):S};this.front=function(){if(!this.empty()){var S=g(f);if(S.key===void 0||S.value===void 0)throw new Error("unknown error");return{key:S.key,value:S.value}}},this.back=function(){if(!this.empty()){var S=p(f);if(S.key===void 0||S.value===void 0)throw new Error("unknown error");return{key:S.key,value:S.value}}},this.forEach=function(S){var x,T,H=0;try{for(var Y=r(this),Q=Y.next();!Q.done;Q=Y.next()){var te=Q.value;S(te,H++)}}catch(F){x={error:F}}finally{try{Q&&!Q.done&&(T=Y.return)&&T.call(Y)}finally{if(x)throw x.error}}},this.getElementByPos=function(S){var x,T;if(S<0||S>=this.size())throw new Error("pos must more than 0 and less than set's size");var H=0;try{for(var Y=r(this),Q=Y.next();!Q.done;Q=Y.next()){var te=Q.value;if(H===S)return te;++H}}catch(F){x={error:F}}finally{try{Q&&!Q.done&&(T=Y.return)&&T.call(Y)}finally{if(x)throw x.error}}throw new Error("unknown Error")};var v=function(S,x){if(!(!S||S.key===void 0||S.value===void 0)){var T=u(S.key,x);return T===0?{key:S.key,value:S.value}:T<0?v(S.rightChild,x):v(S.leftChild,x)||{key:S.key,value:S.value}}};this.lowerBound=function(S){return v(f,S)};var y=function(S,x){if(!(!S||S.key===void 0||S.value===void 0)){var T=u(S.key,x);return T<=0?y(S.rightChild,x):y(S.leftChild,x)||{key:S.key,value:S.value}}};this.upperBound=function(S){return y(f,S)};var C=function(S,x){if(!(!S||S.key===void 0||S.value===void 0)){var T=u(S.key,x);return T===0?{key:S.key,value:S.value}:T>0?C(S.leftChild,x):C(S.rightChild,x)||{key:S.key,value:S.value}}};this.reverseLowerBound=function(S){return C(f,S)};var m=function(S,x){if(!(!S||S.key===void 0||S.value===void 0)){var T=u(S.key,x);return T>=0?m(S.leftChild,x):m(S.rightChild,x)||{key:S.key,value:S.value}}};this.reverseUpperBound=function(S){return m(f,S)};var w=function(S){var x=S.parent;if(!x){if(S===f)return;throw new Error("unknown error")}if(S.color===a.default.TreeNodeColorType.red){S.color=a.default.TreeNodeColorType.black;return}var T=S.brother;if(!T)throw new Error("unknown error");if(S===x.leftChild){if(T.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.black,x.color=a.default.TreeNodeColorType.red;var H=x.rotateLeft();f===x&&(f=H),w(S)}else if(T.color===a.default.TreeNodeColorType.black)if(T.rightChild&&T.rightChild.color===a.default.TreeNodeColorType.red){T.color=x.color,x.color=a.default.TreeNodeColorType.black,T.rightChild&&(T.rightChild.color=a.default.TreeNodeColorType.black);var H=x.rotateLeft();f===x&&(f=H),S.color=a.default.TreeNodeColorType.black}else if((!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&T.leftChild&&T.leftChild.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.red,T.leftChild&&(T.leftChild.color=a.default.TreeNodeColorType.black);var H=T.rotateRight();f===T&&(f=H),w(S)}else(!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&(!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&(T.color=a.default.TreeNodeColorType.red,w(x))}else if(S===x.rightChild){if(T.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.black,x.color=a.default.TreeNodeColorType.red;var H=x.rotateRight();f===x&&(f=H),w(S)}else if(T.color===a.default.TreeNodeColorType.black)if(T.leftChild&&T.leftChild.color===a.default.TreeNodeColorType.red){T.color=x.color,x.color=a.default.TreeNodeColorType.black,T.leftChild&&(T.leftChild.color=a.default.TreeNodeColorType.black);var H=x.rotateRight();f===x&&(f=H),S.color=a.default.TreeNodeColorType.black}else if((!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&T.rightChild&&T.rightChild.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.red,T.rightChild&&(T.rightChild.color=a.default.TreeNodeColorType.black);var H=T.rotateLeft();f===T&&(f=H),w(S)}else(!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&(!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&(T.color=a.default.TreeNodeColorType.red,w(x))}},E=function(S){for(var x=S;x.leftChild||x.rightChild;){if(x.rightChild){x=g(x.rightChild);var T=S.key;S.key=x.key,x.key=T;var H=S.value;S.value=x.value,x.value=H,S=x}if(x.leftChild){x=p(x.leftChild);var T=S.key;S.key=x.key,x.key=T;var H=S.value;S.value=x.value,x.value=H,S=x}}w(x),x&&x.remove(),--h,f.color=a.default.TreeNodeColorType.black},R=function(S,x){if(!S||S.key===void 0)return!1;var T=R(S.leftChild,x);return T||x(S)?!0:R(S.rightChild,x)};this.eraseElementByPos=function(S){if(S<0||S>=h)throw new Error("pos must more than 0 and less than set's size");var x=0;R(f,function(T){return S===x?(E(T),!0):(++x,!1)})},this.eraseElementByKey=function(S){if(!this.empty()){var x=D(f,S);x===void 0||x.key===void 0||u(x.key,S)!==0||E(x)}};var O=function(S,x){if(!S||S.key===void 0)throw new Error("unknown error");var T=u(x,S.key);return T<0?S.leftChild?O(S.leftChild,x):(S.leftChild=new a.default,S.leftChild.parent=S,S.leftChild.brother=S.rightChild,S.rightChild&&(S.rightChild.brother=S.leftChild),S.leftChild):T>0?S.rightChild?O(S.rightChild,x):(S.rightChild=new a.default,S.rightChild.parent=S,S.rightChild.brother=S.leftChild,S.leftChild&&(S.leftChild.brother=S.rightChild),S.rightChild):S},A=function(S){var x=S.parent;if(!x){if(S===f)return;throw new Error("unknown error")}if(x.color!==a.default.TreeNodeColorType.black&&x.color===a.default.TreeNodeColorType.red){var T=x.brother,H=x.parent;if(!H)throw new Error("unknown error");if(T&&T.color===a.default.TreeNodeColorType.red)T.color=x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red,A(H);else if(!T||T.color===a.default.TreeNodeColorType.black){if(x===H.leftChild){if(S===x.leftChild){x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red;var Y=H.rotateRight();H===f&&(f=Y)}else if(S===x.rightChild){var Y=x.rotateLeft();H===f&&(f=Y),A(x)}}else if(x===H.rightChild){if(S===x.leftChild){var Y=x.rotateRight();H===f&&(f=Y),A(x)}else if(S===x.rightChild){x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red;var Y=H.rotateLeft();H===f&&(f=Y)}}}}};this.setElement=function(S,x){if(S==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(x==null){this.eraseElementByKey(S);return}if(this.empty()){++h,f.key=S,f.value=x,f.color=a.default.TreeNodeColorType.black;return}var T=O(f,S);if(T.key!==void 0&&u(T.key,S)===0){T.value=x;return}++h,T.key=S,T.value=x,A(T),f.color=a.default.TreeNodeColorType.black};var D=function(S,x){if(!(!S||S.key===void 0)){var T=u(x,S.key);return T<0?D(S.leftChild,x):T>0?D(S.rightChild,x):S}};this.find=function(S){return!!D(f,S)},this.getElementByKey=function(S){var x=D(f,S);if((x==null?void 0:x.key)===void 0||(x==null?void 0:x.value)===void 0)throw new Error("unknown error");return x.value},this.union=function(S){var x=this;S.forEach(function(T){var H=T.key,Y=T.value;return x.setElement(H,Y)})},this.getHeight=function(){if(this.empty())return 0;var S=function(x){return x?Math.max(S(x.leftChild),S(x.rightChild))+1:1};return S(f)};var L=function(S){return o(this,function(x){switch(x.label){case 0:return!S||S.key===void 0||S.value===void 0?[2]:[5,r(L(S.leftChild))];case 1:return x.sent(),[4,{key:S.key,value:S.value}];case 2:return x.sent(),[5,r(L(S.rightChild))];case 3:return x.sent(),[2]}})};this[Symbol.iterator]=function(){return L(f)},c.forEach(function(S){var x=S.key,T=S.value;return d.setElement(x,T)}),Object.freeze(this)}Object.freeze(l),s.default=l},{"../Base/TreeNode":25}],31:[function(t,n,s){Object.defineProperty(s,"__esModule",{value:!0});function o(r,a){r===void 0&&(r=[]),a=a||function(h,f){return h>f?-1:h<f?1:0};var l=[];r.forEach(function(h){return l.push(h)});var c=l.length,u=function(h,f){if(h<0||h>=c)throw new Error("unknown error");if(f<0||f>=c)throw new Error("unknown error");var g=l[h];l[h]=l[f],l[f]=g},d=function(h){if(h<0||h>=c)throw new Error("unknown error");var f=h*2+1,g=h*2+2;f<c&&a(l[h],l[f])>0&&u(h,f),g<c&&a(l[h],l[g])>0&&u(h,g)};(function(){for(var h=Math.floor((c-1)/2);h>=0;--h)for(var f=h,g=f*2+1;g<c;){var p=g,v=p+1,y=p;if(v<c&&a(l[p],l[v])>0&&(y=v),a(l[f],l[y])<=0)break;u(f,y),f=y,g=f*2+1}})(),this.size=function(){return c},this.empty=function(){return c===0},this.clear=function(){c=0,l.length=0},this.push=function(h){if(l.push(h),++c,c!==1)for(var f=c-1;f>0;){var g=Math.floor((f-1)/2);if(a(l[g],h)<=0)break;d(g),f=g}},this.pop=function(){if(!this.empty()){if(this.size()===1){--c;return}var h=l[c-1];--c;for(var f=0;f<this.size();){var g=f*2+1,p=f*2+2;if(g>=this.size())break;var v=g;if(p<this.size()&&a(l[g],l[p])>0&&(v=p),a(l[v],h)>=0)break;l[f]=l[v],f=v}l[f]=h}},this.top=function(){return l[0]},Object.freeze(this)}Object.freeze(o),s.default=o},{}],32:[function(t,n,s){Object.defineProperty(s,"__esModule",{value:!0});var o=t("../LinkList/LinkList");function r(a){a===void 0&&(a=[]);var l=new o.default(a);this.size=function(){return l.size()},this.empty=function(){return l.empty()},this.clear=function(){l.clear()},this.push=function(c){l.pushBack(c)},this.pop=function(){l.popFront()},this.front=function(){return l.front()},Object.freeze(this)}Object.freeze(r),s.default=r},{"../LinkList/LinkList":29}],33:[function(t,n,s){var o=this&&this.__generator||function(c,u){var d={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,f,g,p;return p={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function v(C){return function(m){return y([C,m])}}function y(C){if(h)throw new TypeError("Generator is already executing.");for(;d;)try{if(h=1,f&&(g=C[0]&2?f.return:C[0]?f.throw||((g=f.return)&&g.call(f),0):f.next)&&!(g=g.call(f,C[1])).done)return g;switch(f=0,g&&(C=[C[0]&2,g.value]),C[0]){case 0:case 1:g=C;break;case 4:return d.label++,{value:C[1],done:!1};case 5:d.label++,f=C[1],C=[0];continue;case 7:C=d.ops.pop(),d.trys.pop();continue;default:if(g=d.trys,!(g=g.length>0&&g[g.length-1])&&(C[0]===6||C[0]===2)){d=0;continue}if(C[0]===3&&(!g||C[1]>g[0]&&C[1]<g[3])){d.label=C[1];break}if(C[0]===6&&d.label<g[1]){d.label=g[1],g=C;break}if(g&&d.label<g[2]){d.label=g[2],d.ops.push(C);break}g[2]&&d.ops.pop(),d.trys.pop();continue}C=u.call(c,d)}catch(m){C=[6,m],f=0}finally{h=g=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}},r=this&&this.__values||function(c){var u=typeof Symbol=="function"&&Symbol.iterator,d=u&&c[u],h=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&h>=c.length&&(c=void 0),{value:c&&c[h++],done:!c}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0});var a=t("../Base/TreeNode");function l(c,u){var d=this;c===void 0&&(c=[]),u=u||function(S,x){return S<x?-1:S>x?1:0};var h=0,f=new a.default;f.color=a.default.TreeNodeColorType.black,this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,f.key=void 0,f.leftChild=f.rightChild=f.brother=f.parent=void 0,f.color=a.default.TreeNodeColorType.black};var g=function(S){if(!S||S.key===void 0)throw new Error("unknown error");return S.leftChild?g(S.leftChild):S},p=function(S){if(!S||S.key===void 0)throw new Error("unknown error");return S.rightChild?p(S.rightChild):S};this.front=function(){if(!this.empty()){var S=g(f);return S.key}},this.back=function(){if(!this.empty()){var S=p(f);return S.key}},this.forEach=function(S){var x,T,H=0;try{for(var Y=r(this),Q=Y.next();!Q.done;Q=Y.next()){var te=Q.value;S(te,H++)}}catch(F){x={error:F}}finally{try{Q&&!Q.done&&(T=Y.return)&&T.call(Y)}finally{if(x)throw x.error}}},this.getElementByPos=function(S){var x,T;if(S<0||S>=this.size())throw new Error("pos must more than 0 and less than set's size");var H=0;try{for(var Y=r(this),Q=Y.next();!Q.done;Q=Y.next()){var te=Q.value;if(H===S)return te;++H}}catch(F){x={error:F}}finally{try{Q&&!Q.done&&(T=Y.return)&&T.call(Y)}finally{if(x)throw x.error}}throw new Error("unknown error")};var v=function(S){var x=S.parent;if(!x){if(S===f)return;throw new Error("unknown error")}if(S.color===a.default.TreeNodeColorType.red){S.color=a.default.TreeNodeColorType.black;return}var T=S.brother;if(!T)throw new Error("unknown error");if(S===x.leftChild){if(T.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.black,x.color=a.default.TreeNodeColorType.red;var H=x.rotateLeft();f===x&&(f=H),v(S)}else if(T.color===a.default.TreeNodeColorType.black)if(T.rightChild&&T.rightChild.color===a.default.TreeNodeColorType.red){T.color=x.color,x.color=a.default.TreeNodeColorType.black,T.rightChild&&(T.rightChild.color=a.default.TreeNodeColorType.black);var H=x.rotateLeft();f===x&&(f=H),S.color=a.default.TreeNodeColorType.black}else if((!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&T.leftChild&&T.leftChild.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.red,T.leftChild&&(T.leftChild.color=a.default.TreeNodeColorType.black);var H=T.rotateRight();f===T&&(f=H),v(S)}else(!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&(!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&(T.color=a.default.TreeNodeColorType.red,v(x))}else if(S===x.rightChild){if(T.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.black,x.color=a.default.TreeNodeColorType.red;var H=x.rotateRight();f===x&&(f=H),v(S)}else if(T.color===a.default.TreeNodeColorType.black)if(T.leftChild&&T.leftChild.color===a.default.TreeNodeColorType.red){T.color=x.color,x.color=a.default.TreeNodeColorType.black,T.leftChild&&(T.leftChild.color=a.default.TreeNodeColorType.black);var H=x.rotateRight();f===x&&(f=H),S.color=a.default.TreeNodeColorType.black}else if((!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&T.rightChild&&T.rightChild.color===a.default.TreeNodeColorType.red){T.color=a.default.TreeNodeColorType.red,T.rightChild&&(T.rightChild.color=a.default.TreeNodeColorType.black);var H=T.rotateLeft();f===T&&(f=H),v(S)}else(!T.leftChild||T.leftChild.color===a.default.TreeNodeColorType.black)&&(!T.rightChild||T.rightChild.color===a.default.TreeNodeColorType.black)&&(T.color=a.default.TreeNodeColorType.red,v(x))}},y=function(S){for(var x=S;x.leftChild||x.rightChild;){if(x.rightChild){x=g(x.rightChild);var T=S.key;S.key=x.key,x.key=T,S=x}if(x.leftChild){x=p(x.leftChild);var T=S.key;S.key=x.key,x.key=T,S=x}}v(x),x&&x.remove(),--h,f.color=a.default.TreeNodeColorType.black},C=function(S,x){if(!S||S.key===void 0)return!1;var T=C(S.leftChild,x);return T||x(S)?!0:C(S.rightChild,x)};this.eraseElementByPos=function(S){if(S<0||S>=h)throw new Error("pos must more than 0 and less than set's size");var x=0;C(f,function(T){return S===x?(y(T),!0):(++x,!1)})},this.eraseElementByValue=function(S){if(!this.empty()){var x=E(f,S);x===void 0||x.key===void 0||u(x.key,S)!==0||y(x)}};var m=function(S,x){if(!S||S.key===void 0)throw new Error("unknown error");var T=u(x,S.key);return T<0?S.leftChild?m(S.leftChild,x):(S.leftChild=new a.default,S.leftChild.parent=S,S.leftChild.brother=S.rightChild,S.rightChild&&(S.rightChild.brother=S.leftChild),S.leftChild):T>0?S.rightChild?m(S.rightChild,x):(S.rightChild=new a.default,S.rightChild.parent=S,S.rightChild.brother=S.leftChild,S.leftChild&&(S.leftChild.brother=S.rightChild),S.rightChild):S},w=function(S){var x=S.parent;if(!x){if(S===f)return;throw new Error("unknown error")}if(x.color!==a.default.TreeNodeColorType.black&&x.color===a.default.TreeNodeColorType.red){var T=x.brother,H=x.parent;if(!H)throw new Error("unknown error");if(T&&T.color===a.default.TreeNodeColorType.red)T.color=x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red,w(H);else if(!T||T.color===a.default.TreeNodeColorType.black){if(x===H.leftChild){if(S===x.leftChild){x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red;var Y=H.rotateRight();H===f&&(f=Y)}else if(S===x.rightChild){var Y=x.rotateLeft();H===f&&(f=Y),w(x)}}else if(x===H.rightChild){if(S===x.leftChild){var Y=x.rotateRight();H===f&&(f=Y),w(x)}else if(S===x.rightChild){x.color=a.default.TreeNodeColorType.black,H.color=a.default.TreeNodeColorType.red;var Y=H.rotateLeft();H===f&&(f=Y)}}}}};this.insert=function(S){if(S==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty()){++h,f.key=S,f.color=a.default.TreeNodeColorType.black;return}var x=m(f,S);x.key!==void 0&&u(x.key,S)===0||(++h,x.key=S,w(x),f.color=a.default.TreeNodeColorType.black)};var E=function(S,x){if(!(!S||S.key===void 0)){var T=u(x,S.key);return T<0?E(S.leftChild,x):T>0?E(S.rightChild,x):S}};this.find=function(S){var x=E(f,S);return x!==void 0&&x.key!==void 0&&u(x.key,S)===0};var R=function(S,x){if(!(!S||S.key===void 0)){var T=u(S.key,x);if(T===0)return S.key;if(T<0)return R(S.rightChild,x);var H=R(S.leftChild,x);return H!==void 0?H:S.key}};this.lowerBound=function(S){return R(f,S)};var O=function(S,x){if(!(!S||S.key===void 0)){var T=u(S.key,x);if(T<=0)return O(S.rightChild,x);var H=O(S.leftChild,x);return H!==void 0?H:S.key}};this.upperBound=function(S){return O(f,S)};var A=function(S,x){if(!(!S||S.key===void 0)){var T=u(S.key,x);if(T===0)return S.key;if(T>0)return A(S.leftChild,x);var H=A(S.rightChild,x);return H!==void 0?H:S.key}};this.reverseLowerBound=function(S){return A(f,S)};var D=function(S,x){if(!(!S||S.key===void 0)){var T=u(S.key,x);if(T>=0)return D(S.leftChild,x);var H=D(S.rightChild,x);return H!==void 0?H:S.key}};this.reverseUpperBound=function(S){return D(f,S)},this.union=function(S){var x=this;S.forEach(function(T){return x.insert(T)})},this.getHeight=function(){if(this.empty())return 0;var S=function(x){return x?Math.max(S(x.leftChild),S(x.rightChild))+1:1};return S(f)};var L=function(S){return o(this,function(x){switch(x.label){case 0:return!S||S.key===void 0?[2]:[5,r(L(S.leftChild))];case 1:return x.sent(),[4,S.key];case 2:return x.sent(),[5,r(L(S.rightChild))];case 3:return x.sent(),[2]}})};this[Symbol.iterator]=function(){return L(f)},c.forEach(function(S){return d.insert(S)}),Object.freeze(this)}Object.freeze(l),s.default=l},{"../Base/TreeNode":25}],34:[function(t,n,s){Object.defineProperty(s,"__esModule",{value:!0});function o(r){var a=this;r===void 0&&(r=[]);var l=0,c=[];this.size=function(){return l},this.empty=function(){return l===0},this.clear=function(){l=0,c.length=0},this.push=function(u){c.push(u),++l},this.pop=function(){c.pop(),l>0&&--l},this.top=function(){return c[l-1]},r.forEach(function(u){return a.push(u)}),Object.freeze(this)}Object.freeze(o),s.default=o},{}],35:[function(t,n,s){var o=this&&this.__generator||function(u,d){var h={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},f,g,p,v;return v={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(m){return function(w){return C([m,w])}}function C(m){if(f)throw new TypeError("Generator is already executing.");for(;h;)try{if(f=1,g&&(p=m[0]&2?g.return:m[0]?g.throw||((p=g.return)&&p.call(g),0):g.next)&&!(p=p.call(g,m[1])).done)return p;switch(g=0,p&&(m=[m[0]&2,p.value]),m[0]){case 0:case 1:p=m;break;case 4:return h.label++,{value:m[1],done:!1};case 5:h.label++,g=m[1],m=[0];continue;case 7:m=h.ops.pop(),h.trys.pop();continue;default:if(p=h.trys,!(p=p.length>0&&p[p.length-1])&&(m[0]===6||m[0]===2)){h=0;continue}if(m[0]===3&&(!p||m[1]>p[0]&&m[1]<p[3])){h.label=m[1];break}if(m[0]===6&&h.label<p[1]){h.label=p[1],p=m;break}if(p&&h.label<p[2]){h.label=p[2],h.ops.push(m);break}p[2]&&h.ops.pop(),h.trys.pop();continue}m=d.call(u,h)}catch(w){m=[6,w],g=0}finally{f=p=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},r=this&&this.__read||function(u,d){var h=typeof Symbol=="function"&&u[Symbol.iterator];if(!h)return u;var f=h.call(u),g,p=[],v;try{for(;(d===void 0||d-- >0)&&!(g=f.next()).done;)p.push(g.value)}catch(y){v={error:y}}finally{try{g&&!g.done&&(h=f.return)&&h.call(f)}finally{if(v)throw v.error}}return p},a=this&&this.__spreadArray||function(u,d,h){if(h||arguments.length===2)for(var f=0,g=d.length,p;f<g;f++)(p||!(f in d))&&(p||(p=Array.prototype.slice.call(d,0,f)),p[f]=d[f]);return u.concat(p||Array.prototype.slice.call(d))},l=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&u[d],f=0;if(h)return h.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&f>=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0});function c(u){var d=this;u===void 0&&(u=[]);var h=0,f=[];this.size=function(){return h},this.empty=function(){return h===0},this.clear=function(){h=0,f.length=0},this.front=function(){if(!this.empty())return f[0]},this.back=function(){if(!this.empty())return f[h-1]},this.forEach=function(g){f.forEach(g)},this.getElementByPos=function(g){if(g<0||g>=h)throw new Error("pos must more than 0 and less than vector's size");return f[g]},this.eraseElementByPos=function(g){if(g<0||g>=h)throw new Error("pos must more than 0 and less than vector's size");for(var p=g;p<h-1;++p)f[p]=f[p+1];this.popBack()},this.eraseElementByValue=function(g){var p=[];this.forEach(function(y){y!==g&&p.push(y)}),p.forEach(function(y,C){f[C]=y});for(var v=p.length;h>v;)this.popBack()},this.pushBack=function(g){f.push(g),++h},this.popBack=function(){f.pop(),h>0&&--h},this.setElementByPos=function(g,p){if(g<0||g>=h)throw new Error("pos must more than 0 and less than vector's size");f[g]=p},this.insert=function(g,p,v){if(v===void 0&&(v=1),g<0||g>h)throw new Error("pos must more than 0 and less than or equal to vector's size");f.splice.apply(f,a([g,0],r(new Array(v).fill(p)),!1)),h+=v},this.find=function(g){return f.includes(g)},this.reverse=function(){f.reverse()},this.unique=function(){var g,p=[];this.forEach(function(y,C){(C===0||y!==g)&&(p.push(y),g=y)}),p.forEach(function(y,C){f[C]=y});for(var v=p.length;h>v;)this.popBack()},this.sort=function(g){f.sort(g)},this[Symbol.iterator]=function(){return function(){return o(this,function(g){switch(g.label){case 0:return[5,l(f)];case 1:return[2,g.sent()]}})}()},u.forEach(function(g){return d.pushBack(g)}),Object.freeze(this)}Object.freeze(c),s.default=c},{}],36:[function(t,n,s){Object.defineProperty(s,"__esModule",{value:!0}),s.HashMap=s.HashSet=s.Map=s.Set=s.PriorityQueue=s.Deque=s.LinkList=s.Queue=s.Stack=s.Vector=void 0;var o=t("./Vector/Vector");s.Vector=o.default;var r=t("./Stack/Stack");s.Stack=r.default;var a=t("./Queue/Queue");s.Queue=a.default;var l=t("./LinkList/LinkList");s.LinkList=l.default;var c=t("./Deque/Deque");s.Deque=c.default;var u=t("./PriorityQueue/PriorityQueue");s.PriorityQueue=u.default;var d=t("./Set/Set");s.Set=d.default;var h=t("./Map/Map");s.Map=h.default;var f=t("./HashSet/HashSet");s.HashSet=f.default;var g=t("./HashMap/HashMap");s.HashMap=g.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(t,n,s){const o=t("yallist"),r=Symbol("max"),a=Symbol("length"),l=Symbol("lengthCalculator"),c=Symbol("allowStale"),u=Symbol("maxAge"),d=Symbol("dispose"),h=Symbol("noDisposeOnSet"),f=Symbol("lruList"),g=Symbol("cache"),p=Symbol("updateAgeOnGet"),v=()=>1;class y{constructor(D){if(typeof D=="number"&&(D={max:D}),D||(D={}),D.max&&(typeof D.max!="number"||D.max<0))throw new TypeError("max must be a non-negative number");this[r]=D.max||1/0;const L=D.length||v;if(this[l]=typeof L!="function"?v:L,this[c]=D.stale||!1,D.maxAge&&typeof D.maxAge!="number")throw new TypeError("maxAge must be a number");this[u]=D.maxAge||0,this[d]=D.dispose,this[h]=D.noDisposeOnSet||!1,this[p]=D.updateAgeOnGet||!1,this.reset()}set max(D){if(typeof D!="number"||D<0)throw new TypeError("max must be a non-negative number");this[r]=D||1/0,w(this)}get max(){return this[r]}set allowStale(D){this[c]=!!D}get allowStale(){return this[c]}set maxAge(D){if(typeof D!="number")throw new TypeError("maxAge must be a non-negative number");this[u]=D,w(this)}get maxAge(){return this[u]}set lengthCalculator(D){typeof D!="function"&&(D=v),D!==this[l]&&(this[l]=D,this[a]=0,this[f].forEach(L=>{L.length=this[l](L.value,L.key),this[a]+=L.length})),w(this)}get lengthCalculator(){return this[l]}get length(){return this[a]}get itemCount(){return this[f].length}rforEach(D,L){L=L||this;for(let S=this[f].tail;S!==null;){const x=S.prev;O(this,D,S,L),S=x}}forEach(D,L){L=L||this;for(let S=this[f].head;S!==null;){const x=S.next;O(this,D,S,L),S=x}}keys(){return this[f].toArray().map(D=>D.key)}values(){return this[f].toArray().map(D=>D.value)}reset(){this[d]&&this[f]&&this[f].length&&this[f].forEach(D=>this[d](D.key,D.value)),this[g]=new Map,this[f]=new o,this[a]=0}dump(){return this[f].map(D=>m(this,D)?!1:{k:D.key,v:D.value,e:D.now+(D.maxAge||0)}).toArray().filter(D=>D)}dumpLru(){return this[f]}set(D,L,S){if(S=S||this[u],S&&typeof S!="number")throw new TypeError("maxAge must be a number");const x=S?Date.now():0,T=this[l](L,D);if(this[g].has(D)){if(T>this[r])return E(this,this[g].get(D)),!1;const Q=this[g].get(D).value;return this[d]&&(this[h]||this[d](D,Q.value)),Q.now=x,Q.maxAge=S,Q.value=L,this[a]+=T-Q.length,Q.length=T,this.get(D),w(this),!0}const H=new R(D,L,T,x,S);return H.length>this[r]?(this[d]&&this[d](D,L),!1):(this[a]+=H.length,this[f].unshift(H),this[g].set(D,this[f].head),w(this),!0)}has(D){if(!this[g].has(D))return!1;const L=this[g].get(D).value;return!m(this,L)}get(D){return C(this,D,!0)}peek(D){return C(this,D,!1)}pop(){const D=this[f].tail;return D?(E(this,D),D.value):null}del(D){E(this,this[g].get(D))}load(D){this.reset();const L=Date.now();for(let S=D.length-1;S>=0;S--){const x=D[S],T=x.e||0;if(T===0)this.set(x.k,x.v);else{const H=T-L;H>0&&this.set(x.k,x.v,H)}}}prune(){this[g].forEach((D,L)=>C(this,L,!1))}}const C=(A,D,L)=>{const S=A[g].get(D);if(S){const x=S.value;if(m(A,x)){if(E(A,S),!A[c])return}else L&&(A[p]&&(S.value.now=Date.now()),A[f].unshiftNode(S));return x.value}},m=(A,D)=>{if(!D||!D.maxAge&&!A[u])return!1;const L=Date.now()-D.now;return D.maxAge?L>D.maxAge:A[u]&&L>A[u]},w=A=>{if(A[a]>A[r])for(let D=A[f].tail;A[a]>A[r]&&D!==null;){const L=D.prev;E(A,D),D=L}},E=(A,D)=>{if(D){const L=D.value;A[d]&&A[d](L.key,L.value),A[a]-=L.length,A[g].delete(L.key),A[f].removeNode(D)}};class R{constructor(D,L,S,x,T){this.key=D,this.value=L,this.length=S,this.now=x,this.maxAge=T||0}}const O=(A,D,L,S)=>{let x=L.value;m(A,x)&&(E(A,L),A[c]||(x=void 0)),x&&D.call(S,x.value,x.key,A)};n.exports=y},{yallist:83}],38:[function(t,n,s){(function(o){(function(){const r=n.exports;r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.codes={};for(const l in r.types){const c=r.types[l];r.codes[c]=l}r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.VARBYTEINT_MASK=127,r.VARBYTEINT_FIN_MASK=128,r.VARBYTEINT_MAX=268435455,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=o.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=o.from([r.codes.connack<<r.CMD_SHIFT]),r.USERNAME_MASK=128,r.PASSWORD_MASK=64,r.WILL_RETAIN_MASK=32,r.WILL_QOS_MASK=24,r.WILL_QOS_SHIFT=3,r.WILL_FLAG_MASK=4,r.CLEAN_SESSION_MASK=2,r.CONNECT_HEADER=o.from([r.codes.connect<<r.CMD_SHIFT]),r.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},r.propertiesCodes={};for(const l in r.properties){const c=r.properties[l];r.propertiesCodes[c]=l}r.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function a(l){return[0,1,2].map(c=>[0,1].map(u=>[0,1].map(d=>{const h=o.alloc(1);return h.writeUInt8(r.codes[l]<<r.CMD_SHIFT|(u?r.DUP_MASK:0)|c<<r.QOS_SHIFT|d,0,!0),h})))}r.PUBLISH_HEADER=a("publish"),r.SUBSCRIBE_HEADER=a("subscribe"),r.SUBSCRIBE_OPTIONS_QOS_MASK=3,r.SUBSCRIBE_OPTIONS_NL_MASK=1,r.SUBSCRIBE_OPTIONS_NL_SHIFT=2,r.SUBSCRIBE_OPTIONS_RAP_MASK=1,r.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,r.SUBSCRIBE_OPTIONS_RH_MASK=3,r.SUBSCRIBE_OPTIONS_RH_SHIFT=4,r.SUBSCRIBE_OPTIONS_RH=[0,16,32],r.SUBSCRIBE_OPTIONS_NL=4,r.SUBSCRIBE_OPTIONS_RAP=8,r.SUBSCRIBE_OPTIONS_QOS=[0,1,2],r.UNSUBSCRIBE_HEADER=a("unsubscribe"),r.ACKS={unsuback:a("unsuback"),puback:a("puback"),pubcomp:a("pubcomp"),pubrel:a("pubrel"),pubrec:a("pubrec")},r.SUBACK_HEADER=o.from([r.codes.suback<<r.CMD_SHIFT]),r.VERSION3=o.from([3]),r.VERSION4=o.from([4]),r.VERSION5=o.from([5]),r.VERSION131=o.from([131]),r.VERSION132=o.from([132]),r.QOS=[0,1,2].map(l=>o.from([l])),r.EMPTY={pingreq:o.from([r.codes.pingreq<<4,0]),pingresp:o.from([r.codes.pingresp<<4,0]),disconnect:o.from([r.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],39:[function(t,n,s){(function(o){(function(){const r=t("./writeToStream"),a=t("events");function l(u,d){const h=new c;return r(u,h,d),h.concat()}class c extends a{constructor(){super(),this._array=new Array(20),this._i=0}write(d){return this._array[this._i++]=d,!0}concat(){let d=0;const h=new Array(this._array.length),f=this._array;let g=0,p;for(p=0;p<f.length&&f[p]!==void 0;p++)typeof f[p]!="string"?h[p]=f[p].length:h[p]=o.byteLength(f[p]),d+=h[p];const v=o.allocUnsafe(d);for(p=0;p<f.length&&f[p]!==void 0;p++)typeof f[p]!="string"?(f[p].copy(v,g),g+=h[p]):(v.write(f[p],g),g+=h[p]);return v}}n.exports=l}).call(this)}).call(this,t("buffer").Buffer)},{"./writeToStream":44,buffer:17,events:22}],40:[function(t,n,s){s.parser=t("./parser").parser,s.generate=t("./generate"),s.writeToStream=t("./writeToStream")},{"./generate":39,"./parser":43,"./writeToStream":44}],41:[function(t,n,s){(function(o){(function(){const a={},l=o.isBuffer(o.from([1,2]).subarray(0,1));function c(f){const g=o.allocUnsafe(2);return g.writeUInt8(f>>8,0),g.writeUInt8(f&255,0+1),g}function u(){for(let f=0;f<65536;f++)a[f]=c(f)}function d(f){let p=0,v=0;const y=o.allocUnsafe(4);do p=f%128|0,f=f/128|0,f>0&&(p=p|128),y.writeUInt8(p,v++);while(f>0&&v<4);return f>0&&(v=0),l?y.subarray(0,v):y.slice(0,v)}function h(f){const g=o.allocUnsafe(4);return g.writeUInt32BE(f,0),g}n.exports={cache:a,generateCache:u,generateNumber:c,genBufVariableByteInt:d,generate4ByteBuffer:h}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],42:[function(t,n,s){class o{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}n.exports=o},{}],43:[function(t,n,s){const o=t("bl"),r=t("events"),a=t("./packet"),l=t("./constants"),c=t("debug")("mqtt-packet:parser");class u extends r{constructor(){super(),this.parser=this.constructor.parser}static parser(h){return this instanceof u?(this.settings=h||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new u().parser(h)}_resetState(){c("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new a,this.error=null,this._list=o(),this._stateCounter=0}parse(h){for(this.error&&this._resetState(),this._list.append(h),c("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,c("parse: state complete. _stateCounter is now: %d",this._stateCounter),c("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return c("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const h=this._list.readUInt8(0);return this.packet.cmd=l.types[h>>l.CMD_SHIFT],this.packet.retain=(h&l.RETAIN_MASK)!==0,this.packet.qos=h>>l.QOS_SHIFT&l.QOS_MASK,this.packet.dup=(h&l.DUP_MASK)!==0,c("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const h=this._parseVarByteNum(!0);return h&&(this.packet.length=h.value,this._list.consume(h.bytes)),c("_parseLength %d",h.value),!!h}_parsePayload(){c("_parsePayload: payload %O",this._list);let h=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}h=!0}return c("_parsePayload complete result: %s",h),h}_parseConnect(){c("_parseConnect");let h,f,g,p;const v={},y=this.packet,C=this._parseString();if(C===null)return this._emitError(new Error("Cannot parse protocolId"));if(C!=="MQTT"&&C!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(y.protocolId=C,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(y.protocolVersion=this._list.readUInt8(this._pos),y.protocolVersion>=128&&(y.bridgeMode=!0,y.protocolVersion=y.protocolVersion-128),y.protocolVersion!==3&&y.protocolVersion!==4&&y.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(v.username=this._list.readUInt8(this._pos)&l.USERNAME_MASK,v.password=this._list.readUInt8(this._pos)&l.PASSWORD_MASK,v.will=this._list.readUInt8(this._pos)&l.WILL_FLAG_MASK,v.will&&(y.will={},y.will.retain=(this._list.readUInt8(this._pos)&l.WILL_RETAIN_MASK)!==0,y.will.qos=(this._list.readUInt8(this._pos)&l.WILL_QOS_MASK)>>l.WILL_QOS_SHIFT),y.clean=(this._list.readUInt8(this._pos)&l.CLEAN_SESSION_MASK)!==0,this._pos++,y.keepalive=this._parseNum(),y.keepalive===-1)return this._emitError(new Error("Packet too short"));if(y.protocolVersion===5){const w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(y.properties=w)}const m=this._parseString();if(m===null)return this._emitError(new Error("Packet too short"));if(y.clientId=m,c("_parseConnect: packet.clientId: %s",y.clientId),v.will){if(y.protocolVersion===5){const w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(y.will.properties=w)}if(h=this._parseString(),h===null)return this._emitError(new Error("Cannot parse will topic"));if(y.will.topic=h,c("_parseConnect: packet.will.topic: %s",y.will.topic),f=this._parseBuffer(),f===null)return this._emitError(new Error("Cannot parse will payload"));y.will.payload=f,c("_parseConnect: packet.will.paylaod: %s",y.will.payload)}if(v.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));y.username=p,c("_parseConnect: packet.username: %s",y.username)}if(v.password){if(g=this._parseBuffer(),g===null)return this._emitError(new Error("Cannot parse password"));y.password=g}return this.settings=y,c("_parseConnect: complete"),y}_parseConnack(){c("_parseConnack");const h=this.packet;if(this._list.length<1)return null;if(h.sessionPresent=!!(this._list.readUInt8(this._pos++)&l.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?h.reasonCode=this._list.readUInt8(this._pos++):h.reasonCode=0;else{if(this._list.length<2)return null;h.returnCode=this._list.readUInt8(this._pos++)}if(h.returnCode===-1||h.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}c("_parseConnack: complete")}_parsePublish(){c("_parsePublish");const h=this.packet;if(h.topic=this._parseString(),h.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(h.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}h.payload=this._list.slice(this._pos,h.length),c("_parsePublish: payload from buffer list: %o",h.payload)}}_parseSubscribe(){c("_parseSubscribe");const h=this.packet;let f,g,p,v,y,C,m;if(h.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(h.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(h.properties=w)}for(;this._pos<h.length;){if(f=this._parseString(),f===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=h.length)return this._emitError(new Error("Malformed Subscribe Payload"));g=this._parseByte(),p=g&l.SUBSCRIBE_OPTIONS_QOS_MASK,C=(g>>l.SUBSCRIBE_OPTIONS_NL_SHIFT&l.SUBSCRIBE_OPTIONS_NL_MASK)!==0,y=(g>>l.SUBSCRIBE_OPTIONS_RAP_SHIFT&l.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,v=g>>l.SUBSCRIBE_OPTIONS_RH_SHIFT&l.SUBSCRIBE_OPTIONS_RH_MASK,m={topic:f,qos:p},this.settings.protocolVersion===5?(m.nl=C,m.rap=y,m.rh=v):this.settings.bridgeMode&&(m.rh=0,m.rap=!0,m.nl=!0),c("_parseSubscribe: push subscription `%s` to subscription",m),h.subscriptions.push(m)}}}_parseSuback(){c("_parseSuback");const h=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){c("_parseUnsubscribe");const h=this.packet;if(h.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}for(;this._pos<h.length;){const f=this._parseString();if(f===null)return this._emitError(new Error("Cannot parse topic"));c("_parseUnsubscribe: push topic `%s` to unsubscriptions",f),h.unsubscriptions.push(f)}}}_parseUnsuback(){c("_parseUnsuback");const h=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const f=this._parseProperties();for(Object.getOwnPropertyNames(f).length&&(h.properties=f),h.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){c("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const h=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(h.length>2?(h.reasonCode=this._parseByte(),c("_parseConfirmation: packet.reasonCode `%d`",h.reasonCode)):h.reasonCode=0,h.length>3)){const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}return!0}_parseDisconnect(){const h=this.packet;if(c("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?h.reasonCode=this._parseByte():h.reasonCode=0;const f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(h.properties=f)}return c("_parseDisconnect result: true"),!0}_parseAuth(){c("_parseAuth");const h=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));h.reasonCode=this._parseByte();const f=this._parseProperties();return Object.getOwnPropertyNames(f).length&&(h.properties=f),c("_parseAuth: result: true"),!0}_parseMessageId(){const h=this.packet;return h.messageId=this._parseNum(),h.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(c("_parseMessageId: packet.messageId %d",h.messageId),!0)}_parseString(h){const f=this._parseNum(),g=f+this._pos;if(f===-1||g>this._list.length||g>this.packet.length)return null;const p=this._list.toString("utf8",this._pos,g);return this._pos+=f,c("_parseString: result: %s",p),p}_parseStringPair(){return c("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const h=this._parseNum(),f=h+this._pos;if(h===-1||f>this._list.length||f>this.packet.length)return null;const g=this._list.slice(this._pos,f);return this._pos+=h,c("_parseBuffer: result: %o",g),g}_parseNum(){if(this._list.length-this._pos<2)return-1;const h=this._list.readUInt16BE(this._pos);return this._pos+=2,c("_parseNum: result: %s",h),h}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const h=this._list.readUInt32BE(this._pos);return this._pos+=4,c("_parse4ByteNum: result: %s",h),h}_parseVarByteNum(h){c("_parseVarByteNum");const f=4;let g=0,p=1,v=0,y=!1,C;const m=this._pos?this._pos:0;for(;g<f&&m+g<this._list.length;){if(C=this._list.readUInt8(m+g++),v+=p*(C&l.VARBYTEINT_MASK),p*=128,!(C&l.VARBYTEINT_FIN_MASK)){y=!0;break}if(this._list.length<=g)break}return!y&&g===f&&this._list.length>=g&&this._emitError(new Error("Invalid variable byte integer")),m&&(this._pos+=g),y=y?h?{bytes:g,value:v}:v:!1,c("_parseVarByteNum: result: %o",y),y}_parseByte(){let h;return this._pos<this._list.length&&(h=this._list.readUInt8(this._pos),this._pos++),c("_parseByte: result: %o",h),h}_parseByType(h){switch(c("_parseByType: type: %s",h),h){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){c("_parseProperties");const h=this._parseVarByteNum(),g=this._pos+h,p={};for(;this._pos<g;){const v=this._parseByte();if(!v)return this._emitError(new Error("Cannot parse property code type")),!1;const y=l.propertiesCodes[v];if(!y)return this._emitError(new Error("Unknown property")),!1;if(y==="userProperties"){p[y]||(p[y]=Object.create(null));const C=this._parseByType(l.propertiesTypes[y]);if(p[y][C.name])if(Array.isArray(p[y][C.name]))p[y][C.name].push(C.value);else{const m=p[y][C.name];p[y][C.name]=[m],p[y][C.name].push(C.value)}else p[y][C.name]=C.value;continue}p[y]?Array.isArray(p[y])?p[y].push(this._parseByType(l.propertiesTypes[y])):(p[y]=[p[y]],p[y].push(this._parseByType(l.propertiesTypes[y]))):p[y]=this._parseByType(l.propertiesTypes[y])}return p}_newPacket(){return c("_newPacket"),this.packet&&(this._list.consume(this.packet.length),c("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),c("_newPacket: new packet"),this.packet=new a,this._pos=0,!0}_emitError(h){c("_emitError"),this.error=h,this.emit("error",h)}}n.exports=u},{"./constants":38,"./packet":42,bl:15,debug:18,events:22}],44:[function(t,n,s){(function(o){(function(){const r=t("./constants"),a=o.allocUnsafe(0),l=o.from([0]),c=t("./numbers"),u=t("process-nextick-args").nextTick,d=t("debug")("mqtt-packet:writeToStream"),h=c.cache,f=c.generateNumber,g=c.generateCache,p=c.genBufVariableByteInt,v=c.generate4ByteBuffer;let y=q,C=!0;function m(ie,ee,j){switch(d("generate called"),ee.cork&&(ee.cork(),u(w,ee)),C&&(C=!1,g()),d("generate: packet.cmd: %s",ie.cmd),ie.cmd){case"connect":return E(ie,ee);case"connack":return R(ie,ee,j);case"publish":return O(ie,ee,j);case"puback":case"pubrec":case"pubrel":case"pubcomp":return A(ie,ee,j);case"subscribe":return D(ie,ee,j);case"suback":return L(ie,ee,j);case"unsubscribe":return S(ie,ee,j);case"unsuback":return x(ie,ee,j);case"pingreq":case"pingresp":return T(ie,ee);case"disconnect":return H(ie,ee,j);case"auth":return Y(ie,ee,j);default:return ee.emit("error",new Error("Unknown command")),!1}}Object.defineProperty(m,"cacheNumbers",{get(){return y===q},set(ie){ie?((!h||Object.keys(h).length===0)&&(C=!0),y=q):(C=!1,y=V)}});function w(ie){ie.uncork()}function E(ie,ee,j){const M=ie||{},B=M.protocolId||"MQTT";let X=M.protocolVersion||4;const Z=M.will;let ue=M.clean;const G=M.keepalive||0,U=M.clientId||"",I=M.username,_=M.password,P=M.properties;ue===void 0&&(ue=!0);let $=0;if(!B||typeof B!="string"&&!o.isBuffer(B))return ee.emit("error",new Error("Invalid protocolId")),!1;if($+=B.length+2,X!==3&&X!==4&&X!==5)return ee.emit("error",new Error("Invalid protocol version")),!1;if($+=1,(typeof U=="string"||o.isBuffer(U))&&(U||X>=4)&&(U||ue))$+=o.byteLength(U)+2;else{if(X<4)return ee.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(ue*1===0)return ee.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof G!="number"||G<0||G>65535||G%1!==0)return ee.emit("error",new Error("Invalid keepalive")),!1;if($+=2,$+=1,X===5){var le=se(ee,P);if(!le)return!1;$+=le.length}if(Z){if(typeof Z!="object")return ee.emit("error",new Error("Invalid will")),!1;if(!Z.topic||typeof Z.topic!="string")return ee.emit("error",new Error("Invalid will topic")),!1;if($+=o.byteLength(Z.topic)+2,$+=2,Z.payload)if(Z.payload.length>=0)typeof Z.payload=="string"?$+=o.byteLength(Z.payload):$+=Z.payload.length;else return ee.emit("error",new Error("Invalid will payload")),!1;var pe={};if(X===5){if(pe=se(ee,Z.properties),!pe)return!1;$+=pe.length}}let ve=!1;if(I!=null)if(ne(I))ve=!0,$+=o.byteLength(I)+2;else return ee.emit("error",new Error("Invalid username")),!1;if(_!=null){if(!ve)return ee.emit("error",new Error("Username is required to use password")),!1;if(ne(_))$+=he(_)+2;else return ee.emit("error",new Error("Invalid password")),!1}ee.write(r.CONNECT_HEADER),te(ee,$),ae(ee,B),M.bridgeMode&&(X+=128),ee.write(X===131?r.VERSION131:X===132?r.VERSION132:X===4?r.VERSION4:X===5?r.VERSION5:r.VERSION3);let Ge=0;return Ge|=I!=null?r.USERNAME_MASK:0,Ge|=_!=null?r.PASSWORD_MASK:0,Ge|=Z&&Z.retain?r.WILL_RETAIN_MASK:0,Ge|=Z&&Z.qos?Z.qos<<r.WILL_QOS_SHIFT:0,Ge|=Z?r.WILL_FLAG_MASK:0,Ge|=ue?r.CLEAN_SESSION_MASK:0,ee.write(o.from([Ge])),y(ee,G),X===5&&le.write(),ae(ee,U),Z&&(X===5&&pe.write(),F(ee,Z.topic),ae(ee,Z.payload)),I!=null&&ae(ee,I),_!=null&&ae(ee,_),!0}function R(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=M===5?B.reasonCode:B.returnCode,Z=B.properties;let ue=2;if(typeof X!="number")return ee.emit("error",new Error("Invalid return code")),!1;let G=null;if(M===5){if(G=se(ee,Z),!G)return!1;ue+=G.length}return ee.write(r.CONNACK_HEADER),te(ee,ue),ee.write(B.sessionPresent?r.SESSIONPRESENT_HEADER:l),ee.write(o.from([X])),G!=null&&G.write(),!0}function O(ie,ee,j){d("publish: packet: %o",ie);const M=j?j.protocolVersion:4,B=ie||{},X=B.qos||0,Z=B.retain?r.RETAIN_MASK:0,ue=B.topic,G=B.payload||a,U=B.messageId,I=B.properties;let _=0;if(typeof ue=="string")_+=o.byteLength(ue)+2;else if(o.isBuffer(ue))_+=ue.length+2;else return ee.emit("error",new Error("Invalid topic")),!1;if(o.isBuffer(G)?_+=G.length:_+=o.byteLength(G),X&&typeof U!="number")return ee.emit("error",new Error("Invalid messageId")),!1;X&&(_+=2);let P=null;if(M===5){if(P=se(ee,I),!P)return!1;_+=P.length}return ee.write(r.PUBLISH_HEADER[X][B.dup?1:0][Z?1:0]),te(ee,_),y(ee,he(ue)),ee.write(ue),X>0&&y(ee,U),P!=null&&P.write(),d("publish: payload: %o",G),ee.write(G)}function A(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.cmd||"puback",Z=B.messageId,ue=B.dup&&X==="pubrel"?r.DUP_MASK:0;let G=0;const U=B.reasonCode,I=B.properties;let _=M===5?3:2;if(X==="pubrel"&&(G=1),typeof Z!="number")return ee.emit("error",new Error("Invalid messageId")),!1;let P=null;if(M===5&&typeof I=="object"){if(P=ce(ee,I,j,_),!P)return!1;_+=P.length}return ee.write(r.ACKS[X][G][ue][0]),te(ee,_),y(ee,Z),M===5&&ee.write(o.from([U])),P!==null&&P.write(),!0}function D(ie,ee,j){d("subscribe: packet: ");const M=j?j.protocolVersion:4,B=ie||{},X=B.dup?r.DUP_MASK:0,Z=B.messageId,ue=B.subscriptions,G=B.properties;let U=0;if(typeof Z!="number")return ee.emit("error",new Error("Invalid messageId")),!1;U+=2;let I=null;if(M===5){if(I=se(ee,G),!I)return!1;U+=I.length}if(typeof ue=="object"&&ue.length)for(let P=0;P<ue.length;P+=1){const $=ue[P].topic,le=ue[P].qos;if(typeof $!="string")return ee.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof le!="number")return ee.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(M===5){if(typeof(ue[P].nl||!1)!="boolean")return ee.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ue[P].rap||!1)!="boolean")return ee.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const Ge=ue[P].rh||0;if(typeof Ge!="number"||Ge>2)return ee.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}U+=o.byteLength($)+2+1}else return ee.emit("error",new Error("Invalid subscriptions")),!1;d("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),ee.write(r.SUBSCRIBE_HEADER[1][X?1:0][0]),te(ee,U),y(ee,Z),I!==null&&I.write();let _=!0;for(const P of ue){const $=P.topic,le=P.qos,pe=+P.nl,ve=+P.rap,Ge=P.rh;let Ue;F(ee,$),Ue=r.SUBSCRIBE_OPTIONS_QOS[le],M===5&&(Ue|=pe?r.SUBSCRIBE_OPTIONS_NL:0,Ue|=ve?r.SUBSCRIBE_OPTIONS_RAP:0,Ue|=Ge?r.SUBSCRIBE_OPTIONS_RH[Ge]:0),_=ee.write(o.from([Ue]))}return _}function L(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.messageId,Z=B.granted,ue=B.properties;let G=0;if(typeof X!="number")return ee.emit("error",new Error("Invalid messageId")),!1;if(G+=2,typeof Z=="object"&&Z.length)for(let I=0;I<Z.length;I+=1){if(typeof Z[I]!="number")return ee.emit("error",new Error("Invalid qos vector")),!1;G+=1}else return ee.emit("error",new Error("Invalid qos vector")),!1;let U=null;if(M===5){if(U=ce(ee,ue,j,G),!U)return!1;G+=U.length}return ee.write(r.SUBACK_HEADER),te(ee,G),y(ee,X),U!==null&&U.write(),ee.write(o.from(Z))}function S(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.messageId,Z=B.dup?r.DUP_MASK:0,ue=B.unsubscriptions,G=B.properties;let U=0;if(typeof X!="number")return ee.emit("error",new Error("Invalid messageId")),!1;if(U+=2,typeof ue=="object"&&ue.length)for(let P=0;P<ue.length;P+=1){if(typeof ue[P]!="string")return ee.emit("error",new Error("Invalid unsubscriptions")),!1;U+=o.byteLength(ue[P])+2}else return ee.emit("error",new Error("Invalid unsubscriptions")),!1;let I=null;if(M===5){if(I=se(ee,G),!I)return!1;U+=I.length}ee.write(r.UNSUBSCRIBE_HEADER[1][Z?1:0][0]),te(ee,U),y(ee,X),I!==null&&I.write();let _=!0;for(let P=0;P<ue.length;P++)_=F(ee,ue[P]);return _}function x(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.messageId,Z=B.dup?r.DUP_MASK:0,ue=B.granted,G=B.properties,U=B.cmd,I=0;let _=2;if(typeof X!="number")return ee.emit("error",new Error("Invalid messageId")),!1;if(M===5)if(typeof ue=="object"&&ue.length)for(let $=0;$<ue.length;$+=1){if(typeof ue[$]!="number")return ee.emit("error",new Error("Invalid qos vector")),!1;_+=1}else return ee.emit("error",new Error("Invalid qos vector")),!1;let P=null;if(M===5){if(P=ce(ee,G,j,_),!P)return!1;_+=P.length}return ee.write(r.ACKS[U][I][Z][0]),te(ee,_),y(ee,X),P!==null&&P.write(),M===5&&ee.write(o.from(ue)),!0}function T(ie,ee,j){return ee.write(r.EMPTY[ie.cmd])}function H(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.reasonCode,Z=B.properties;let ue=M===5?1:0,G=null;if(M===5){if(G=ce(ee,Z,j,ue),!G)return!1;ue+=G.length}return ee.write(o.from([r.codes.disconnect<<4])),te(ee,ue),M===5&&ee.write(o.from([X])),G!==null&&G.write(),!0}function Y(ie,ee,j){const M=j?j.protocolVersion:4,B=ie||{},X=B.reasonCode,Z=B.properties;let ue=M===5?1:0;M!==5&&ee.emit("error",new Error("Invalid mqtt version for auth packet"));const G=ce(ee,Z,j,ue);return G?(ue+=G.length,ee.write(o.from([r.codes.auth<<4])),te(ee,ue),ee.write(o.from([X])),G!==null&&G.write(),!0):!1}const Q={};function te(ie,ee){if(ee>r.VARBYTEINT_MAX)return ie.emit("error",new Error(`Invalid variable byte integer: ${ee}`)),!1;let j=Q[ee];return j||(j=p(ee),ee<16384&&(Q[ee]=j)),d("writeVarByteInt: writing to stream: %o",j),ie.write(j)}function F(ie,ee){const j=o.byteLength(ee);return y(ie,j),d("writeString: %s",ee),ie.write(ee,"utf8")}function k(ie,ee,j){F(ie,ee),F(ie,j)}function q(ie,ee){return d("writeNumberCached: number: %d",ee),d("writeNumberCached: %o",h[ee]),ie.write(h[ee])}function V(ie,ee){const j=f(ee);return d("writeNumberGenerated: %o",j),ie.write(j)}function J(ie,ee){const j=v(ee);return d("write4ByteNumber: %o",j),ie.write(j)}function ae(ie,ee){typeof ee=="string"?F(ie,ee):ee?(y(ie,ee.length),ie.write(ee)):y(ie,0)}function se(ie,ee){if(typeof ee!="object"||ee.length!=null)return{length:1,write(){K(ie,{},0)}};let j=0;function M(X,Z){const ue=r.propertiesTypes[X];let G=0;switch(ue){case"byte":{if(typeof Z!="boolean")return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+1;break}case"int8":{if(typeof Z!="number"||Z<0||Z>255)return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+1;break}case"binary":{if(Z&&Z===null)return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+o.byteLength(Z)+2;break}case"int16":{if(typeof Z!="number"||Z<0||Z>65535)return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+2;break}case"int32":{if(typeof Z!="number"||Z<0||Z>4294967295)return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+4;break}case"var":{if(typeof Z!="number"||Z<0||Z>268435455)return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+o.byteLength(p(Z));break}case"string":{if(typeof Z!="string")return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=1+2+o.byteLength(Z.toString());break}case"pair":{if(typeof Z!="object")return ie.emit("error",new Error(`Invalid ${X}: ${Z}`)),!1;G+=Object.getOwnPropertyNames(Z).reduce((U,I)=>{const _=Z[I];return Array.isArray(_)?U+=_.reduce((P,$)=>(P+=1+2+o.byteLength(I.toString())+2+o.byteLength($.toString()),P),0):U+=1+2+o.byteLength(I.toString())+2+o.byteLength(Z[I].toString()),U},0);break}default:return ie.emit("error",new Error(`Invalid property ${X}: ${Z}`)),!1}return G}if(ee)for(const X in ee){let Z=0,ue=0;const G=ee[X];if(Array.isArray(G))for(let U=0;U<G.length;U++){if(ue=M(X,G[U]),!ue)return!1;Z+=ue}else{if(ue=M(X,G),!ue)return!1;Z=ue}if(!Z)return!1;j+=Z}return{length:o.byteLength(p(j))+j,write(){K(ie,ee,j)}}}function ce(ie,ee,j,M){const B=["reasonString","userProperties"],X=j&&j.properties&&j.properties.maximumPacketSize?j.properties.maximumPacketSize:0;let Z=se(ie,ee);if(X)for(;M+Z.length>X;){const ue=B.shift();if(ue&&ee[ue])delete ee[ue],Z=se(ie,ee);else return!1}return Z}function re(ie,ee,j){switch(r.propertiesTypes[ee]){case"byte":{ie.write(o.from([r.properties[ee]])),ie.write(o.from([+j]));break}case"int8":{ie.write(o.from([r.properties[ee]])),ie.write(o.from([j]));break}case"binary":{ie.write(o.from([r.properties[ee]])),ae(ie,j);break}case"int16":{ie.write(o.from([r.properties[ee]])),y(ie,j);break}case"int32":{ie.write(o.from([r.properties[ee]])),J(ie,j);break}case"var":{ie.write(o.from([r.properties[ee]])),te(ie,j);break}case"string":{ie.write(o.from([r.properties[ee]])),F(ie,j);break}case"pair":{Object.getOwnPropertyNames(j).forEach(B=>{const X=j[B];Array.isArray(X)?X.forEach(Z=>{ie.write(o.from([r.properties[ee]])),k(ie,B.toString(),Z.toString())}):(ie.write(o.from([r.properties[ee]])),k(ie,B.toString(),X.toString()))});break}default:return ie.emit("error",new Error(`Invalid property ${ee} value: ${j}`)),!1}}function K(ie,ee,j){te(ie,j);for(const M in ee)if(Object.prototype.hasOwnProperty.call(ee,M)&&ee[M]!==null){const B=ee[M];if(Array.isArray(B))for(let X=0;X<B.length;X++)re(ie,M,B[X]);else re(ie,M,B)}}function he(ie){return ie?ie instanceof o?ie.length:o.byteLength(ie):0}function ne(ie){return typeof ie=="string"||ie instanceof o}n.exports=m}).call(this)}).call(this,t("buffer").Buffer)},{"./constants":38,"./numbers":41,buffer:17,debug:18,"process-nextick-args":49}],45:[function(t,n,s){var o=1e3,r=o*60,a=r*60,l=a*24,c=l*7,u=l*365.25;n.exports=function(p,v){v=v||{};var y=typeof p;if(y==="string"&&p.length>0)return d(p);if(y==="number"&&isFinite(p))return v.long?f(p):h(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function d(p){if(p=String(p),!(p.length>100)){var v=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(v){var y=parseFloat(v[1]),C=(v[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return y*u;case"weeks":case"week":case"w":return y*c;case"days":case"day":case"d":return y*l;case"hours":case"hour":case"hrs":case"hr":case"h":return y*a;case"minutes":case"minute":case"mins":case"min":case"m":return y*r;case"seconds":case"second":case"secs":case"sec":case"s":return y*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function h(p){var v=Math.abs(p);return v>=l?Math.round(p/l)+"d":v>=a?Math.round(p/a)+"h":v>=r?Math.round(p/r)+"m":v>=o?Math.round(p/o)+"s":p+"ms"}function f(p){var v=Math.abs(p);return v>=l?g(p,v,l,"day"):v>=a?g(p,v,a,"hour"):v>=r?g(p,v,r,"minute"):v>=o?g(p,v,o,"second"):p+" ms"}function g(p,v,y,C){var m=v>=y*1.5;return Math.round(p/y)+" "+C+(m?"s":"")}},{}],46:[function(t,n,s){const o=t("./lib/number-allocator.js");n.exports.NumberAllocator=o},{"./lib/number-allocator.js":47}],47:[function(t,n,s){const o=t("js-sdsl").Set,r=t("debug")("number-allocator:trace"),a=t("debug")("number-allocator:error");function l(u,d){this.low=u,this.high=d}l.prototype.equals=function(u){return this.low===u.low&&this.high===u.high},l.prototype.compare=function(u){return this.low<u.low&&this.high<u.low?-1:u.low<this.low&&u.high<this.low?1:0};function c(u,d){if(!(this instanceof c))return new c(u,d);this.min=u,this.max=d,this.ss=new o([],(h,f)=>h.compare(f)),r("Create"),this.clear()}c.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},c.prototype.alloc=function(){if(this.ss.size()===0)return r("alloc():empty"),null;const u=this.ss.front(),d=u.low;return d+1<=u.high?++u.low:this.ss.eraseElementByPos(0),r("alloc():"+d),d},c.prototype.use=function(u){const d=new l(u,u),h=this.ss.lowerBound(d);if(h){if(h.equals(d))return this.ss.eraseElementByValue(h),r("use():"+u),!0;if(h.low>u)return!1;if(h.low===u)return++h.low,r("use():"+u),!0;if(h.high===u)return--h.high,r("use():"+u),!0;const f=h.low;return h.low=u+1,this.ss.insert(new l(f,u-1)),r("use():"+u),!0}return r("use():failed"),!1},c.prototype.free=function(u){if(u<this.min||u>this.max){a("free():"+u+" is out of range");return}const d=new l(u,u),h=this.ss.lowerBound(d);if(h){if(h.low<=u&&u<=h.high){a("free():"+u+" has already been vacant");return}if(h===this.ss.front())u+1===h.low?--h.low:this.ss.insert(d);else{const f=this.ss.reverseLowerBound(d);f.high+1===u?u+1===h.low?(this.ss.eraseElementByValue(f),h.low=f.low):f.high=u:u+1===h.low?h.low=u:this.ss.insert(d)}}else{if(h===this.ss.front()){this.ss.insert(d);return}const f=this.ss.reverseLowerBound(d);f.high+1===u?f.high=u:this.ss.insert(d)}r("free():"+u)},c.prototype.clear=function(){r("clear()"),this.ss.clear(),this.ss.insert(new l(this.min,this.max))},c.prototype.intervalCount=function(){return this.ss.size()},c.prototype.dump=function(){console.log("length:"+this.ss.size());for(const u of this.ss)console.log(u)},n.exports=c},{debug:18,"js-sdsl":36}],48:[function(t,n,s){var o=t("wrappy");n.exports=o(r),n.exports.strict=o(a),r.proto=r(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return a(this)},configurable:!0})});function r(l){var c=function(){return c.called?c.value:(c.called=!0,c.value=l.apply(this,arguments))};return c.called=!1,c}function a(l){var c=function(){if(c.called)throw new Error(c.onceError);return c.called=!0,c.value=l.apply(this,arguments)},u=l.name||"Function wrapped with `once`";return c.onceError=u+" shouldn't be called more than once",c.called=!1,c}},{wrappy:79}],49:[function(t,n,s){(function(o){(function(){typeof o>"u"||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?n.exports={nextTick:r}:n.exports=o;function r(a,l,c,u){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var d=arguments.length,h,f;switch(d){case 0:case 1:return o.nextTick(a);case 2:return o.nextTick(function(){a.call(null,l)});case 3:return o.nextTick(function(){a.call(null,l,c)});case 4:return o.nextTick(function(){a.call(null,l,c,u)});default:for(h=new Array(d-1),f=0;f<h.length;)h[f++]=arguments[f];return o.nextTick(function(){a.apply(null,h)})}}}).call(this)}).call(this,t("_process"))},{_process:50}],50:[function(t,n,s){var o=n.exports={},r,a;function l(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?r=setTimeout:r=l}catch{r=l}try{typeof clearTimeout=="function"?a=clearTimeout:a=c}catch{a=c}})();function u(w){if(r===setTimeout)return setTimeout(w,0);if((r===l||!r)&&setTimeout)return r=setTimeout,setTimeout(w,0);try{return r(w,0)}catch{try{return r.call(null,w,0)}catch{return r.call(this,w,0)}}}function d(w){if(a===clearTimeout)return clearTimeout(w);if((a===c||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(w);try{return a(w)}catch{try{return a.call(null,w)}catch{return a.call(this,w)}}}var h=[],f=!1,g,p=-1;function v(){!f||!g||(f=!1,g.length?h=g.concat(h):p=-1,h.length&&y())}function y(){if(!f){var w=u(v);f=!0;for(var E=h.length;E;){for(g=h,h=[];++p<E;)g&&g[p].run();p=-1,E=h.length}g=null,f=!1,d(w)}}o.nextTick=function(w){var E=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)E[R-1]=arguments[R];h.push(new C(w,E)),h.length===1&&!f&&u(y)};function C(w,E){this.fun=w,this.array=E}C.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function m(){}o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(w){return[]},o.binding=function(w){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(w){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],51:[function(t,n,s){(function(o){(function(){(function(r){var a=typeof s=="object"&&s&&!s.nodeType&&s,l=typeof n=="object"&&n&&!n.nodeType&&n,c=typeof o=="object"&&o;(c.global===c||c.window===c||c.self===c)&&(r=c);var u,d=2147483647,h=36,f=1,g=26,p=38,v=700,y=72,C=128,m="-",w=/^xn--/,E=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-f,D=Math.floor,L=String.fromCharCode,S;function x(se){throw new RangeError(O[se])}function T(se,ce){for(var re=se.length,K=[];re--;)K[re]=ce(se[re]);return K}function H(se,ce){var re=se.split("@"),K="";re.length>1&&(K=re[0]+"@",se=re[1]),se=se.replace(R,".");var he=se.split("."),ne=T(he,ce).join(".");return K+ne}function Y(se){for(var ce=[],re=0,K=se.length,he,ne;re<K;)he=se.charCodeAt(re++),he>=55296&&he<=56319&&re<K?(ne=se.charCodeAt(re++),(ne&64512)==56320?ce.push(((he&1023)<<10)+(ne&1023)+65536):(ce.push(he),re--)):ce.push(he);return ce}function Q(se){return T(se,function(ce){var re="";return ce>65535&&(ce-=65536,re+=L(ce>>>10&1023|55296),ce=56320|ce&1023),re+=L(ce),re}).join("")}function te(se){return se-48<10?se-22:se-65<26?se-65:se-97<26?se-97:h}function F(se,ce){return se+22+75*(se<26)-((ce!=0)<<5)}function k(se,ce,re){var K=0;for(se=re?D(se/v):se>>1,se+=D(se/ce);se>A*g>>1;K+=h)se=D(se/A);return D(K+(A+1)*se/(se+p))}function q(se){var ce=[],re=se.length,K,he=0,ne=C,ie=y,ee,j,M,B,X,Z,ue,G,U;for(ee=se.lastIndexOf(m),ee<0&&(ee=0),j=0;j<ee;++j)se.charCodeAt(j)>=128&&x("not-basic"),ce.push(se.charCodeAt(j));for(M=ee>0?ee+1:0;M<re;){for(B=he,X=1,Z=h;M>=re&&x("invalid-input"),ue=te(se.charCodeAt(M++)),(ue>=h||ue>D((d-he)/X))&&x("overflow"),he+=ue*X,G=Z<=ie?f:Z>=ie+g?g:Z-ie,!(ue<G);Z+=h)U=h-G,X>D(d/U)&&x("overflow"),X*=U;K=ce.length+1,ie=k(he-B,K,B==0),D(he/K)>d-ne&&x("overflow"),ne+=D(he/K),he%=K,ce.splice(he++,0,ne)}return Q(ce)}function V(se){var ce,re,K,he,ne,ie,ee,j,M,B,X,Z=[],ue,G,U,I;for(se=Y(se),ue=se.length,ce=C,re=0,ne=y,ie=0;ie<ue;++ie)X=se[ie],X<128&&Z.push(L(X));for(K=he=Z.length,he&&Z.push(m);K<ue;){for(ee=d,ie=0;ie<ue;++ie)X=se[ie],X>=ce&&X<ee&&(ee=X);for(G=K+1,ee-ce>D((d-re)/G)&&x("overflow"),re+=(ee-ce)*G,ce=ee,ie=0;ie<ue;++ie)if(X=se[ie],X<ce&&++re>d&&x("overflow"),X==ce){for(j=re,M=h;B=M<=ne?f:M>=ne+g?g:M-ne,!(j<B);M+=h)I=j-B,U=h-B,Z.push(L(F(B+I%U,0))),j=D(I/U);Z.push(L(F(j,0))),ne=k(re,G,K==he),re=0,++K}++re,++ce}return Z.join("")}function J(se){return H(se,function(ce){return w.test(ce)?q(ce.slice(4).toLowerCase()):ce})}function ae(se){return H(se,function(ce){return E.test(ce)?"xn--"+V(ce):ce})}if(u={version:"1.4.1",ucs2:{decode:Y,encode:Q},decode:q,encode:V,toASCII:ae,toUnicode:J},a&&l)if(n.exports==a)l.exports=u;else for(S in u)u.hasOwnProperty(S)&&(a[S]=u[S]);else r.punycode=u})(this)}).call(this)}).call(this,typeof vo<"u"?vo:typeof self<"u"?self:typeof window<"u"?window:{})},{}],52:[function(t,n,s){function o(a,l){return Object.prototype.hasOwnProperty.call(a,l)}n.exports=function(a,l,c,u){l=l||"&",c=c||"=";var d={};if(typeof a!="string"||a.length===0)return d;var h=/\+/g;a=a.split(l);var f=1e3;u&&typeof u.maxKeys=="number"&&(f=u.maxKeys);var g=a.length;f>0&&g>f&&(g=f);for(var p=0;p<g;++p){var v=a[p].replace(h,"%20"),y=v.indexOf(c),C,m,w,E;y>=0?(C=v.substr(0,y),m=v.substr(y+1)):(C=v,m=""),w=decodeURIComponent(C),E=decodeURIComponent(m),o(d,w)?r(d[w])?d[w].push(E):d[w]=[d[w],E]:d[w]=E}return d};var r=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}},{}],53:[function(t,n,s){var o=function(c){switch(typeof c){case"string":return c;case"boolean":return c?"true":"false";case"number":return isFinite(c)?c:"";default:return""}};n.exports=function(c,u,d,h){return u=u||"&",d=d||"=",c===null&&(c=void 0),typeof c=="object"?a(l(c),function(f){var g=encodeURIComponent(o(f))+d;return r(c[f])?a(c[f],function(p){return g+encodeURIComponent(o(p))}).join(u):g+encodeURIComponent(o(c[f]))}).join(u):h?encodeURIComponent(o(h))+d+encodeURIComponent(o(c)):""};var r=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"};function a(c,u){if(c.map)return c.map(u);for(var d=[],h=0;h<c.length;h++)d.push(u(c[h],h));return d}var l=Object.keys||function(c){var u=[];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&u.push(d);return u}},{}],54:[function(t,n,s){s.decode=s.parse=t("./decode"),s.encode=s.stringify=t("./encode")},{"./decode":52,"./encode":53}],55:[function(t,n,s){function o(h,f){h.prototype=Object.create(f.prototype),h.prototype.constructor=h,h.__proto__=f}var r={};function a(h,f,g){g||(g=Error);function p(y,C,m){return typeof f=="string"?f:f(y,C,m)}var v=function(y){o(C,y);function C(m,w,E){return y.call(this,p(m,w,E))||this}return C}(g);v.prototype.name=g.name,v.prototype.code=h,r[h]=v}function l(h,f){if(Array.isArray(h)){var g=h.length;return h=h.map(function(p){return String(p)}),g>2?"one of ".concat(f," ").concat(h.slice(0,g-1).join(", "),", or ")+h[g-1]:g===2?"one of ".concat(f," ").concat(h[0]," or ").concat(h[1]):"of ".concat(f," ").concat(h[0])}else return"of ".concat(f," ").concat(String(h))}function c(h,f,g){return h.substr(!g||g<0?0:+g,f.length)===f}function u(h,f,g){return(g===void 0||g>h.length)&&(g=h.length),h.substring(g-f.length,g)===f}function d(h,f,g){return typeof g!="number"&&(g=0),g+f.length>h.length?!1:h.indexOf(f,g)!==-1}a("ERR_INVALID_OPT_VALUE",function(h,f){return'The value "'+f+'" is invalid for option "'+h+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(h,f,g){var p;typeof f=="string"&&c(f,"not ")?(p="must not be",f=f.replace(/^not /,"")):p="must be";var v;if(u(h," argument"))v="The ".concat(h," ").concat(p," ").concat(l(f,"type"));else{var y=d(h,".")?"property":"argument";v='The "'.concat(h,'" ').concat(y," ").concat(p," ").concat(l(f,"type"))}return v+=". Received type ".concat(typeof g),v},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),n.exports.codes=r},{}],56:[function(t,n,s){(function(o){(function(){var r=Object.keys||function(p){var v=[];for(var y in p)v.push(y);return v};n.exports=h;var a=t("./_stream_readable"),l=t("./_stream_writable");t("inherits")(h,a);for(var c=r(l.prototype),u=0;u<c.length;u++){var d=c[u];h.prototype[d]||(h.prototype[d]=l.prototype[d])}function h(p){if(!(this instanceof h))return new h(p);a.call(this,p),l.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(h.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(){this._writableState.ended||o.nextTick(g,this)}function g(p){p.end()}Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":58,"./_stream_writable":60,_process:50,inherits:24}],57:[function(t,n,s){n.exports=r;var o=t("./_stream_transform");t("inherits")(r,o);function r(a){if(!(this instanceof r))return new r(a);o.call(this,a)}r.prototype._transform=function(a,l,c){c(null,a)}},{"./_stream_transform":59,inherits:24}],58:[function(t,n,s){(function(o,r){(function(){n.exports=Q;var a;Q.ReadableState=Y,t("events").EventEmitter;var l=function(U,I){return U.listeners(I).length},c=t("./internal/streams/stream"),u=t("buffer").Buffer,d=r.Uint8Array||function(){};function h(G){return u.from(G)}function f(G){return u.isBuffer(G)||G instanceof d}var g=t("util"),p;g&&g.debuglog?p=g.debuglog("stream"):p=function(){};var v=t("./internal/streams/buffer_list"),y=t("./internal/streams/destroy"),C=t("./internal/streams/state"),m=C.getHighWaterMark,w=t("../errors").codes,E=w.ERR_INVALID_ARG_TYPE,R=w.ERR_STREAM_PUSH_AFTER_EOF,O=w.ERR_METHOD_NOT_IMPLEMENTED,A=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,D,L,S;t("inherits")(Q,c);var x=y.errorOrDestroy,T=["error","close","destroy","pause","resume"];function H(G,U,I){if(typeof G.prependListener=="function")return G.prependListener(U,I);!G._events||!G._events[U]?G.on(U,I):Array.isArray(G._events[U])?G._events[U].unshift(I):G._events[U]=[I,G._events[U]]}function Y(G,U,I){a=a||t("./_stream_duplex"),G=G||{},typeof I!="boolean"&&(I=U instanceof a),this.objectMode=!!G.objectMode,I&&(this.objectMode=this.objectMode||!!G.readableObjectMode),this.highWaterMark=m(this,G,"readableHighWaterMark",I),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.destroyed=!1,this.defaultEncoding=G.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,G.encoding&&(D||(D=t("string_decoder/").StringDecoder),this.decoder=new D(G.encoding),this.encoding=G.encoding)}function Q(G){if(a=a||t("./_stream_duplex"),!(this instanceof Q))return new Q(G);var U=this instanceof a;this._readableState=new Y(G,this,U),this.readable=!0,G&&(typeof G.read=="function"&&(this._read=G.read),typeof G.destroy=="function"&&(this._destroy=G.destroy)),c.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(U){this._readableState&&(this._readableState.destroyed=U)}}),Q.prototype.destroy=y.destroy,Q.prototype._undestroy=y.undestroy,Q.prototype._destroy=function(G,U){U(G)},Q.prototype.push=function(G,U){var I=this._readableState,_;return I.objectMode?_=!0:typeof G=="string"&&(U=U||I.defaultEncoding,U!==I.encoding&&(G=u.from(G,U),U=""),_=!0),te(this,G,U,!1,_)},Q.prototype.unshift=function(G){return te(this,G,null,!0,!1)};function te(G,U,I,_,P){p("readableAddChunk",U);var $=G._readableState;if(U===null)$.reading=!1,ae(G,$);else{var le;if(P||(le=k($,U)),le)x(G,le);else if($.objectMode||U&&U.length>0)if(typeof U!="string"&&!$.objectMode&&Object.getPrototypeOf(U)!==u.prototype&&(U=h(U)),_)$.endEmitted?x(G,new A):F(G,$,U,!0);else if($.ended)x(G,new R);else{if($.destroyed)return!1;$.reading=!1,$.decoder&&!I?(U=$.decoder.write(U),$.objectMode||U.length!==0?F(G,$,U,!1):re(G,$)):F(G,$,U,!1)}else _||($.reading=!1,re(G,$))}return!$.ended&&($.length<$.highWaterMark||$.length===0)}function F(G,U,I,_){U.flowing&&U.length===0&&!U.sync?(U.awaitDrain=0,G.emit("data",I)):(U.length+=U.objectMode?1:I.length,_?U.buffer.unshift(I):U.buffer.push(I),U.needReadable&&se(G)),re(G,U)}function k(G,U){var I;return!f(U)&&typeof U!="string"&&U!==void 0&&!G.objectMode&&(I=new E("chunk",["string","Buffer","Uint8Array"],U)),I}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(G){D||(D=t("string_decoder/").StringDecoder);var U=new D(G);this._readableState.decoder=U,this._readableState.encoding=this._readableState.decoder.encoding;for(var I=this._readableState.buffer.head,_="";I!==null;)_+=U.write(I.data),I=I.next;return this._readableState.buffer.clear(),_!==""&&this._readableState.buffer.push(_),this._readableState.length=_.length,this};var q=1073741824;function V(G){return G>=q?G=q:(G--,G|=G>>>1,G|=G>>>2,G|=G>>>4,G|=G>>>8,G|=G>>>16,G++),G}function J(G,U){return G<=0||U.length===0&&U.ended?0:U.objectMode?1:G!==G?U.flowing&&U.length?U.buffer.head.data.length:U.length:(G>U.highWaterMark&&(U.highWaterMark=V(G)),G<=U.length?G:U.ended?U.length:(U.needReadable=!0,0))}Q.prototype.read=function(G){p("read",G),G=parseInt(G,10);var U=this._readableState,I=G;if(G!==0&&(U.emittedReadable=!1),G===0&&U.needReadable&&((U.highWaterMark!==0?U.length>=U.highWaterMark:U.length>0)||U.ended))return p("read: emitReadable",U.length,U.ended),U.length===0&&U.ended?X(this):se(this),null;if(G=J(G,U),G===0&&U.ended)return U.length===0&&X(this),null;var _=U.needReadable;p("need readable",_),(U.length===0||U.length-G<U.highWaterMark)&&(_=!0,p("length less than watermark",_)),U.ended||U.reading?(_=!1,p("reading or ended",_)):_&&(p("do read"),U.reading=!0,U.sync=!0,U.length===0&&(U.needReadable=!0),this._read(U.highWaterMark),U.sync=!1,U.reading||(G=J(I,U)));var P;return G>0?P=B(G,U):P=null,P===null?(U.needReadable=U.length<=U.highWaterMark,G=0):(U.length-=G,U.awaitDrain=0),U.length===0&&(U.ended||(U.needReadable=!0),I!==G&&U.ended&&X(this)),P!==null&&this.emit("data",P),P};function ae(G,U){if(p("onEofChunk"),!U.ended){if(U.decoder){var I=U.decoder.end();I&&I.length&&(U.buffer.push(I),U.length+=U.objectMode?1:I.length)}U.ended=!0,U.sync?se(G):(U.needReadable=!1,U.emittedReadable||(U.emittedReadable=!0,ce(G)))}}function se(G){var U=G._readableState;p("emitReadable",U.needReadable,U.emittedReadable),U.needReadable=!1,U.emittedReadable||(p("emitReadable",U.flowing),U.emittedReadable=!0,o.nextTick(ce,G))}function ce(G){var U=G._readableState;p("emitReadable_",U.destroyed,U.length,U.ended),!U.destroyed&&(U.length||U.ended)&&(G.emit("readable"),U.emittedReadable=!1),U.needReadable=!U.flowing&&!U.ended&&U.length<=U.highWaterMark,M(G)}function re(G,U){U.readingMore||(U.readingMore=!0,o.nextTick(K,G,U))}function K(G,U){for(;!U.reading&&!U.ended&&(U.length<U.highWaterMark||U.flowing&&U.length===0);){var I=U.length;if(p("maybeReadMore read 0"),G.read(0),I===U.length)break}U.readingMore=!1}Q.prototype._read=function(G){x(this,new O("_read()"))},Q.prototype.pipe=function(G,U){var I=this,_=this._readableState;switch(_.pipesCount){case 0:_.pipes=G;break;case 1:_.pipes=[_.pipes,G];break;default:_.pipes.push(G);break}_.pipesCount+=1,p("pipe count=%d opts=%j",_.pipesCount,U);var P=(!U||U.end!==!1)&&G!==o.stdout&&G!==o.stderr,$=P?pe:Tn;_.endEmitted?o.nextTick($):I.once("end",$),G.on("unpipe",le);function le(hs,wi){p("onunpipe"),hs===I&&wi&&wi.hasUnpiped===!1&&(wi.hasUnpiped=!0,Ue())}function pe(){p("onend"),G.end()}var ve=he(I);G.on("drain",ve);var Ge=!1;function Ue(){p("cleanup"),G.removeListener("close",Et),G.removeListener("finish",Hs),G.removeListener("drain",ve),G.removeListener("error",At),G.removeListener("unpipe",le),I.removeListener("end",pe),I.removeListener("end",Tn),I.removeListener("data",et),Ge=!0,_.awaitDrain&&(!G._writableState||G._writableState.needDrain)&&ve()}I.on("data",et);function et(hs){p("ondata");var wi=G.write(hs);p("dest.write",wi),wi===!1&&((_.pipesCount===1&&_.pipes===G||_.pipesCount>1&&ue(_.pipes,G)!==-1)&&!Ge&&(p("false write response, pause",_.awaitDrain),_.awaitDrain++),I.pause())}function At(hs){p("onerror",hs),Tn(),G.removeListener("error",At),l(G,"error")===0&&x(G,hs)}H(G,"error",At);function Et(){G.removeListener("finish",Hs),Tn()}G.once("close",Et);function Hs(){p("onfinish"),G.removeListener("close",Et),Tn()}G.once("finish",Hs);function Tn(){p("unpipe"),I.unpipe(G)}return G.emit("pipe",I),_.flowing||(p("pipe resume"),I.resume()),G};function he(G){return function(){var I=G._readableState;p("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&l(G,"data")&&(I.flowing=!0,M(G))}}Q.prototype.unpipe=function(G){var U=this._readableState,I={hasUnpiped:!1};if(U.pipesCount===0)return this;if(U.pipesCount===1)return G&&G!==U.pipes?this:(G||(G=U.pipes),U.pipes=null,U.pipesCount=0,U.flowing=!1,G&&G.emit("unpipe",this,I),this);if(!G){var _=U.pipes,P=U.pipesCount;U.pipes=null,U.pipesCount=0,U.flowing=!1;for(var $=0;$<P;$++)_[$].emit("unpipe",this,{hasUnpiped:!1});return this}var le=ue(U.pipes,G);return le===-1?this:(U.pipes.splice(le,1),U.pipesCount-=1,U.pipesCount===1&&(U.pipes=U.pipes[0]),G.emit("unpipe",this,I),this)},Q.prototype.on=function(G,U){var I=c.prototype.on.call(this,G,U),_=this._readableState;return G==="data"?(_.readableListening=this.listenerCount("readable")>0,_.flowing!==!1&&this.resume()):G==="readable"&&!_.endEmitted&&!_.readableListening&&(_.readableListening=_.needReadable=!0,_.flowing=!1,_.emittedReadable=!1,p("on readable",_.length,_.reading),_.length?se(this):_.reading||o.nextTick(ie,this)),I},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(G,U){var I=c.prototype.removeListener.call(this,G,U);return G==="readable"&&o.nextTick(ne,this),I},Q.prototype.removeAllListeners=function(G){var U=c.prototype.removeAllListeners.apply(this,arguments);return(G==="readable"||G===void 0)&&o.nextTick(ne,this),U};function ne(G){var U=G._readableState;U.readableListening=G.listenerCount("readable")>0,U.resumeScheduled&&!U.paused?U.flowing=!0:G.listenerCount("data")>0&&G.resume()}function ie(G){p("readable nexttick read 0"),G.read(0)}Q.prototype.resume=function(){var G=this._readableState;return G.flowing||(p("resume"),G.flowing=!G.readableListening,ee(this,G)),G.paused=!1,this};function ee(G,U){U.resumeScheduled||(U.resumeScheduled=!0,o.nextTick(j,G,U))}function j(G,U){p("resume",U.reading),U.reading||G.read(0),U.resumeScheduled=!1,G.emit("resume"),M(G),U.flowing&&!U.reading&&G.read(0)}Q.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function M(G){var U=G._readableState;for(p("flow",U.flowing);U.flowing&&G.read()!==null;);}Q.prototype.wrap=function(G){var U=this,I=this._readableState,_=!1;G.on("end",function(){if(p("wrapped end"),I.decoder&&!I.ended){var le=I.decoder.end();le&&le.length&&U.push(le)}U.push(null)}),G.on("data",function(le){if(p("wrapped data"),I.decoder&&(le=I.decoder.write(le)),!(I.objectMode&&le==null)&&!(!I.objectMode&&(!le||!le.length))){var pe=U.push(le);pe||(_=!0,G.pause())}});for(var P in G)this[P]===void 0&&typeof G[P]=="function"&&(this[P]=function(pe){return function(){return G[pe].apply(G,arguments)}}(P));for(var $=0;$<T.length;$++)G.on(T[$],this.emit.bind(this,T[$]));return this._read=function(le){p("wrapped _read",le),_&&(_=!1,G.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return L===void 0&&(L=t("./internal/streams/async_iterator")),L(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(U){this._readableState&&(this._readableState.flowing=U)}}),Q._fromList=B,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function B(G,U){if(U.length===0)return null;var I;return U.objectMode?I=U.buffer.shift():!G||G>=U.length?(U.decoder?I=U.buffer.join(""):U.buffer.length===1?I=U.buffer.first():I=U.buffer.concat(U.length),U.buffer.clear()):I=U.buffer.consume(G,U.decoder),I}function X(G){var U=G._readableState;p("endReadable",U.endEmitted),U.endEmitted||(U.ended=!0,o.nextTick(Z,U,G))}function Z(G,U){if(p("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&G.length===0&&(G.endEmitted=!0,U.readable=!1,U.emit("end"),G.autoDestroy)){var I=U._writableState;(!I||I.autoDestroy&&I.finished)&&U.destroy()}}typeof Symbol=="function"&&(Q.from=function(G,U){return S===void 0&&(S=t("./internal/streams/from")),S(Q,G,U)});function ue(G,U){for(var I=0,_=G.length;I<_;I++)if(G[I]===U)return I;return-1}}).call(this)}).call(this,t("_process"),typeof vo<"u"?vo:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/async_iterator":61,"./internal/streams/buffer_list":62,"./internal/streams/destroy":63,"./internal/streams/from":65,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,events:22,inherits:24,"string_decoder/":75,util:16}],59:[function(t,n,s){n.exports=h;var o=t("../errors").codes,r=o.ERR_METHOD_NOT_IMPLEMENTED,a=o.ERR_MULTIPLE_CALLBACK,l=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,c=o.ERR_TRANSFORM_WITH_LENGTH_0,u=t("./_stream_duplex");t("inherits")(h,u);function d(p,v){var y=this._transformState;y.transforming=!1;var C=y.writecb;if(C===null)return this.emit("error",new a);y.writechunk=null,y.writecb=null,v!=null&&this.push(v),C(p);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function h(p){if(!(this instanceof h))return new h(p);u.call(this,p),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",f)}function f(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(v,y){g(p,v,y)}):g(this,null,null)}h.prototype.push=function(p,v){return this._transformState.needTransform=!1,u.prototype.push.call(this,p,v)},h.prototype._transform=function(p,v,y){y(new r("_transform()"))},h.prototype._write=function(p,v,y){var C=this._transformState;if(C.writecb=y,C.writechunk=p,C.writeencoding=v,!C.transforming){var m=this._readableState;(C.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},h.prototype._read=function(p){var v=this._transformState;v.writechunk!==null&&!v.transforming?(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform)):v.needTransform=!0},h.prototype._destroy=function(p,v){u.prototype._destroy.call(this,p,function(y){v(y)})};function g(p,v,y){if(v)return p.emit("error",v);if(y!=null&&p.push(y),p._writableState.length)throw new c;if(p._transformState.transforming)throw new l;return p.push(null)}},{"../errors":55,"./_stream_duplex":56,inherits:24}],60:[function(t,n,s){(function(o,r){(function(){n.exports=Y;function a(M){var B=this;this.next=null,this.entry=null,this.finish=function(){j(B,M)}}var l;Y.WritableState=T;var c={deprecate:t("util-deprecate")},u=t("./internal/streams/stream"),d=t("buffer").Buffer,h=r.Uint8Array||function(){};function f(M){return d.from(M)}function g(M){return d.isBuffer(M)||M instanceof h}var p=t("./internal/streams/destroy"),v=t("./internal/streams/state"),y=v.getHighWaterMark,C=t("../errors").codes,m=C.ERR_INVALID_ARG_TYPE,w=C.ERR_METHOD_NOT_IMPLEMENTED,E=C.ERR_MULTIPLE_CALLBACK,R=C.ERR_STREAM_CANNOT_PIPE,O=C.ERR_STREAM_DESTROYED,A=C.ERR_STREAM_NULL_VALUES,D=C.ERR_STREAM_WRITE_AFTER_END,L=C.ERR_UNKNOWN_ENCODING,S=p.errorOrDestroy;t("inherits")(Y,u);function x(){}function T(M,B,X){l=l||t("./_stream_duplex"),M=M||{},typeof X!="boolean"&&(X=B instanceof l),this.objectMode=!!M.objectMode,X&&(this.objectMode=this.objectMode||!!M.writableObjectMode),this.highWaterMark=y(this,M,"writableHighWaterMark",X),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Z=M.decodeStrings===!1;this.decodeStrings=!Z,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ue){ae(B,ue)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}T.prototype.getBuffer=function(){for(var B=this.bufferedRequest,X=[];B;)X.push(B),B=B.next;return X},function(){try{Object.defineProperty(T.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var H;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(H=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(B){return H.call(this,B)?!0:this!==Y?!1:B&&B._writableState instanceof T}})):H=function(B){return B instanceof this};function Y(M){l=l||t("./_stream_duplex");var B=this instanceof l;if(!B&&!H.call(Y,this))return new Y(M);this._writableState=new T(M,this,B),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),u.call(this)}Y.prototype.pipe=function(){S(this,new R)};function Q(M,B){var X=new D;S(M,X),o.nextTick(B,X)}function te(M,B,X,Z){var ue;return X===null?ue=new A:typeof X!="string"&&!B.objectMode&&(ue=new m("chunk",["string","Buffer"],X)),ue?(S(M,ue),o.nextTick(Z,ue),!1):!0}Y.prototype.write=function(M,B,X){var Z=this._writableState,ue=!1,G=!Z.objectMode&&g(M);return G&&!d.isBuffer(M)&&(M=f(M)),typeof B=="function"&&(X=B,B=null),G?B="buffer":B||(B=Z.defaultEncoding),typeof X!="function"&&(X=x),Z.ending?Q(this,X):(G||te(this,Z,M,X))&&(Z.pendingcb++,ue=k(this,Z,G,M,B,X)),ue},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){var M=this._writableState;M.corked&&(M.corked--,!M.writing&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&re(this,M))},Y.prototype.setDefaultEncoding=function(B){if(typeof B=="string"&&(B=B.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((B+"").toLowerCase())>-1))throw new L(B);return this._writableState.defaultEncoding=B,this},Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(M,B,X){return!M.objectMode&&M.decodeStrings!==!1&&typeof B=="string"&&(B=d.from(B,X)),B}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(M,B,X,Z,ue,G){if(!X){var U=F(B,Z,ue);Z!==U&&(X=!0,ue="buffer",Z=U)}var I=B.objectMode?1:Z.length;B.length+=I;var _=B.length<B.highWaterMark;if(_||(B.needDrain=!0),B.writing||B.corked){var P=B.lastBufferedRequest;B.lastBufferedRequest={chunk:Z,encoding:ue,isBuf:X,callback:G,next:null},P?P.next=B.lastBufferedRequest:B.bufferedRequest=B.lastBufferedRequest,B.bufferedRequestCount+=1}else q(M,B,!1,I,Z,ue,G);return _}function q(M,B,X,Z,ue,G,U){B.writelen=Z,B.writecb=U,B.writing=!0,B.sync=!0,B.destroyed?B.onwrite(new O("write")):X?M._writev(ue,B.onwrite):M._write(ue,G,B.onwrite),B.sync=!1}function V(M,B,X,Z,ue){--B.pendingcb,X?(o.nextTick(ue,Z),o.nextTick(ie,M,B),M._writableState.errorEmitted=!0,S(M,Z)):(ue(Z),M._writableState.errorEmitted=!0,S(M,Z),ie(M,B))}function J(M){M.writing=!1,M.writecb=null,M.length-=M.writelen,M.writelen=0}function ae(M,B){var X=M._writableState,Z=X.sync,ue=X.writecb;if(typeof ue!="function")throw new E;if(J(X),B)V(M,X,Z,B,ue);else{var G=K(X)||M.destroyed;!G&&!X.corked&&!X.bufferProcessing&&X.bufferedRequest&&re(M,X),Z?o.nextTick(se,M,X,G,ue):se(M,X,G,ue)}}function se(M,B,X,Z){X||ce(M,B),B.pendingcb--,Z(),ie(M,B)}function ce(M,B){B.length===0&&B.needDrain&&(B.needDrain=!1,M.emit("drain"))}function re(M,B){B.bufferProcessing=!0;var X=B.bufferedRequest;if(M._writev&&X&&X.next){var Z=B.bufferedRequestCount,ue=new Array(Z),G=B.corkedRequestsFree;G.entry=X;for(var U=0,I=!0;X;)ue[U]=X,X.isBuf||(I=!1),X=X.next,U+=1;ue.allBuffers=I,q(M,B,!0,B.length,ue,"",G.finish),B.pendingcb++,B.lastBufferedRequest=null,G.next?(B.corkedRequestsFree=G.next,G.next=null):B.corkedRequestsFree=new a(B),B.bufferedRequestCount=0}else{for(;X;){var _=X.chunk,P=X.encoding,$=X.callback,le=B.objectMode?1:_.length;if(q(M,B,!1,le,_,P,$),X=X.next,B.bufferedRequestCount--,B.writing)break}X===null&&(B.lastBufferedRequest=null)}B.bufferedRequest=X,B.bufferProcessing=!1}Y.prototype._write=function(M,B,X){X(new w("_write()"))},Y.prototype._writev=null,Y.prototype.end=function(M,B,X){var Z=this._writableState;return typeof M=="function"?(X=M,M=null,B=null):typeof B=="function"&&(X=B,B=null),M!=null&&this.write(M,B),Z.corked&&(Z.corked=1,this.uncork()),Z.ending||ee(this,Z,X),this},Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(M){return M.ending&&M.length===0&&M.bufferedRequest===null&&!M.finished&&!M.writing}function he(M,B){M._final(function(X){B.pendingcb--,X&&S(M,X),B.prefinished=!0,M.emit("prefinish"),ie(M,B)})}function ne(M,B){!B.prefinished&&!B.finalCalled&&(typeof M._final=="function"&&!B.destroyed?(B.pendingcb++,B.finalCalled=!0,o.nextTick(he,M,B)):(B.prefinished=!0,M.emit("prefinish")))}function ie(M,B){var X=K(B);if(X&&(ne(M,B),B.pendingcb===0&&(B.finished=!0,M.emit("finish"),B.autoDestroy))){var Z=M._readableState;(!Z||Z.autoDestroy&&Z.endEmitted)&&M.destroy()}return X}function ee(M,B,X){B.ending=!0,ie(M,B),X&&(B.finished?o.nextTick(X):M.once("finish",X)),B.ended=!0,M.writable=!1}function j(M,B,X){var Z=M.entry;for(M.entry=null;Z;){var ue=Z.callback;B.pendingcb--,ue(X),Z=Z.next}B.corkedRequestsFree.next=M}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(B){this._writableState&&(this._writableState.destroyed=B)}}),Y.prototype.destroy=p.destroy,Y.prototype._undestroy=p.undestroy,Y.prototype._destroy=function(M,B){B(M)}}).call(this)}).call(this,t("_process"),typeof vo<"u"?vo:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(t,n,s){(function(o){(function(){var r;function a(O,A,D){return A in O?Object.defineProperty(O,A,{value:D,enumerable:!0,configurable:!0,writable:!0}):O[A]=D,O}var l=t("./end-of-stream"),c=Symbol("lastResolve"),u=Symbol("lastReject"),d=Symbol("error"),h=Symbol("ended"),f=Symbol("lastPromise"),g=Symbol("handlePromise"),p=Symbol("stream");function v(O,A){return{value:O,done:A}}function y(O){var A=O[c];if(A!==null){var D=O[p].read();D!==null&&(O[f]=null,O[c]=null,O[u]=null,A(v(D,!1)))}}function C(O){o.nextTick(y,O)}function m(O,A){return function(D,L){O.then(function(){if(A[h]){D(v(void 0,!0));return}A[g](D,L)},L)}}var w=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((r={get stream(){return this[p]},next:function(){var A=this,D=this[d];if(D!==null)return Promise.reject(D);if(this[h])return Promise.resolve(v(void 0,!0));if(this[p].destroyed)return new Promise(function(T,H){o.nextTick(function(){A[d]?H(A[d]):T(v(void 0,!0))})});var L=this[f],S;if(L)S=new Promise(m(L,this));else{var x=this[p].read();if(x!==null)return Promise.resolve(v(x,!1));S=new Promise(this[g])}return this[f]=S,S}},a(r,Symbol.asyncIterator,function(){return this}),a(r,"return",function(){var A=this;return new Promise(function(D,L){A[p].destroy(null,function(S){if(S){L(S);return}D(v(void 0,!0))})})}),r),w),R=function(A){var D,L=Object.create(E,(D={},a(D,p,{value:A,writable:!0}),a(D,c,{value:null,writable:!0}),a(D,u,{value:null,writable:!0}),a(D,d,{value:null,writable:!0}),a(D,h,{value:A._readableState.endEmitted,writable:!0}),a(D,g,{value:function(x,T){var H=L[p].read();H?(L[f]=null,L[c]=null,L[u]=null,x(v(H,!1))):(L[c]=x,L[u]=T)},writable:!0}),D));return L[f]=null,l(A,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var x=L[u];x!==null&&(L[f]=null,L[c]=null,L[u]=null,x(S)),L[d]=S;return}var T=L[c];T!==null&&(L[f]=null,L[c]=null,L[u]=null,T(v(void 0,!0))),L[h]=!0}),A.on("readable",C.bind(null,L)),L};n.exports=R}).call(this)}).call(this,t("_process"))},{"./end-of-stream":64,_process:50}],62:[function(t,n,s){function o(y,C){var m=Object.keys(y);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(y);C&&(w=w.filter(function(E){return Object.getOwnPropertyDescriptor(y,E).enumerable})),m.push.apply(m,w)}return m}function r(y){for(var C=1;C<arguments.length;C++){var m=arguments[C]!=null?arguments[C]:{};C%2?o(Object(m),!0).forEach(function(w){a(y,w,m[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(m)):o(Object(m)).forEach(function(w){Object.defineProperty(y,w,Object.getOwnPropertyDescriptor(m,w))})}return y}function a(y,C,m){return C in y?Object.defineProperty(y,C,{value:m,enumerable:!0,configurable:!0,writable:!0}):y[C]=m,y}function l(y,C){if(!(y instanceof C))throw new TypeError("Cannot call a class as a function")}function c(y,C){for(var m=0;m<C.length;m++){var w=C[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}function u(y,C,m){return C&&c(y.prototype,C),m&&c(y,m),y}var d=t("buffer"),h=d.Buffer,f=t("util"),g=f.inspect,p=g&&g.custom||"inspect";function v(y,C,m){h.prototype.copy.call(y,C,m)}n.exports=function(){function y(){l(this,y),this.head=null,this.tail=null,this.length=0}return u(y,[{key:"push",value:function(m){var w={data:m,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(m){var w={data:m,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var w=this.head,E=""+w.data;w=w.next;)E+=m+w.data;return E}},{key:"concat",value:function(m){if(this.length===0)return h.alloc(0);for(var w=h.allocUnsafe(m>>>0),E=this.head,R=0;E;)v(E.data,w,R),R+=E.data.length,E=E.next;return w}},{key:"consume",value:function(m,w){var E;return m<this.head.data.length?(E=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):m===this.head.data.length?E=this.shift():E=w?this._getString(m):this._getBuffer(m),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var w=this.head,E=1,R=w.data;for(m-=R.length;w=w.next;){var O=w.data,A=m>O.length?O.length:m;if(A===O.length?R+=O:R+=O.slice(0,m),m-=A,m===0){A===O.length?(++E,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=O.slice(A));break}++E}return this.length-=E,R}},{key:"_getBuffer",value:function(m){var w=h.allocUnsafe(m),E=this.head,R=1;for(E.data.copy(w),m-=E.data.length;E=E.next;){var O=E.data,A=m>O.length?O.length:m;if(O.copy(w,w.length-m,0,A),m-=A,m===0){A===O.length?(++R,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=O.slice(A));break}++R}return this.length-=R,w}},{key:p,value:function(m,w){return g(this,r({},w,{depth:0,customInspect:!1}))}}]),y}()},{buffer:17,util:16}],63:[function(t,n,s){(function(o){(function(){function r(h,f){var g=this,p=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return p||v?(f?f(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(u,this,h)):o.nextTick(u,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(y){!f&&y?g._writableState?g._writableState.errorEmitted?o.nextTick(l,g):(g._writableState.errorEmitted=!0,o.nextTick(a,g,y)):o.nextTick(a,g,y):f?(o.nextTick(l,g),f(y)):o.nextTick(l,g)}),this)}function a(h,f){u(h,f),l(h)}function l(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function c(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function u(h,f){h.emit("error",f)}function d(h,f){var g=h._readableState,p=h._writableState;g&&g.autoDestroy||p&&p.autoDestroy?h.destroy(f):h.emit("error",f)}n.exports={destroy:r,undestroy:c,errorOrDestroy:d}}).call(this)}).call(this,t("_process"))},{_process:50}],64:[function(t,n,s){var o=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(u){var d=!1;return function(){if(!d){d=!0;for(var h=arguments.length,f=new Array(h),g=0;g<h;g++)f[g]=arguments[g];u.apply(this,f)}}}function a(){}function l(u){return u.setHeader&&typeof u.abort=="function"}function c(u,d,h){if(typeof d=="function")return c(u,null,d);d||(d={}),h=r(h||a);var f=d.readable||d.readable!==!1&&u.readable,g=d.writable||d.writable!==!1&&u.writable,p=function(){u.writable||y()},v=u._writableState&&u._writableState.finished,y=function(){g=!1,v=!0,f||h.call(u)},C=u._readableState&&u._readableState.endEmitted,m=function(){f=!1,C=!0,g||h.call(u)},w=function(A){h.call(u,A)},E=function(){var A;if(f&&!C)return(!u._readableState||!u._readableState.ended)&&(A=new o),h.call(u,A);if(g&&!v)return(!u._writableState||!u._writableState.ended)&&(A=new o),h.call(u,A)},R=function(){u.req.on("finish",y)};return l(u)?(u.on("complete",y),u.on("abort",E),u.req?R():u.on("request",R)):g&&!u._writableState&&(u.on("end",p),u.on("close",p)),u.on("end",m),u.on("finish",y),d.error!==!1&&u.on("error",w),u.on("close",E),function(){u.removeListener("complete",y),u.removeListener("abort",E),u.removeListener("request",R),u.req&&u.req.removeListener("finish",y),u.removeListener("end",p),u.removeListener("close",p),u.removeListener("finish",y),u.removeListener("end",m),u.removeListener("error",w),u.removeListener("close",E)}}n.exports=c},{"../../../errors":55}],65:[function(t,n,s){n.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],66:[function(t,n,s){var o;function r(y){var C=!1;return function(){C||(C=!0,y.apply(void 0,arguments))}}var a=t("../../../errors").codes,l=a.ERR_MISSING_ARGS,c=a.ERR_STREAM_DESTROYED;function u(y){if(y)throw y}function d(y){return y.setHeader&&typeof y.abort=="function"}function h(y,C,m,w){w=r(w);var E=!1;y.on("close",function(){E=!0}),o===void 0&&(o=t("./end-of-stream")),o(y,{readable:C,writable:m},function(O){if(O)return w(O);E=!0,w()});var R=!1;return function(O){if(!E&&!R){if(R=!0,d(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();w(O||new c("pipe"))}}}function f(y){y()}function g(y,C){return y.pipe(C)}function p(y){return!y.length||typeof y[y.length-1]!="function"?u:y.pop()}function v(){for(var y=arguments.length,C=new Array(y),m=0;m<y;m++)C[m]=arguments[m];var w=p(C);if(Array.isArray(C[0])&&(C=C[0]),C.length<2)throw new l("streams");var E,R=C.map(function(O,A){var D=A<C.length-1,L=A>0;return h(O,D,L,function(S){E||(E=S),S&&R.forEach(f),!D&&(R.forEach(f),w(E))})});return C.reduce(g)}n.exports=v},{"../../../errors":55,"./end-of-stream":64}],67:[function(t,n,s){var o=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;function r(l,c,u){return l.highWaterMark!=null?l.highWaterMark:c?l[u]:null}function a(l,c,u,d){var h=r(c,d,u);if(h!=null){if(!(isFinite(h)&&Math.floor(h)===h)||h<0){var f=d?u:"highWaterMark";throw new o(f,h)}return Math.floor(h)}return l.objectMode?16:16*1024}n.exports={getHighWaterMark:a}},{"../../../errors":55}],68:[function(t,n,s){n.exports=t("events").EventEmitter},{events:22}],69:[function(t,n,s){s=n.exports=t("./lib/_stream_readable.js"),s.Stream=s,s.Readable=s,s.Writable=t("./lib/_stream_writable.js"),s.Duplex=t("./lib/_stream_duplex.js"),s.Transform=t("./lib/_stream_transform.js"),s.PassThrough=t("./lib/_stream_passthrough.js"),s.finished=t("./lib/internal/streams/end-of-stream.js"),s.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(t,n,s){function o(a,l,c){var u=this;this._callback=a,this._args=c,this._interval=setInterval(a,l,this._args),this.reschedule=function(d){d||(d=u._interval),u._interval&&clearInterval(u._interval),u._interval=setInterval(u._callback,d,u._args)},this.clear=function(){u._interval&&(clearInterval(u._interval),u._interval=void 0)},this.destroy=function(){u._interval&&clearInterval(u._interval),u._callback=void 0,u._interval=void 0,u._args=void 0}}function r(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var a;if(arguments.length>0){a=new Array(arguments.length-2);for(var l=0;l<a.length;l++)a[l]=arguments[l+2]}return new o(arguments[0],arguments[1],a)}n.exports=r},{}],71:[function(t,n,s){n.exports=t("./index.js")()},{"./index.js":72}],72:[function(t,n,s){(function(o){(function(){n.exports=a;function r(c){return c instanceof o?o.from(c):new c.constructor(c.buffer.slice(),c.byteOffset,c.length)}function a(c){if(c=c||{},c.circles)return l(c);return c.proto?h:d;function u(f,g){for(var p=Object.keys(f),v=new Array(p.length),y=0;y<p.length;y++){var C=p[y],m=f[C];typeof m!="object"||m===null?v[C]=m:m instanceof Date?v[C]=new Date(m):ArrayBuffer.isView(m)?v[C]=r(m):v[C]=g(m)}return v}function d(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return u(f,d);if(f instanceof Map)return new Map(u(Array.from(f),d));if(f instanceof Set)return new Set(u(Array.from(f),d));var g={};for(var p in f)if(Object.hasOwnProperty.call(f,p)!==!1){var v=f[p];typeof v!="object"||v===null?g[p]=v:v instanceof Date?g[p]=new Date(v):v instanceof Map?g[p]=new Map(u(Array.from(v),d)):v instanceof Set?g[p]=new Set(u(Array.from(v),d)):ArrayBuffer.isView(v)?g[p]=r(v):g[p]=d(v)}return g}function h(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return u(f,h);if(f instanceof Map)return new Map(u(Array.from(f),h));if(f instanceof Set)return new Set(u(Array.from(f),h));var g={};for(var p in f){var v=f[p];typeof v!="object"||v===null?g[p]=v:v instanceof Date?g[p]=new Date(v):v instanceof Map?g[p]=new Map(u(Array.from(v),h)):v instanceof Set?g[p]=new Set(u(Array.from(v),h)):ArrayBuffer.isView(v)?g[p]=r(v):g[p]=h(v)}return g}}function l(c){var u=[],d=[];return c.proto?g:f;function h(p,v){for(var y=Object.keys(p),C=new Array(y.length),m=0;m<y.length;m++){var w=y[m],E=p[w];if(typeof E!="object"||E===null)C[w]=E;else if(E instanceof Date)C[w]=new Date(E);else if(ArrayBuffer.isView(E))C[w]=r(E);else{var R=u.indexOf(E);R!==-1?C[w]=d[R]:C[w]=v(E)}}return C}function f(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return h(p,f);if(p instanceof Map)return new Map(h(Array.from(p),f));if(p instanceof Set)return new Set(h(Array.from(p),f));var v={};u.push(p),d.push(v);for(var y in p)if(Object.hasOwnProperty.call(p,y)!==!1){var C=p[y];if(typeof C!="object"||C===null)v[y]=C;else if(C instanceof Date)v[y]=new Date(C);else if(C instanceof Map)v[y]=new Map(h(Array.from(C),f));else if(C instanceof Set)v[y]=new Set(h(Array.from(C),f));else if(ArrayBuffer.isView(C))v[y]=r(C);else{var m=u.indexOf(C);m!==-1?v[y]=d[m]:v[y]=f(C)}}return u.pop(),d.pop(),v}function g(p){if(typeof p!="object"||p===null)return p;if(p instanceof Date)return new Date(p);if(Array.isArray(p))return h(p,g);if(p instanceof Map)return new Map(h(Array.from(p),g));if(p instanceof Set)return new Set(h(Array.from(p),g));var v={};u.push(p),d.push(v);for(var y in p){var C=p[y];if(typeof C!="object"||C===null)v[y]=C;else if(C instanceof Date)v[y]=new Date(C);else if(C instanceof Map)v[y]=new Map(h(Array.from(C),g));else if(C instanceof Set)v[y]=new Set(h(Array.from(C),g));else if(ArrayBuffer.isView(C))v[y]=r(C);else{var m=u.indexOf(C);m!==-1?v[y]=d[m]:v[y]=g(C)}}return u.pop(),d.pop(),v}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],73:[function(t,n,s){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var o=t("buffer"),r=o.Buffer;function a(c,u){for(var d in c)u[d]=c[d]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=o:(a(o,s),s.Buffer=l);function l(c,u,d){return r(c,u,d)}l.prototype=Object.create(r.prototype),a(r,l),l.from=function(c,u,d){if(typeof c=="number")throw new TypeError("Argument must not be a number");return r(c,u,d)},l.alloc=function(c,u,d){if(typeof c!="number")throw new TypeError("Argument must be a number");var h=r(c);return u!==void 0?typeof d=="string"?h.fill(u,d):h.fill(u):h.fill(0),h},l.allocUnsafe=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return r(c)},l.allocUnsafeSlow=function(c){if(typeof c!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(c)}},{buffer:17}],74:[function(t,n,s){n.exports=o;function o(a){var l=a._readableState;return l?l.objectMode||typeof a._duplexState=="number"?a.read():a.read(r(l)):null}function r(a){return a.buffer.length?a.buffer.head?a.buffer.head.data.length:a.buffer[0].length:a.length}},{}],75:[function(t,n,s){var o=t("safe-buffer").Buffer,r=o.isEncoding||function(R){switch(R=""+R,R&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(R){if(!R)return"utf8";for(var O;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(O)return;R=(""+R).toLowerCase(),O=!0}}function l(R){var O=a(R);if(typeof O!="string"&&(o.isEncoding===r||!r(R)))throw new Error("Unknown encoding: "+R);return O||R}s.StringDecoder=c;function c(R){this.encoding=l(R);var O;switch(this.encoding){case"utf16le":this.text=v,this.end=y,O=4;break;case"utf8":this.fillLast=f,O=4;break;case"base64":this.text=C,this.end=m,O=3;break;default:this.write=w,this.end=E;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(O)}c.prototype.write=function(R){if(R.length===0)return"";var O,A;if(this.lastNeed){if(O=this.fillLast(R),O===void 0)return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A<R.length?O?O+this.text(R,A):this.text(R,A):O||""},c.prototype.end=p,c.prototype.text=g,c.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length};function u(R){return R<=127?0:R>>5===6?2:R>>4===14?3:R>>3===30?4:R>>6===2?-1:-2}function d(R,O,A){var D=O.length-1;if(D<A)return 0;var L=u(O[D]);return L>=0?(L>0&&(R.lastNeed=L-1),L):--D<A||L===-2?0:(L=u(O[D]),L>=0?(L>0&&(R.lastNeed=L-2),L):--D<A||L===-2?0:(L=u(O[D]),L>=0?(L>0&&(L===2?L=0:R.lastNeed=L-3),L):0))}function h(R,O,A){if((O[0]&192)!==128)return R.lastNeed=0,"<22>";if(R.lastNeed>1&&O.length>1){if((O[1]&192)!==128)return R.lastNeed=1,"<22>";if(R.lastNeed>2&&O.length>2&&(O[2]&192)!==128)return R.lastNeed=2,"<22>"}}function f(R){var O=this.lastTotal-this.lastNeed,A=h(this,R);if(A!==void 0)return A;if(this.lastNeed<=R.length)return R.copy(this.lastChar,O,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,O,0,R.length),this.lastNeed-=R.length}function g(R,O){var A=d(this,R,O);if(!this.lastNeed)return R.toString("utf8",O);this.lastTotal=A;var D=R.length-(A-this.lastNeed);return R.copy(this.lastChar,0,D),R.toString("utf8",O,D)}function p(R){var O=R&&R.length?this.write(R):"";return this.lastNeed?O+"<22>":O}function v(R,O){if((R.length-O)%2===0){var A=R.toString("utf16le",O);if(A){var D=A.charCodeAt(A.length-1);if(D>=55296&&D<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",O,R.length-1)}function y(R){var O=R&&R.length?this.write(R):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return O+this.lastChar.toString("utf16le",0,A)}return O}function C(R,O){var A=(R.length-O)%3;return A===0?R.toString("base64",O):(this.lastNeed=3-A,this.lastTotal=3,A===1?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",O,R.length-A))}function m(R){var O=R&&R.length?this.write(R):"";return this.lastNeed?O+this.lastChar.toString("base64",0,3-this.lastNeed):O}function w(R){return R.toString(this.encoding)}function E(R){return R&&R.length?this.write(R):""}},{"safe-buffer":73}],76:[function(t,n,s){var o=t("punycode"),r=t("./util");s.parse=O,s.resolve=D,s.resolveObject=L,s.format=A,s.Url=a;function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r",`
`," "],h=["{","}","|","\\","^","`"].concat(d),f=["'"].concat(h),g=["%","/","?",";","#"].concat(f),p=["/","?","#"],v=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,C=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},R=t("querystring");function O(S,x,T){if(S&&r.isObject(S)&&S instanceof a)return S;var H=new a;return H.parse(S,x,T),H}a.prototype.parse=function(S,x,T){if(!r.isString(S))throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var H=S.indexOf("?"),Y=H!==-1&&H<S.indexOf("#")?"?":"#",Q=S.split(Y),te=/\\/g;Q[0]=Q[0].replace(te,"/"),S=Q.join(Y);var F=S;if(F=F.trim(),!T&&S.split("#").length===1){var k=u.exec(F);if(k)return this.path=F,this.href=F,this.pathname=k[1],k[2]?(this.search=k[2],x?this.query=R.parse(this.search.substr(1)):this.query=this.search.substr(1)):x&&(this.search="",this.query={}),this}var q=l.exec(F);if(q){q=q[0];var V=q.toLowerCase();this.protocol=V,F=F.substr(q.length)}if(T||q||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var J=F.substr(0,2)==="//";J&&!(q&&w[q])&&(F=F.substr(2),this.slashes=!0)}if(!w[q]&&(J||q&&!E[q])){for(var ae=-1,se=0;se<p.length;se++){var ce=F.indexOf(p[se]);ce!==-1&&(ae===-1||ce<ae)&&(ae=ce)}var re,K;ae===-1?K=F.lastIndexOf("@"):K=F.lastIndexOf("@",ae),K!==-1&&(re=F.slice(0,K),F=F.slice(K+1),this.auth=decodeURIComponent(re)),ae=-1;for(var se=0;se<g.length;se++){var ce=F.indexOf(g[se]);ce!==-1&&(ae===-1||ce<ae)&&(ae=ce)}ae===-1&&(ae=F.length),this.host=F.slice(0,ae),F=F.slice(ae),this.parseHost(),this.hostname=this.hostname||"";var he=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!he)for(var ne=this.hostname.split(/\./),se=0,ie=ne.length;se<ie;se++){var ee=ne[se];if(ee&&!ee.match(y)){for(var j="",M=0,B=ee.length;M<B;M++)ee.charCodeAt(M)>127?j+="x":j+=ee[M];if(!j.match(y)){var X=ne.slice(0,se),Z=ne.slice(se+1),ue=ee.match(C);ue&&(X.push(ue[1]),Z.unshift(ue[2])),Z.length&&(F="/"+Z.join(".")+F),this.hostname=X.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),he||(this.hostname=o.toASCII(this.hostname));var G=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+G,this.href+=this.host,he&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!m[V])for(var se=0,ie=f.length;se<ie;se++){var I=f[se];if(F.indexOf(I)!==-1){var _=encodeURIComponent(I);_===I&&(_=escape(I)),F=F.split(I).join(_)}}var P=F.indexOf("#");P!==-1&&(this.hash=F.substr(P),F=F.slice(0,P));var $=F.indexOf("?");if($!==-1?(this.search=F.substr($),this.query=F.substr($+1),x&&(this.query=R.parse(this.query)),F=F.slice(0,$)):x&&(this.search="",this.query={}),F&&(this.pathname=F),E[V]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var G=this.pathname||"",le=this.search||"";this.path=G+le}return this.href=this.format(),this};function A(S){return r.isString(S)&&(S=O(S)),S instanceof a?S.format():a.prototype.format.call(S)}a.prototype.format=function(){var S=this.auth||"";S&&(S=encodeURIComponent(S),S=S.replace(/%3A/i,":"),S+="@");var x=this.protocol||"",T=this.pathname||"",H=this.hash||"",Y=!1,Q="";this.host?Y=S+this.host:this.hostname&&(Y=S+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Y+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(Q=R.stringify(this.query));var te=this.search||Q&&"?"+Q||"";return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||E[x])&&Y!==!1?(Y="//"+(Y||""),T&&T.charAt(0)!=="/"&&(T="/"+T)):Y||(Y=""),H&&H.charAt(0)!=="#"&&(H="#"+H),te&&te.charAt(0)!=="?"&&(te="?"+te),T=T.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),te=te.replace("#","%23"),x+Y+T+te+H};function D(S,x){return O(S,!1,!0).resolve(x)}a.prototype.resolve=function(S){return this.resolveObject(O(S,!1,!0)).format()};function L(S,x){return S?O(S,!1,!0).resolveObject(x):x}a.prototype.resolveObject=function(S){if(r.isString(S)){var x=new a;x.parse(S,!1,!0),S=x}for(var T=new a,H=Object.keys(this),Y=0;Y<H.length;Y++){var Q=H[Y];T[Q]=this[Q]}if(T.hash=S.hash,S.href==="")return T.href=T.format(),T;if(S.slashes&&!S.protocol){for(var te=Object.keys(S),F=0;F<te.length;F++){var k=te[F];k!=="protocol"&&(T[k]=S[k])}return E[T.protocol]&&T.hostname&&!T.pathname&&(T.path=T.pathname="/"),T.href=T.format(),T}if(S.protocol&&S.protocol!==T.protocol){if(!E[S.protocol]){for(var q=Object.keys(S),V=0;V<q.length;V++){var J=q[V];T[J]=S[J]}return T.href=T.format(),T}if(T.protocol=S.protocol,!S.host&&!w[S.protocol]){for(var ie=(S.pathname||"").split("/");ie.length&&!(S.host=ie.shift()););S.host||(S.host=""),S.hostname||(S.hostname=""),ie[0]!==""&&ie.unshift(""),ie.length<2&&ie.unshift(""),T.pathname=ie.join("/")}else T.pathname=S.pathname;if(T.search=S.search,T.query=S.query,T.host=S.host||"",T.auth=S.auth,T.hostname=S.hostname||S.host,T.port=S.port,T.pathname||T.search){var ae=T.pathname||"",se=T.search||"";T.path=ae+se}return T.slashes=T.slashes||S.slashes,T.href=T.format(),T}var ce=T.pathname&&T.pathname.charAt(0)==="/",re=S.host||S.pathname&&S.pathname.charAt(0)==="/",K=re||ce||T.host&&S.pathname,he=K,ne=T.pathname&&T.pathname.split("/")||[],ie=S.pathname&&S.pathname.split("/")||[],ee=T.protocol&&!E[T.protocol];if(ee&&(T.hostname="",T.port=null,T.host&&(ne[0]===""?ne[0]=T.host:ne.unshift(T.host)),T.host="",S.protocol&&(S.hostname=null,S.port=null,S.host&&(ie[0]===""?ie[0]=S.host:ie.unshift(S.host)),S.host=null),K=K&&(ie[0]===""||ne[0]==="")),re)T.host=S.host||S.host===""?S.host:T.host,T.hostname=S.hostname||S.hostname===""?S.hostname:T.hostname,T.search=S.search,T.query=S.query,ne=ie;else if(ie.length)ne||(ne=[]),ne.pop(),ne=ne.concat(ie),T.search=S.search,T.query=S.query;else if(!r.isNullOrUndefined(S.search)){if(ee){T.hostname=T.host=ne.shift();var j=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;j&&(T.auth=j.shift(),T.host=T.hostname=j.shift())}return T.search=S.search,T.query=S.query,(!r.isNull(T.pathname)||!r.isNull(T.search))&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.href=T.format(),T}if(!ne.length)return T.pathname=null,T.search?T.path="/"+T.search:T.path=null,T.href=T.format(),T;for(var M=ne.slice(-1)[0],B=(T.host||S.host||ne.length>1)&&(M==="."||M==="..")||M==="",X=0,Z=ne.length;Z>=0;Z--)M=ne[Z],M==="."?ne.splice(Z,1):M===".."?(ne.splice(Z,1),X++):X&&(ne.splice(Z,1),X--);if(!K&&!he)for(;X--;X)ne.unshift("..");K&&ne[0]!==""&&(!ne[0]||ne[0].charAt(0)!=="/")&&ne.unshift(""),B&&ne.join("/").substr(-1)!=="/"&&ne.push("");var ue=ne[0]===""||ne[0]&&ne[0].charAt(0)==="/";if(ee){T.hostname=T.host=ue?"":ne.length?ne.shift():"";var j=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;j&&(T.auth=j.shift(),T.host=T.hostname=j.shift())}return K=K||T.host&&ne.length,K&&!ue&&ne.unshift(""),ne.length?T.pathname=ne.join("/"):(T.pathname=null,T.path=null),(!r.isNull(T.pathname)||!r.isNull(T.search))&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.auth=S.auth||T.auth,T.slashes=T.slashes||S.slashes,T.href=T.format(),T},a.prototype.parseHost=function(){var S=this.host,x=c.exec(S);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),S=S.substr(0,S.length-x.length)),S&&(this.hostname=S)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,n,s){n.exports={isString:function(o){return typeof o=="string"},isObject:function(o){return typeof o=="object"&&o!==null},isNull:function(o){return o===null},isNullOrUndefined:function(o){return o==null}}},{}],78:[function(t,n,s){(function(o){(function(){n.exports=r;function r(l,c){if(a("noDeprecation"))return l;var u=!1;function d(){if(!u){if(a("throwDeprecation"))throw new Error(c);a("traceDeprecation")?console.trace(c):console.warn(c),u=!0}return l.apply(this,arguments)}return d}function a(l){try{if(!o.localStorage)return!1}catch{return!1}var c=o.localStorage[l];return c==null?!1:String(c).toLowerCase()==="true"}}).call(this)}).call(this,typeof vo<"u"?vo:typeof self<"u"?self:typeof window<"u"?window:{})},{}],79:[function(t,n,s){n.exports=o;function o(r,a){if(r&&a)return o(r)(a);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(c){l[c]=r[c]}),l;function l(){for(var c=new Array(arguments.length),u=0;u<c.length;u++)c[u]=arguments[u];var d=r.apply(this,c),h=c[c.length-1];return typeof d=="function"&&d!==h&&Object.keys(h).forEach(function(f){d[f]=h[f]}),d}}},{}],80:[function(t,n,s){n.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],81:[function(t,n,s){n.exports=r;var o=Object.prototype.hasOwnProperty;function r(){for(var a={},l=0;l<arguments.length;l++){var c=arguments[l];for(var u in c)o.call(c,u)&&(a[u]=c[u])}return a}},{}],82:[function(t,n,s){n.exports=function(o){o.prototype[Symbol.iterator]=function*(){for(let r=this.head;r;r=r.next)yield r.value}}},{}],83:[function(t,n,s){n.exports=o,o.Node=c,o.create=o;function o(u){var d=this;if(d instanceof o||(d=new o),d.tail=null,d.head=null,d.length=0,u&&typeof u.forEach=="function")u.forEach(function(g){d.push(g)});else if(arguments.length>0)for(var h=0,f=arguments.length;h<f;h++)d.push(arguments[h]);return d}o.prototype.removeNode=function(u){if(u.list!==this)throw new Error("removing node which does not belong to this list");var d=u.next,h=u.prev;return d&&(d.prev=h),h&&(h.next=d),u===this.head&&(this.head=d),u===this.tail&&(this.tail=h),u.list.length--,u.next=null,u.prev=null,u.list=null,d},o.prototype.unshiftNode=function(u){if(u!==this.head){u.list&&u.list.removeNode(u);var d=this.head;u.list=this,u.next=d,d&&(d.prev=u),this.head=u,this.tail||(this.tail=u),this.length++}},o.prototype.pushNode=function(u){if(u!==this.tail){u.list&&u.list.removeNode(u);var d=this.tail;u.list=this,u.prev=d,d&&(d.next=u),this.tail=u,this.head||(this.head=u),this.length++}},o.prototype.push=function(){for(var u=0,d=arguments.length;u<d;u++)a(this,arguments[u]);return this.length},o.prototype.unshift=function(){for(var u=0,d=arguments.length;u<d;u++)l(this,arguments[u]);return this.length},o.prototype.pop=function(){if(this.tail){var u=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,u}},o.prototype.shift=function(){if(this.head){var u=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,u}},o.prototype.forEach=function(u,d){d=d||this;for(var h=this.head,f=0;h!==null;f++)u.call(d,h.value,f,this),h=h.next},o.prototype.forEachReverse=function(u,d){d=d||this;for(var h=this.tail,f=this.length-1;h!==null;f--)u.call(d,h.value,f,this),h=h.prev},o.prototype.get=function(u){for(var d=0,h=this.head;h!==null&&d<u;d++)h=h.next;if(d===u&&h!==null)return h.value},o.prototype.getReverse=function(u){for(var d=0,h=this.tail;h!==null&&d<u;d++)h=h.prev;if(d===u&&h!==null)return h.value},o.prototype.map=function(u,d){d=d||this;for(var h=new o,f=this.head;f!==null;)h.push(u.call(d,f.value,this)),f=f.next;return h},o.prototype.mapReverse=function(u,d){d=d||this;for(var h=new o,f=this.tail;f!==null;)h.push(u.call(d,f.value,this)),f=f.prev;return h},o.prototype.reduce=function(u,d){var h,f=this.head;if(arguments.length>1)h=d;else if(this.head)f=this.head.next,h=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var g=0;f!==null;g++)h=u(h,f.value,g),f=f.next;return h},o.prototype.reduceReverse=function(u,d){var h,f=this.tail;if(arguments.length>1)h=d;else if(this.tail)f=this.tail.prev,h=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var g=this.length-1;f!==null;g--)h=u(h,f.value,g),f=f.prev;return h},o.prototype.toArray=function(){for(var u=new Array(this.length),d=0,h=this.head;h!==null;d++)u[d]=h.value,h=h.next;return u},o.prototype.toArrayReverse=function(){for(var u=new Array(this.length),d=0,h=this.tail;h!==null;d++)u[d]=h.value,h=h.prev;return u},o.prototype.slice=function(u,d){d=d||this.length,d<0&&(d+=this.length),u=u||0,u<0&&(u+=this.length);var h=new o;if(d<u||d<0)return h;u<0&&(u=0),d>this.length&&(d=this.length);for(var f=0,g=this.head;g!==null&&f<u;f++)g=g.next;for(;g!==null&&f<d;f++,g=g.next)h.push(g.value);return h},o.prototype.sliceReverse=function(u,d){d=d||this.length,d<0&&(d+=this.length),u=u||0,u<0&&(u+=this.length);var h=new o;if(d<u||d<0)return h;u<0&&(u=0),d>this.length&&(d=this.length);for(var f=this.length,g=this.tail;g!==null&&f>d;f--)g=g.prev;for(;g!==null&&f>u;f--,g=g.prev)h.push(g.value);return h},o.prototype.splice=function(u,d,...h){u>this.length&&(u=this.length-1),u<0&&(u=this.length+u);for(var f=0,g=this.head;g!==null&&f<u;f++)g=g.next;for(var p=[],f=0;g&&f<d;f++)p.push(g.value),g=this.removeNode(g);g===null&&(g=this.tail),g!==this.head&&g!==this.tail&&(g=g.prev);for(var f=0;f<h.length;f++)g=r(this,g,h[f]);return p},o.prototype.reverse=function(){for(var u=this.head,d=this.tail,h=u;h!==null;h=h.prev){var f=h.prev;h.prev=h.next,h.next=f}return this.head=d,this.tail=u,this};function r(u,d,h){var f=d===u.head?new c(h,null,d,u):new c(h,d,d.next,u);return f.next===null&&(u.tail=f),f.prev===null&&(u.head=f),u.length++,f}function a(u,d){u.tail=new c(d,u.tail,null,u),u.head||(u.head=u.tail),u.length++}function l(u,d){u.head=new c(d,null,u.head,u),u.tail||(u.tail=u.head),u.length++}function c(u,d,h,f){if(!(this instanceof c))return new c(u,d,h,f);this.list=f,this.value=u,d?(d.next=this,this.prev=d):this.prev=null,h?(h.prev=this,this.next=h):this.next=null}try{t("./iterator.js")(o)}catch{}},{"./iterator.js":82}]},{},[12])(12)})})(CP);var m$=CP.exports;const yP=g$(m$);const v$={name:"coralSales",data(){return{animals:[],weight:0}},watch:{"$store.state.animal.weight"(){this.load()}},methods:{load(){var i=this;const e=Os();si(e+"api/sales").then(t=>t.json()).then(function(t){var n=[];i.weight=0;for(var s=0;s<t.length;s++)t[s].lastSeenDays<1&&(i.weight=i.weight*1+t[s].weight*1,n.push(t[s]));n.sort(function(o,r){return r.lastSeenDays-o.lastSeenDays}),i.animals=n})}},setup(){return{logo:vP}},beforeMount(){this.load()}},C$=["src"];function y$(i,e,t,n,s,o){const r=de("v-divider"),a=de("H2");return me(),kt(He,null,[pt("img",{src:n.logo,alt:"Establo logo."},null,8,C$),b(r,{thickness:20,class:"border-opacity-100",color:"warning"}),pt("ul",null,[(me(!0),kt(He,null,Wo(s.animals,(l,c)=>(me(),kt("li",null,[b(a,null,{default:oe(()=>[De(Me(++c)+") "+Me(l.label)+" - "+Me(l.weight)+" Kg",1)]),_:2},1024)]))),256))]),b(r,{thickness:20,class:"border-opacity-100",color:"warning"}),pt("h1",null,"Total: "+Me(s.weight)+" Kg",1)],64)}const b$=nt(v$,[["render",y$]]),w$=function(i,e,t){const n=String(i).split(".");let s=n[0];const o=n.length>1?t+n[1]:"",r=/(\d+)(\d{3})/;for(;r.test(s);)s=s.replace(r,`$1${e}$2`);return s+o},xS=function(i){const e=Object.assign({},{digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:""},i);return function(t){if(isNaN(t)||!isFinite(t))return"";const n=w$((e.scaler*t).toFixed(e.digitsAfterDecimal),e.thousandsSep,e.decimalSep);return`${e.prefix}${n}${e.suffix}`}},fR=/(\d+)|(\D+)/g,Hf=/\d/,pR=/^0/,Zu=(i,e)=>{if(e!==null&&i===null)return-1;if(i!==null&&e===null)return 1;if(typeof i=="number"&&isNaN(i))return-1;if(typeof e=="number"&&isNaN(e))return 1;const t=Number(i),n=Number(e);if(t<n)return-1;if(t>n)return 1;if(typeof i=="number"&&typeof e!="number")return-1;if(typeof e=="number"&&typeof i!="number")return 1;if(typeof i=="number"&&typeof e=="number")return 0;if(isNaN(n)&&!isNaN(t))return-1;if(isNaN(t)&&!isNaN(n))return 1;let s=String(i),o=String(e);if(s===o)return 0;if(!Hf.test(s)||!Hf.test(o))return s>o?1:-1;for(s=s.match(fR),o=o.match(fR);s.length&&o.length;){const r=s.shift(),a=o.shift();if(r!==a)return Hf.test(r)&&Hf.test(a)?r.replace(pR,".0")-a.replace(pR,".0"):r>a?1:-1}return s.length-o.length},bP=function(i,e){if(i){if(typeof i=="function"){const t=i(e);if(typeof t=="function")return t}else if(e in i)return i[e]}return Zu},qt=xS(),Jr=xS({digitsAfterDecimal:0}),zn=xS({digitsAfterDecimal:1,scaler:100,suffix:"%"}),hi={count(i=Jr){return()=>function(){return{count:0,push(){this.count++},value(){return this.count},format:i}}},uniques(i,e=Jr){return function([t]){return function(){return{uniq:[],push(n){Array.from(this.uniq).includes(n[t])||this.uniq.push(n[t])},value(){return i(this.uniq)},format:e,numInputs:typeof t<"u"?0:1}}}},sum(i=qt){return function([e]){return function(){return{sum:0,push(t){isNaN(parseFloat(t[e]))||(this.sum+=parseFloat(t[e]))},value(){return this.sum},format:i,numInputs:typeof e<"u"?0:1}}}},extremes(i,e=qt){return function([t]){return function(n){return{val:null,sorter:bP(typeof n<"u"?n.sorters:null,t),push(s){let o=s[t];["min","max"].includes(i)&&(o=parseFloat(o),isNaN(o)||(this.val=Math[i](o,this.val!==null?this.val:o))),i==="first"&&this.sorter(o,this.val!==null?this.val:o)<=0&&(this.val=o),i==="last"&&this.sorter(o,this.val!==null?this.val:o)>=0&&(this.val=o)},value(){return this.val},format(s){return isNaN(s)?s:e(s)},numInputs:typeof t<"u"?0:1}}}},quantile(i,e=qt){return function([t]){return function(){return{vals:[],push(n){const s=parseFloat(n[t]);isNaN(s)||this.vals.push(s)},value(){if(this.vals.length===0)return null;this.vals.sort((s,o)=>s-o);const n=(this.vals.length-1)*i;return(this.vals[Math.floor(n)]+this.vals[Math.ceil(n)])/2},format:e,numInputs:typeof t<"u"?0:1}}}},runningStat(i="mean",e=1,t=qt){return function([n]){return function(){return{n:0,m:0,s:0,push(s){const o=parseFloat(s[n]);if(isNaN(o))return;this.n+=1,this.n===1&&(this.m=o);const r=this.m+(o-this.m)/this.n;this.s=this.s+(o-this.m)*(o-r),this.m=r},value(){if(i==="mean")return this.n===0?0/0:this.m;if(this.n<=e)return 0;switch(i){case"var":return this.s/(this.n-e);case"stdev":return Math.sqrt(this.s/(this.n-e));default:throw new Error("unknown mode for runningStat")}},format:t,numInputs:typeof n<"u"?0:1}}}},sumOverSum(i=qt){return function([e,t]){return function(){return{sumNum:0,sumDenom:0,push(n){isNaN(parseFloat(n[e]))||(this.sumNum+=parseFloat(n[e])),isNaN(parseFloat(n[t]))||(this.sumDenom+=parseFloat(n[t]))},value(){return this.sumNum/this.sumDenom},format:i,numInputs:typeof e<"u"&&typeof t<"u"?0:2}}}},fractionOf(i,e="total",t=zn){return(...n)=>function(s,o,r){return{selector:{total:[[],[]],row:[o,[]],col:[[],r]}[e],inner:i(...Array.from(n||[]))(s,o,r),push(a){this.inner.push(a)},format:t,value(){return this.inner.value()/s.getAggregator(...Array.from(this.selector||[])).inner.value()},numInputs:i(...Array.from(n||[]))().numInputs}}}};hi.countUnique=i=>hi.uniques(e=>e.length,i);hi.listUnique=i=>hi.uniques(e=>e.join(i),e=>e);hi.max=i=>hi.extremes("max",i);hi.min=i=>hi.extremes("min",i);hi.first=i=>hi.extremes("first",i);hi.last=i=>hi.extremes("last",i);hi.median=i=>hi.quantile(.5,i);hi.average=i=>hi.runningStat("mean",1,i);hi.var=(i,e)=>hi.runningStat("var",i,e);hi.stdev=(i,e)=>hi.runningStat("stdev",i,e);const AS=(i=>({Count:i.count(Jr),"Count Unique Values":i.countUnique(Jr),"List Unique Values":i.listUnique(", "),Sum:i.sum(qt),"Integer Sum":i.sum(Jr),Average:i.average(qt),Median:i.median(qt),"Sample Variance":i.var(1,qt),"Sample Standard Deviation":i.stdev(1,qt),Minimum:i.min(qt),Maximum:i.max(qt),First:i.first(qt),Last:i.last(qt),"Sum over Sum":i.sumOverSum(qt),"Sum as Fraction of Total":i.fractionOf(i.sum(),"total",zn),"Sum as Fraction of Rows":i.fractionOf(i.sum(),"row",zn),"Sum as Fraction of Columns":i.fractionOf(i.sum(),"col",zn),"Count as Fraction of Total":i.fractionOf(i.count(),"total",zn),"Count as Fraction of Rows":i.fractionOf(i.count(),"row",zn),"Count as Fraction of Columns":i.fractionOf(i.count(),"col",zn)}))(hi),S$=(i=>({Compte:i.count(Jr),"Compter les valeurs uniques":i.countUnique(Jr),"Liste des valeurs uniques":i.listUnique(", "),Somme:i.sum(qt),"Somme de nombres entiers":i.sum(Jr),Moyenne:i.average(qt),Médiane:i.median(qt),"Variance de l'échantillon":i.var(1,qt),"Écart-type de l'échantillon":i.stdev(1,qt),Minimum:i.min(qt),Maximum:i.max(qt),Premier:i.first(qt),Dernier:i.last(qt),"Somme Total":i.sumOverSum(qt),"Somme en fraction du total":i.fractionOf(i.sum(),"total",zn),"Somme en tant que fraction de lignes":i.fractionOf(i.sum(),"row",zn),"Somme en tant que fraction de colonnes":i.fractionOf(i.sum(),"col",zn),"Comptage en tant que fraction du total":i.fractionOf(i.count(),"total",zn),"Comptage en tant que fraction de lignes":i.fractionOf(i.count(),"row",zn),"Comptage en tant que fraction de colonnes":i.fractionOf(i.count(),"col",zn)}))(hi),E$={en:{aggregators:AS,localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter values",totals:"Totals",vs:"vs",by:"by",cancel:"Cancel",only:"only"}},fr:{frAggregators:S$,localeStrings:{renderError:"Une erreur est survenue en dessinant le tableau croisé.",computeError:"Une erreur est survenue en calculant le tableau croisé.",uiRenderError:"Une erreur est survenue en dessinant l'interface du tableau croisé dynamique.",selectAll:"Sélectionner tout",selectNone:"Ne rien sélectionner",tooMany:"(trop de valeurs à afficher)",filterResults:"Filtrer les valeurs",totals:"Totaux",vs:"sur",by:"par",apply:"Appliquer",cancel:"Annuler",only:"seul"}}};class ea{constructor(e={}){this.props=Object.assign({},ea.defaultProps,e),this.aggregator=this.props.aggregators[this.props.aggregatorName](this.props.vals),this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,this.filteredData=[],ea.forEachRecord(this.props.data,this.props.derivedAttributes,t=>{this.filter(t)&&(this.filteredData.push(t),this.processRecord(t))})}filter(e){for(const t in this.props.valueFilter)if(e[t]in this.props.valueFilter[t])return!1;return!0}forEachMatchingRecord(e,t){return ea.forEachRecord(this.props.data,this.props.derivedAttributes,n=>{if(this.filter(n)){for(const s in e)if(e[s]!==(s in n?n[s]:"null"))return;t(n)}})}arrSort(e){let t;const n=(()=>{const s=[];for(t of Array.from(e))s.push(bP(this.props.sorters,t));return s})();return function(s,o){for(const r of Object.keys(n||{})){const a=n[r],l=a(s[r],o[r]);if(l!==0)return l}return 0}}sortKeys(){if(!this.sorted){this.sorted=!0;const e=(t,n)=>this.getAggregator(t,n).value();switch(this.props.rowOrder){case"value_a_to_z":this.rowKeys.sort((t,n)=>Zu(e(t,[]),e(n,[])));break;case"value_z_to_a":this.rowKeys.sort((t,n)=>-Zu(e(t,[]),e(n,[])));break;default:this.rowKeys.sort(this.arrSort(this.props.rows))}switch(this.props.colOrder){case"value_a_to_z":this.colKeys.sort((t,n)=>Zu(e([],t),e([],n)));break;case"value_z_to_a":this.colKeys.sort((t,n)=>-Zu(e([],t),e([],n)));break;default:this.colKeys.sort(this.arrSort(this.props.cols))}}}getFilteredData(){return this.filteredData}getColKeys(){return this.sortKeys(),this.colKeys}getRowKeys(){return this.sortKeys(),this.rowKeys}processRecord(e){const t=[],n=[];for(const r of Array.from(this.props.cols))t.push(r in e?e[r]:"null");for(const r of Array.from(this.props.rows))n.push(r in e?e[r]:"null");const s=n.join(String.fromCharCode(0)),o=t.join(String.fromCharCode(0));this.allTotal.push(e),n.length!==0&&(this.rowTotals[s]||(this.rowKeys.push(n),this.rowTotals[s]=this.aggregator(this,n,[])),this.rowTotals[s].push(e)),t.length!==0&&(this.colTotals[o]||(this.colKeys.push(t),this.colTotals[o]=this.aggregator(this,[],t)),this.colTotals[o].push(e)),t.length!==0&&n.length!==0&&(this.tree[s]||(this.tree[s]={}),this.tree[s][o]||(this.tree[s][o]=this.aggregator(this,n,t)),this.tree[s][o].push(e))}getAggregator(e,t){let n;const s=e.join(String.fromCharCode(0)),o=t.join(String.fromCharCode(0));return e.length===0&&t.length===0?n=this.allTotal:e.length===0?n=this.colTotals[o]:t.length===0?n=this.rowTotals[s]:n=this.tree[s][o],n||{value(){return null},format(){return""}}}}ea.forEachRecord=function(i,e,t){let n,s;if(Object.getOwnPropertyNames(e).length===0?n=t:n=function(o){for(const r in e){const a=e[r](o);a!==null&&(o[r]=a)}return t(o)},typeof i=="function")return i(n);if(Array.isArray(i))return Array.isArray(i[0])?(()=>{const o=[];for(const r of Object.keys(i||{})){const a=i[r];if(r>0){s={};for(const l of Object.keys(i[0]||{})){const c=i[0][l];s[c]=a[l]}o.push(n(s))}}return o})():(()=>{const o=[];for(s of Array.from(i))o.push(n(s));return o})();throw new Error("unknown input format")};ea.defaultProps={aggregators:AS,cols:[],rows:[],vals:[],aggregatorName:"Count",sorters:{},valueFilter:{},rowOrder:"key_a_to_z",colOrder:"key_a_to_z",derivedAttributes:{}};const DS={props:{data:{type:[Array,Object,Function],required:!0},aggregators:{type:Object,default:function(){return AS}},aggregatorName:{type:String,default:"Count"},heatmapMode:String,tableColorScaleGenerator:{type:Function},tableOptions:{type:Object,default:function(){return{}}},renderers:Object,rendererName:{type:String,default:"Table"},locale:{type:String,default:"en"},locales:{type:Object,default:function(){return E$}},rowTotal:{type:Boolean,default:!0},colTotal:{type:Boolean,default:!0},cols:{type:Array,default:function(){return[]}},rows:{type:Array,default:function(){return[]}},vals:{type:Array,default:function(){return[]}},attributes:{type:Array,default:function(){return[]}},valueFilter:{type:Object,default:function(){return{}}},sorters:{type:[Function,Object],default:function(){return{}}},derivedAttributes:{type:[Function,Object],default:function(){return{}}},rowOrder:{type:String,default:"key_a_to_z",validator:function(i){return["key_a_to_z","value_a_to_z","value_z_to_a"].indexOf(i)!==-1}},colOrder:{type:String,default:"key_a_to_z",validator:function(i){return["key_a_to_z","value_a_to_z","value_z_to_a"].indexOf(i)!==-1}},tableMaxWidth:{type:Number,default:0,validator:function(i){return i>=0}},colLimit:{type:Number,default:100},rowLimit:{type:Number,default:100}},methods:{renderError(i){return i("span",this.locales[this.locale].localeStrings.renderError||"An error occurred rendering the PivotTable results.")},computeError(i){return i("span",this.locales[this.locale].localeStrings.computeError||"An error occurred computing the PivotTable results.")},uiRenderError(i){return i("span",this.locales[this.locale].localeStrings.uiRenderError||"An error occurred rendering the PivotTable UI.")}}};function _$(i){const e=Math.min.apply(Math,i),t=Math.max.apply(Math,i);return n=>{const s=255-Math.round(255*(n-e)/(t-e));return{backgroundColor:`rgb(255,${s},${s})`}}}function Bf(i={}){return{name:i.name,mixins:[DS],props:{heatmapMode:String,tableColorScaleGenerator:{type:Function,default:_$},tableOptions:{type:Object,default:function(){return{clickCallback:null}}},localeStrings:{type:Object,default:function(){return{totals:"Totals"}}}},methods:{spanSize(e,t,n){let s;if(t!==0){let r,a,l=!0;for(s=0,a=n,r=a>=0;r?s<=a:s>=a;r?s++:s--)e[t-1][s]!==e[t][s]&&(l=!1);if(l)return-1}let o=0;for(;t+o<e.length;){let r,a,l=!1;for(s=0,a=n,r=a>=0;r?s<=a:s>=a;r?s++:s--)e[t][s]!==e[t+o][s]&&(l=!0);if(l)break;o++}return o}},render(e){let t=null;try{const h=Object.assign({},this.$props,this.$attrs.props);t=new ea(h)}catch(h){if(console&&console.error(h.stack))return this.computeError(e)}const n=t.props.cols,s=t.props.rows,o=t.getRowKeys(),r=t.getColKeys(),a=t.getAggregator([],[]);let l=()=>{},c=()=>{},u=()=>{};if(i.heatmapMode){const h=this.tableColorScaleGenerator,f=r.map(p=>t.getAggregator([],p).value());c=h(f);const g=o.map(p=>t.getAggregator(p,[]).value());if(u=h(g),i.heatmapMode==="full"){const p=[];o.map(y=>r.map(C=>p.push(t.getAggregator(y,C).value())));const v=h(p);l=(y,C,m)=>v(m)}else if(i.heatmapMode==="row"){const p={};o.map(v=>{const y=r.map(C=>t.getAggregator(v,C).value());p[v]=h(y)}),l=(v,y,C)=>p[v](C)}else if(i.heatmapMode==="col"){const p={};r.map(v=>{const y=o.map(C=>t.getAggregator(C,v).value());p[v]=h(y)}),l=(v,y,C)=>p[y](C)}}const d=(h,f,g)=>{const p=this.tableOptions;if(p&&p.clickCallback){const v={};let y={};for(let C in n)!g.hasOwnProperty(C)||(y=n[C],g[C]!==null&&(v[y]=g[C]));for(let C in s)!f.hasOwnProperty(C)||(y=s[C],f[C]!==null&&(v[y]=f[C]));return C=>p.clickCallback(C,h,v,t)}};return e("table",{staticClass:["pvtTable"]},[e("thead",[n.map((h,f)=>e("tr",{attrs:{key:`colAttrs${f}`}},[f===0&&s.length!==0?e("th",{attrs:{colSpan:s.length,rowSpan:n.length}}):void 0,e("th",{staticClass:["pvtAxisLabel"]},h),r.map((g,p)=>{const v=this.spanSize(r,p,f);return v===-1?null:e("th",{staticClass:["pvtColLabel"],attrs:{key:`colKey${p}`,colSpan:v,rowSpan:f===n.length-1&&s.length!==0?2:1}},g[f])}),f===0&&this.rowTotal?e("th",{staticClass:["pvtTotalLabel"],attrs:{rowSpan:n.length+(s.length===0?0:1)}},this.localeStrings.totals):void 0])),s.length!==0?e("tr",[s.map((h,f)=>e("th",{staticClass:["pvtAxisLabel"],attrs:{key:`rowAttr${f}`}},h)),this.rowTotal?e("th",{staticClass:["pvtTotalLabel"]},n.length===0?this.localeStrings.totals:null):n.length===0?void 0:e("th",{staticClass:["pvtTotalLabel"]},null)]):void 0]),e("tbody",[o.map((h,f)=>{const g=t.getAggregator(h,[]);return e("tr",{attrs:{key:`rowKeyRow${f}`}},[h.map((p,v)=>{const y=this.spanSize(o,f,v);return y===-1?null:e("th",{staticClass:["pvtRowLabel"],attrs:{key:`rowKeyLabel${f}-${v}`,rowSpan:y,colSpan:v===s.length-1&&n.length!==0?2:1}},p)}),r.map((p,v)=>{const y=t.getAggregator(h,p);return e("td",{staticClass:["pvVal"],style:l(h,p,y.value()),attrs:{key:`pvtVal${f}-${v}`},on:this.tableOptions.clickCallback?{click:d(y.value(),h,p)}:{}},y.format(y.value()))}),this.rowTotal?e("td",{staticClass:["pvtTotal"],style:u(g.value()),on:this.tableOptions.clickCallback?{click:d(g.value(),h,[])}:{}},g.format(g.value())):void 0])}),e("tr",[this.colTotal?e("th",{staticClass:["pvtTotalLabel"],attrs:{colSpan:s.length+(n.length===0?0:1)}},this.localeStrings.totals):void 0,this.colTotal?r.map((h,f)=>{const g=t.getAggregator([],h);return e("td",{staticClass:["pvtTotal"],style:c(g.value()),attrs:{key:`total${f}`},on:this.tableOptions.clickCallback?{click:d(g.value(),[],h)}:{}},g.format(g.value()))}):void 0,this.colTotal&&this.rowTotal?e("td",{staticClass:["pvtGrandTotal"],on:this.tableOptions.clickCallback?{click:d(a.value(),[],[])}:{}},a.format(a.value())):void 0])])])},renderError(e,t){return this.renderError(e)}}}const R$={name:"tsv-export-renderers",mixins:[DS],render(i){let e=null;try{const r=Object.assign({},this.$props,this.$attrs.props);e=new ea(r)}catch(r){if(console&&console.error(r.stack))return this.computeError(i)}const t=e.getRowKeys(),n=e.getColKeys();t.length===0&&t.push([]),n.length===0&&n.push([]);const s=e.props.rows.map(r=>r);n.length===1&&n[0].length===0?s.push(this.aggregatorName):n.map(r=>s.push(r.join("-")));const o=t.map(r=>{const a=r.map(l=>l);return n.map(l=>{const c=e.getAggregator(r,l).value();a.push(c||"")}),a});return o.unshift(s),i("textarea",{style:{width:"100%",height:`${window.innerHeight/2}px`},attrs:{readOnly:!0},domProps:{value:o.map(r=>r.join(" ")).join(`
`)}})},renderError(i,e){return this.renderError(i)}},T$={Table:Bf({name:"vue-table"}),"Table Heatmap":Bf({heatmapMode:"full",name:"vue-table-heatmap"}),"Table Col Heatmap":Bf({heatmapMode:"col",name:"vue-table-col-heatmap"}),"Table Row Heatmap":Bf({heatmapMode:"row",name:"vue-table-col-heatmap"}),"Export Table TSV":R$},wP={name:"vue-pivottable",mixins:[DS],computed:{rendererItems(){return this.renderers||Object.assign({},T$)}},methods:{createPivottable(i){const e=this.$props;return i(this.rendererItems[this.rendererName],{props:Object.assign(e,{localeStrings:e.locales[e.locale].localeStrings})})},createWrapperContainer(i){return i("div",{style:{display:"block",width:"100%","overflow-x":"auto","max-width":this.tableMaxWidth?`${this.tableMaxWidth}px`:void 0}},[this.createPivottable(i)])}},render(i){return this.createWrapperContainer(i)},renderError(i,e){return this.renderError(i)}};var x$=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function A$(i){var e=i.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(n){var s=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return i[n]}})}),t}var D$={exports:{}};/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function wp(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wp=function(e){return typeof e}:wp=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(i)}function O$(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Ds(){return Ds=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Ds.apply(this,arguments)}function da(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{},n=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),n.forEach(function(s){O$(i,s,t[s])})}return i}function P$(i,e){if(i==null)return{};var t={},n=Object.keys(i),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(t[s]=i[s]);return t}function I$(i,e){if(i==null)return{};var t=P$(i,e),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(s=0;s<o.length;s++)n=o[s],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(i,n)||(t[n]=i[n]))}return t}function M$(i){return L$(i)||F$(i)||N$()}function L$(i){if(Array.isArray(i)){for(var e=0,t=new Array(i.length);e<i.length;e++)t[e]=i[e];return t}}function F$(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function N$(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var k$="1.10.2";function cr(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Ir=cr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),yf=cr(/Edge/i),gR=cr(/firefox/i),Ty=cr(/safari/i)&&!cr(/chrome/i)&&!cr(/android/i),SP=cr(/iP(ad|od|hone)/i),V$=cr(/chrome/i)&&cr(/android/i),EP={capture:!1,passive:!1};function Ct(i,e,t){i.addEventListener(e,t,!Ir&&EP)}function ft(i,e,t){i.removeEventListener(e,t,!Ir&&EP)}function hg(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function G$(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function js(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&hg(i,e):hg(i,e))||n&&i===t)return i;if(i===t)break}while(i=G$(i))}return null}var mR=/\s+/g;function ti(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(mR," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(mR," ")}}function je(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function cl(i,e){var t="";if(typeof i=="string")t=i;else do{var n=je(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(t)}function _P(i,e,t){if(i){var n=i.getElementsByTagName(e),s=0,o=n.length;if(t)for(;s<o;s++)t(n[s],s);return n}return[]}function Oo(){var i=document.scrollingElement;return i||document.documentElement}function ai(i,e,t,n,s){if(!(!i.getBoundingClientRect&&i!==window)){var o,r,a,l,c,u,d;if(i!==window&&i!==Oo()?(o=i.getBoundingClientRect(),r=o.top,a=o.left,l=o.bottom,c=o.right,u=o.height,d=o.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||t)&&i!==window&&(s=s||i.parentNode,!Ir))do if(s&&s.getBoundingClientRect&&(je(s,"transform")!=="none"||t&&je(s,"position")!=="static")){var h=s.getBoundingClientRect();r-=h.top+parseInt(je(s,"border-top-width")),a-=h.left+parseInt(je(s,"border-left-width")),l=r+o.height,c=a+o.width;break}while(s=s.parentNode);if(n&&i!==window){var f=cl(s||i),g=f&&f.a,p=f&&f.d;f&&(r/=p,a/=g,d/=g,u/=p,l=r+u,c=a+d)}return{top:r,left:a,bottom:l,right:c,width:d,height:u}}}function vR(i,e,t){for(var n=$r(i,!0),s=ai(i)[e];n;){var o=ai(n)[t],r=void 0;if(t==="top"||t==="left"?r=s>=o:r=s<=o,!r)return n;if(n===Oo())break;n=$r(n,!1)}return!1}function fg(i,e,t){for(var n=0,s=0,o=i.children;s<o.length;){if(o[s].style.display!=="none"&&o[s]!==Je.ghost&&o[s]!==Je.dragged&&js(o[s],t.draggable,i,!1)){if(n===e)return o[s];n++}s++}return null}function OS(i,e){for(var t=i.lastElementChild;t&&(t===Je.ghost||je(t,"display")==="none"||e&&!hg(t,e));)t=t.previousElementSibling;return t||null}function ri(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==Je.clone&&(!e||hg(i,e))&&t++;return t}function CR(i){var e=0,t=0,n=Oo();if(i)do{var s=cl(i),o=s.a,r=s.d;e+=i.scrollLeft*o,t+=i.scrollTop*r}while(i!==n&&(i=i.parentNode));return[e,t]}function H$(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function $r(i,e){if(!i||!i.getBoundingClientRect)return Oo();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var s=je(t);if(t.clientWidth<t.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Oo();if(n||e)return t;n=!0}}while(t=t.parentNode);return Oo()}function B$(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function $v(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var md;function RP(i,e){return function(){if(!md){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),md=setTimeout(function(){md=void 0},e)}}}function W$(){clearTimeout(md),md=void 0}function TP(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function PS(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}function yR(i,e){je(i,"position","absolute"),je(i,"top",e.top),je(i,"left",e.left),je(i,"width",e.width),je(i,"height",e.height)}function zv(i){je(i,"position",""),je(i,"top",""),je(i,"left",""),je(i,"width",""),je(i,"height","")}var on="Sortable"+new Date().getTime();function U$(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var t=[].slice.call(this.el.children);t.forEach(function(n){if(!(je(n,"display")==="none"||n===Je.ghost)){i.push({target:n,rect:ai(n)});var s=da({},i[i.length-1].rect);if(n.thisAnimationDuration){var o=cl(n,!0);o&&(s.top-=o.f,s.left-=o.e)}n.fromRect=s}})}},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(H$(i,{target:t}),1)},animateAll:function(t){var n=this;if(!this.options.animation){clearTimeout(e),typeof t=="function"&&t();return}var s=!1,o=0;i.forEach(function(r){var a=0,l=r.target,c=l.fromRect,u=ai(l),d=l.prevFromRect,h=l.prevToRect,f=r.rect,g=cl(l,!0);g&&(u.top-=g.f,u.left-=g.e),l.toRect=u,l.thisAnimationDuration&&$v(d,u)&&!$v(c,u)&&(f.top-u.top)/(f.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(a=$$(f,d,h,n.options)),$v(u,c)||(l.prevFromRect=c,l.prevToRect=u,a||(a=n.options.animation),n.animate(l,f,u,a)),a&&(s=!0,o=Math.max(o,a),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},a),l.thisAnimationDuration=a)}),clearTimeout(e),s?e=setTimeout(function(){typeof t=="function"&&t()},o):typeof t=="function"&&t(),i=[]},animate:function(t,n,s,o){if(o){je(t,"transition",""),je(t,"transform","");var r=cl(this.el),a=r&&r.a,l=r&&r.d,c=(n.left-s.left)/(a||1),u=(n.top-s.top)/(l||1);t.animatingX=!!c,t.animatingY=!!u,je(t,"transform","translate3d("+c+"px,"+u+"px,0)"),j$(t),je(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),je(t,"transform","translate3d(0,0,0)"),typeof t.animated=="number"&&clearTimeout(t.animated),t.animated=setTimeout(function(){je(t,"transition",""),je(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o)}}}}function j$(i){return i.offsetWidth}function $$(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var Vu=[],Kv={initializeByDefault:!0},bf={mount:function(i){for(var e in Kv)Kv.hasOwnProperty(e)&&!(e in i)&&(i[e]=Kv[e]);Vu.push(i)},pluginEvent:function(i,e,t){var n=this;this.eventCanceled=!1,t.cancel=function(){n.eventCanceled=!0};var s=i+"Global";Vu.forEach(function(o){!e[o.pluginName]||(e[o.pluginName][s]&&e[o.pluginName][s](da({sortable:e},t)),e.options[o.pluginName]&&e[o.pluginName][i]&&e[o.pluginName][i](da({sortable:e},t)))})},initializePlugins:function(i,e,t,n){Vu.forEach(function(r){var a=r.pluginName;if(!(!i.options[a]&&!r.initializeByDefault)){var l=new r(i,e,i.options);l.sortable=i,l.options=i.options,i[a]=l,Ds(t,l.defaults)}});for(var s in i.options)if(i.options.hasOwnProperty(s)){var o=this.modifyOption(i,s,i.options[s]);typeof o<"u"&&(i.options[s]=o)}},getEventProperties:function(i,e){var t={};return Vu.forEach(function(n){typeof n.eventProperties=="function"&&Ds(t,n.eventProperties.call(e[n.pluginName],i))}),t},modifyOption:function(i,e,t){var n;return Vu.forEach(function(s){!i[s.pluginName]||s.optionListeners&&typeof s.optionListeners[e]=="function"&&(n=s.optionListeners[e].call(i[s.pluginName],t))}),n}};function Ju(i){var e=i.sortable,t=i.rootEl,n=i.name,s=i.targetEl,o=i.cloneEl,r=i.toEl,a=i.fromEl,l=i.oldIndex,c=i.newIndex,u=i.oldDraggableIndex,d=i.newDraggableIndex,h=i.originalEvent,f=i.putSortable,g=i.extraEventProperties;if(e=e||t&&t[on],!!e){var p,v=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ir&&!yf?p=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent(n,!0,!0)),p.to=r||t,p.from=a||t,p.item=s||t,p.clone=o,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=u,p.newDraggableIndex=d,p.originalEvent=h,p.pullMode=f?f.lastPutMode:void 0;var C=da({},g,bf.getEventProperties(n,e));for(var m in C)p[m]=C[m];t&&t.dispatchEvent(p),v[y]&&v[y].call(e,p)}}var xn=function(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.evt,s=I$(t,["evt"]);bf.pluginEvent.bind(Je)(i,e,da({dragEl:Ne,parentEl:Si,ghostEl:ut,rootEl:ei,nextEl:za,lastDownEl:Sp,cloneEl:oi,cloneHidden:Wr,dragStarted:ed,putSortable:Wi,activeSortable:Je.active,originalEvent:n,oldIndex:fc,oldDraggableIndex:vd,newIndex:Un,newDraggableIndex:Br,hideGhostForTarget:OP,unhideGhostForTarget:PP,cloneNowHidden:function(){Wr=!0},cloneNowShown:function(){Wr=!1},dispatchSortableEvent:function(o){gn({sortable:e,name:o,originalEvent:n})}},s))};function gn(i){Ju(da({putSortable:Wi,cloneEl:oi,targetEl:Ne,rootEl:ei,oldIndex:fc,oldDraggableIndex:vd,newIndex:Un,newDraggableIndex:Br},i))}var Ne,Si,ut,ei,za,Sp,oi,Wr,fc,Un,vd,Br,Wf,Wi,lc=!1,pg=!1,gg=[],Ga,Bs,Yv,qv,bR,wR,ed,ec,Cd,yd=!1,Uf=!1,Ep,qi,Xv=[],xy=!1,mg=[],Zm=typeof document<"u",jf=SP,SR=yf||Ir?"cssFloat":"float",z$=Zm&&!V$&&!SP&&"draggable"in document.createElement("div"),xP=function(){if(Zm){if(Ir)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),AP=function(i,e){var t=je(i),n=parseInt(t.width)-parseInt(t.paddingLeft)-parseInt(t.paddingRight)-parseInt(t.borderLeftWidth)-parseInt(t.borderRightWidth),s=fg(i,0,e),o=fg(i,1,e),r=s&&je(s),a=o&&je(o),l=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+ai(s).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+ai(o).width;if(t.display==="flex")return t.flexDirection==="column"||t.flexDirection==="column-reverse"?"vertical":"horizontal";if(t.display==="grid")return t.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&r.float&&r.float!=="none"){var u=r.float==="left"?"left":"right";return o&&(a.clear==="both"||a.clear===u)?"vertical":"horizontal"}return s&&(r.display==="block"||r.display==="flex"||r.display==="table"||r.display==="grid"||l>=n&&t[SR]==="none"||o&&t[SR]==="none"&&l+c>n)?"vertical":"horizontal"},K$=function(i,e,t){var n=t?i.left:i.top,s=t?i.right:i.bottom,o=t?i.width:i.height,r=t?e.left:e.top,a=t?e.right:e.bottom,l=t?e.width:e.height;return n===r||s===a||n+o/2===r+l/2},Y$=function(i,e){var t;return gg.some(function(n){if(!OS(n)){var s=ai(n),o=n[on].options.emptyInsertThreshold,r=i>=s.left-o&&i<=s.right+o,a=e>=s.top-o&&e<=s.bottom+o;if(o&&r&&a)return t=n}}),t},DP=function(i){function e(s,o){return function(r,a,l,c){var u=r.options.group.name&&a.options.group.name&&r.options.group.name===a.options.group.name;if(s==null&&(o||u))return!0;if(s==null||s===!1)return!1;if(o&&s==="clone")return s;if(typeof s=="function")return e(s(r,a,l,c),o)(r,a,l,c);var d=(o?r:a).options.group.name;return s===!0||typeof s=="string"&&s===d||s.join&&s.indexOf(d)>-1}}var t={},n=i.group;(!n||wp(n)!="object")&&(n={name:n}),t.name=n.name,t.checkPull=e(n.pull,!0),t.checkPut=e(n.put),t.revertClone=n.revertClone,i.group=t},OP=function(){!xP&&ut&&je(ut,"display","none")},PP=function(){!xP&&ut&&je(ut,"display","")};Zm&&document.addEventListener("click",function(i){if(pg)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),pg=!1,!1},!0);var Ha=function(i){if(Ne){i=i.touches?i.touches[0]:i;var e=Y$(i.clientX,i.clientY);if(e){var t={};for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n]);t.target=t.rootEl=e,t.preventDefault=void 0,t.stopPropagation=void 0,e[on]._onDragOver(t)}}},q$=function(i){Ne&&Ne.parentNode[on]._isOutsideThisEl(i.target)};function Je(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=Ds({},e),i[on]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return AP(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,r){o.setData("Text",r.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Je.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};bf.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);DP(e);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=e.forceFallback?!1:z$,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ct(i,"pointerdown",this._onTapStart):(Ct(i,"mousedown",this._onTapStart),Ct(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ct(i,"dragover",this),Ct(i,"dragenter",this)),gg.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ds(this,U$())}Je.prototype={constructor:Je,_isOutsideThisEl:function(i){!this.el.contains(i)&&i!==this.el&&(ec=null)},_getDirection:function(i,e){return typeof this.options.direction=="function"?this.options.direction.call(this,i,e,Ne):this.options.direction},_onTapStart:function(i){if(i.cancelable){var e=this,t=this.el,n=this.options,s=n.preventOnFilter,o=i.type,r=i.touches&&i.touches[0]||i.pointerType&&i.pointerType==="touch"&&i,a=(r||i).target,l=i.target.shadowRoot&&(i.path&&i.path[0]||i.composedPath&&i.composedPath()[0])||a,c=n.filter;if(i3(t),!Ne&&!(/mousedown|pointerdown/.test(o)&&i.button!==0||n.disabled)&&!l.isContentEditable&&(a=js(a,n.draggable,t,!1),!(a&&a.animated)&&Sp!==a)){if(fc=ri(a),vd=ri(a,n.draggable),typeof c=="function"){if(c.call(this,i,a,this)){gn({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:t,fromEl:t}),xn("filter",e,{evt:i}),s&&i.cancelable&&i.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=js(l,u.trim(),t,!1),u)return gn({sortable:e,rootEl:u,name:"filter",targetEl:a,fromEl:t,toEl:t}),xn("filter",e,{evt:i}),!0}),c)){s&&i.cancelable&&i.preventDefault();return}n.handle&&!js(l,n.handle,t,!1)||this._prepareDragStart(i,r,a)}}},_prepareDragStart:function(i,e,t){var n=this,s=n.el,o=n.options,r=s.ownerDocument,a;if(t&&!Ne&&t.parentNode===s){var l=ai(t);if(ei=s,Ne=t,Si=Ne.parentNode,za=Ne.nextSibling,Sp=t,Wf=o.group,Je.dragged=Ne,Ga={target:Ne,clientX:(e||i).clientX,clientY:(e||i).clientY},bR=Ga.clientX-l.left,wR=Ga.clientY-l.top,this._lastX=(e||i).clientX,this._lastY=(e||i).clientY,Ne.style["will-change"]="all",a=function(){if(xn("delayEnded",n,{evt:i}),Je.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!gR&&n.nativeDraggable&&(Ne.draggable=!0),n._triggerDragStart(i,e),gn({sortable:n,name:"choose",originalEvent:i}),ti(Ne,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){_P(Ne,c.trim(),Zv)}),Ct(r,"dragover",Ha),Ct(r,"mousemove",Ha),Ct(r,"touchmove",Ha),Ct(r,"mouseup",n._onDrop),Ct(r,"touchend",n._onDrop),Ct(r,"touchcancel",n._onDrop),gR&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ne.draggable=!0),xn("delayStart",this,{evt:i}),o.delay&&(!o.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(yf||Ir))){if(Je.eventCanceled){this._onDrop();return}Ct(r,"mouseup",n._disableDelayedDrag),Ct(r,"touchend",n._disableDelayedDrag),Ct(r,"touchcancel",n._disableDelayedDrag),Ct(r,"mousemove",n._delayedDragTouchMoveHandler),Ct(r,"touchmove",n._delayedDragTouchMoveHandler),o.supportPointer&&Ct(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(a,o.delay)}else a()}},_delayedDragTouchMoveHandler:function(i){var e=i.touches?i.touches[0]:i;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ne&&Zv(Ne),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var i=this.el.ownerDocument;ft(i,"mouseup",this._disableDelayedDrag),ft(i,"touchend",this._disableDelayedDrag),ft(i,"touchcancel",this._disableDelayedDrag),ft(i,"mousemove",this._delayedDragTouchMoveHandler),ft(i,"touchmove",this._delayedDragTouchMoveHandler),ft(i,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(i,e){e=e||i.pointerType=="touch"&&i,!this.nativeDraggable||e?this.options.supportPointer?Ct(document,"pointermove",this._onTouchMove):e?Ct(document,"touchmove",this._onTouchMove):Ct(document,"mousemove",this._onTouchMove):(Ct(Ne,"dragend",this),Ct(ei,"dragstart",this._onDragStart));try{document.selection?_p(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(i,e){if(lc=!1,ei&&Ne){xn("dragStarted",this,{evt:e}),this.nativeDraggable&&Ct(document,"dragover",q$);var t=this.options;!i&&ti(Ne,t.dragClass,!1),ti(Ne,t.ghostClass,!0),Je.active=this,i&&this._appendGhost(),gn({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Bs){this._lastX=Bs.clientX,this._lastY=Bs.clientY,OP();for(var i=document.elementFromPoint(Bs.clientX,Bs.clientY),e=i;i&&i.shadowRoot&&(i=i.shadowRoot.elementFromPoint(Bs.clientX,Bs.clientY),i!==e);)e=i;if(Ne.parentNode[on]._isOutsideThisEl(i),e)do{if(e[on]){var t=void 0;if(t=e[on]._onDragOver({clientX:Bs.clientX,clientY:Bs.clientY,target:i,rootEl:e}),t&&!this.options.dragoverBubble)break}i=e}while(e=e.parentNode);PP()}},_onTouchMove:function(i){if(Ga){var e=this.options,t=e.fallbackTolerance,n=e.fallbackOffset,s=i.touches?i.touches[0]:i,o=ut&&cl(ut,!0),r=ut&&o&&o.a,a=ut&&o&&o.d,l=jf&&qi&&CR(qi),c=(s.clientX-Ga.clientX+n.x)/(r||1)+(l?l[0]-Xv[0]:0)/(r||1),u=(s.clientY-Ga.clientY+n.y)/(a||1)+(l?l[1]-Xv[1]:0)/(a||1);if(!Je.active&&!lc){if(t&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<t)return;this._onDragStart(i,!0)}if(ut){o?(o.e+=c-(Yv||0),o.f+=u-(qv||0)):o={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");je(ut,"webkitTransform",d),je(ut,"mozTransform",d),je(ut,"msTransform",d),je(ut,"transform",d),Yv=c,qv=u,Bs=s}i.cancelable&&i.preventDefault()}},_appendGhost:function(){if(!ut){var i=this.options.fallbackOnBody?document.body:ei,e=ai(Ne,!0,jf,!0,i),t=this.options;if(jf){for(qi=i;je(qi,"position")==="static"&&je(qi,"transform")==="none"&&qi!==document;)qi=qi.parentNode;qi!==document.body&&qi!==document.documentElement?(qi===document&&(qi=Oo()),e.top+=qi.scrollTop,e.left+=qi.scrollLeft):qi=Oo(),Xv=CR(qi)}ut=Ne.cloneNode(!0),ti(ut,t.ghostClass,!1),ti(ut,t.fallbackClass,!0),ti(ut,t.dragClass,!0),je(ut,"transition",""),je(ut,"transform",""),je(ut,"box-sizing","border-box"),je(ut,"margin",0),je(ut,"top",e.top),je(ut,"left",e.left),je(ut,"width",e.width),je(ut,"height",e.height),je(ut,"opacity","0.8"),je(ut,"position",jf?"absolute":"fixed"),je(ut,"zIndex","100000"),je(ut,"pointerEvents","none"),Je.ghost=ut,i.appendChild(ut),je(ut,"transform-origin",bR/parseInt(ut.style.width)*100+"% "+wR/parseInt(ut.style.height)*100+"%")}},_onDragStart:function(i,e){var t=this,n=i.dataTransfer,s=t.options;if(xn("dragStart",this,{evt:i}),Je.eventCanceled){this._onDrop();return}xn("setupClone",this),Je.eventCanceled||(oi=PS(Ne),oi.draggable=!1,oi.style["will-change"]="",this._hideClone(),ti(oi,this.options.chosenClass,!1),Je.clone=oi),t.cloneId=_p(function(){xn("clone",t),!Je.eventCanceled&&(t.options.removeCloneOnHide||ei.insertBefore(oi,Ne),t._hideClone(),gn({sortable:t,name:"clone"}))}),!e&&ti(Ne,s.dragClass,!0),e?(pg=!0,t._loopId=setInterval(t._emulateDragOver,50)):(ft(document,"mouseup",t._onDrop),ft(document,"touchend",t._onDrop),ft(document,"touchcancel",t._onDrop),n&&(n.effectAllowed="move",s.setData&&s.setData.call(t,n,Ne)),Ct(document,"drop",t),je(Ne,"transform","translateZ(0)")),lc=!0,t._dragStartId=_p(t._dragStarted.bind(t,e,i)),Ct(document,"selectstart",t),ed=!0,Ty&&je(document.body,"user-select","none")},_onDragOver:function(i){var e=this.el,t=i.target,n,s,o,r=this.options,a=r.group,l=Je.active,c=Wf===a,u=r.sort,d=Wi||l,h,f=this,g=!1;if(xy)return;function p(Q,te){xn(Q,f,da({evt:i,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:n,targetRect:s,canSort:u,fromSortable:d,target:t,completed:y,onMove:function(F,k){return Qv(ei,e,Ne,n,F,ai(F),i,k)},changed:C},te))}function v(){p("dragOverAnimationCapture"),f.captureAnimationState(),f!==d&&d.captureAnimationState()}function y(Q){return p("dragOverCompleted",{insertion:Q}),Q&&(c?l._hideClone():l._showClone(f),f!==d&&(ti(Ne,Wi?Wi.options.ghostClass:l.options.ghostClass,!1),ti(Ne,r.ghostClass,!0)),Wi!==f&&f!==Je.active?Wi=f:f===Je.active&&Wi&&(Wi=null),d===f&&(f._ignoreWhileAnimating=t),f.animateAll(function(){p("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(t===Ne&&!Ne.animated||t===e&&!t.animated)&&(ec=null),!r.dragoverBubble&&!i.rootEl&&t!==document&&(Ne.parentNode[on]._isOutsideThisEl(i.target),!Q&&Ha(i)),!r.dragoverBubble&&i.stopPropagation&&i.stopPropagation(),g=!0}function C(){Un=ri(Ne),Br=ri(Ne,r.draggable),gn({sortable:f,name:"change",toEl:e,newIndex:Un,newDraggableIndex:Br,originalEvent:i})}if(i.preventDefault!==void 0&&i.cancelable&&i.preventDefault(),t=js(t,r.draggable,e,!0),p("dragOver"),Je.eventCanceled)return g;if(Ne.contains(i.target)||t.animated&&t.animatingX&&t.animatingY||f._ignoreWhileAnimating===t)return y(!1);if(pg=!1,l&&!r.disabled&&(c?u||(o=!ei.contains(Ne)):Wi===this||(this.lastPutMode=Wf.checkPull(this,l,Ne,i))&&a.checkPut(this,l,Ne,i))){if(h=this._getDirection(i,t)==="vertical",n=ai(Ne),p("dragOverValid"),Je.eventCanceled)return g;if(o)return Si=ei,v(),this._hideClone(),p("revert"),Je.eventCanceled||(za?ei.insertBefore(Ne,za):ei.appendChild(Ne)),y(!0);var m=OS(e,r.draggable);if(!m||Z$(i,h,this)&&!m.animated){if(m===Ne)return y(!1);if(m&&e===i.target&&(t=m),t&&(s=ai(t)),Qv(ei,e,Ne,n,t,s,i,!!t)!==!1)return v(),e.appendChild(Ne),Si=e,C(),y(!0)}else if(t.parentNode===e){s=ai(t);var w=0,E,R=Ne.parentNode!==e,O=!K$(Ne.animated&&Ne.toRect||n,t.animated&&t.toRect||s,h),A=h?"top":"left",D=vR(t,"top","top")||vR(Ne,"top","top"),L=D?D.scrollTop:void 0;ec!==t&&(E=s[A],yd=!1,Uf=!O&&r.invertSwap||R),w=J$(i,t,s,h,O?1:r.swapThreshold,r.invertedSwapThreshold==null?r.swapThreshold:r.invertedSwapThreshold,Uf,ec===t);var S;if(w!==0){var x=ri(Ne);do x-=w,S=Si.children[x];while(S&&(je(S,"display")==="none"||S===ut))}if(w===0||S===t)return y(!1);ec=t,Cd=w;var T=t.nextElementSibling,H=!1;H=w===1;var Y=Qv(ei,e,Ne,n,t,s,i,H);if(Y!==!1)return(Y===1||Y===-1)&&(H=Y===1),xy=!0,setTimeout(Q$,30),v(),H&&!T?e.appendChild(Ne):t.parentNode.insertBefore(Ne,H?T:t),D&&TP(D,0,L-D.scrollTop),Si=Ne.parentNode,E!==void 0&&!Uf&&(Ep=Math.abs(E-ai(t)[A])),C(),y(!0)}if(e.contains(Ne))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ft(document,"mousemove",this._onTouchMove),ft(document,"touchmove",this._onTouchMove),ft(document,"pointermove",this._onTouchMove),ft(document,"dragover",Ha),ft(document,"mousemove",Ha),ft(document,"touchmove",Ha)},_offUpEvents:function(){var i=this.el.ownerDocument;ft(i,"mouseup",this._onDrop),ft(i,"touchend",this._onDrop),ft(i,"pointerup",this._onDrop),ft(i,"touchcancel",this._onDrop),ft(document,"selectstart",this)},_onDrop:function(i){var e=this.el,t=this.options;if(Un=ri(Ne),Br=ri(Ne,t.draggable),xn("drop",this,{evt:i}),Si=Ne&&Ne.parentNode,Un=ri(Ne),Br=ri(Ne,t.draggable),Je.eventCanceled){this._nulling();return}lc=!1,Uf=!1,yd=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ay(this.cloneId),Ay(this._dragStartId),this.nativeDraggable&&(ft(document,"drop",this),ft(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ty&&je(document.body,"user-select",""),je(Ne,"transform",""),i&&(ed&&(i.cancelable&&i.preventDefault(),!t.dropBubble&&i.stopPropagation()),ut&&ut.parentNode&&ut.parentNode.removeChild(ut),(ei===Si||Wi&&Wi.lastPutMode!=="clone")&&oi&&oi.parentNode&&oi.parentNode.removeChild(oi),Ne&&(this.nativeDraggable&&ft(Ne,"dragend",this),Zv(Ne),Ne.style["will-change"]="",ed&&!lc&&ti(Ne,Wi?Wi.options.ghostClass:this.options.ghostClass,!1),ti(Ne,this.options.chosenClass,!1),gn({sortable:this,name:"unchoose",toEl:Si,newIndex:null,newDraggableIndex:null,originalEvent:i}),ei!==Si?(Un>=0&&(gn({rootEl:Si,name:"add",toEl:Si,fromEl:ei,originalEvent:i}),gn({sortable:this,name:"remove",toEl:Si,originalEvent:i}),gn({rootEl:Si,name:"sort",toEl:Si,fromEl:ei,originalEvent:i}),gn({sortable:this,name:"sort",toEl:Si,originalEvent:i})),Wi&&Wi.save()):Un!==fc&&Un>=0&&(gn({sortable:this,name:"update",toEl:Si,originalEvent:i}),gn({sortable:this,name:"sort",toEl:Si,originalEvent:i})),Je.active&&((Un==null||Un===-1)&&(Un=fc,Br=vd),gn({sortable:this,name:"end",toEl:Si,originalEvent:i}),this.save()))),this._nulling()},_nulling:function(){xn("nulling",this),ei=Ne=Si=ut=za=oi=Sp=Wr=Ga=Bs=ed=Un=Br=fc=vd=ec=Cd=Wi=Wf=Je.dragged=Je.ghost=Je.clone=Je.active=null,mg.forEach(function(i){i.checked=!0}),mg.length=Yv=qv=0},handleEvent:function(i){switch(i.type){case"drop":case"dragend":this._onDrop(i);break;case"dragenter":case"dragover":Ne&&(this._onDragOver(i),X$(i));break;case"selectstart":i.preventDefault();break}},toArray:function(){for(var i=[],e,t=this.el.children,n=0,s=t.length,o=this.options;n<s;n++)e=t[n],js(e,o.draggable,this.el,!1)&&i.push(e.getAttribute(o.dataIdAttr)||t3(e));return i},sort:function(i){var e={},t=this.el;this.toArray().forEach(function(n,s){var o=t.children[s];js(o,this.options.draggable,t,!1)&&(e[n]=o)},this),i.forEach(function(n){e[n]&&(t.removeChild(e[n]),t.appendChild(e[n]))})},save:function(){var i=this.options.store;i&&i.set&&i.set(this)},closest:function(i,e){return js(i,e||this.options.draggable,this.el,!1)},option:function(i,e){var t=this.options;if(e===void 0)return t[i];var n=bf.modifyOption(this,i,e);typeof n<"u"?t[i]=n:t[i]=e,i==="group"&&DP(t)},destroy:function(){xn("destroy",this);var i=this.el;i[on]=null,ft(i,"mousedown",this._onTapStart),ft(i,"touchstart",this._onTapStart),ft(i,"pointerdown",this._onTapStart),this.nativeDraggable&&(ft(i,"dragover",this),ft(i,"dragenter",this)),Array.prototype.forEach.call(i.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),gg.splice(gg.indexOf(this.el),1),this.el=i=null},_hideClone:function(){if(!Wr){if(xn("hideClone",this),Je.eventCanceled)return;je(oi,"display","none"),this.options.removeCloneOnHide&&oi.parentNode&&oi.parentNode.removeChild(oi),Wr=!0}},_showClone:function(i){if(i.lastPutMode!=="clone"){this._hideClone();return}if(Wr){if(xn("showClone",this),Je.eventCanceled)return;ei.contains(Ne)&&!this.options.group.revertClone?ei.insertBefore(oi,Ne):za?ei.insertBefore(oi,za):ei.appendChild(oi),this.options.group.revertClone&&this.animate(Ne,oi),je(oi,"display",""),Wr=!1}}};function X$(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function Qv(i,e,t,n,s,o,r,a){var l,c=i[on],u=c.options.onMove,d;return window.CustomEvent&&!Ir&&!yf?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=i,l.dragged=t,l.draggedRect=n,l.related=s||e,l.relatedRect=o||ai(e),l.willInsertAfter=a,l.originalEvent=r,i.dispatchEvent(l),u&&(d=u.call(c,l,r)),d}function Zv(i){i.draggable=!1}function Q$(){xy=!1}function Z$(i,e,t){var n=ai(OS(t.el,t.options.draggable)),s=10;return e?i.clientX>n.right+s||i.clientX<=n.right&&i.clientY>n.bottom&&i.clientX>=n.left:i.clientX>n.right&&i.clientY>n.top||i.clientX<=n.right&&i.clientY>n.bottom+s}function J$(i,e,t,n,s,o,r,a){var l=n?i.clientY:i.clientX,c=n?t.height:t.width,u=n?t.top:t.left,d=n?t.bottom:t.right,h=!1;if(!r){if(a&&Ep<c*s){if(!yd&&(Cd===1?l>u+c*o/2:l<d-c*o/2)&&(yd=!0),yd)h=!0;else if(Cd===1?l<u+Ep:l>d-Ep)return-Cd}else if(l>u+c*(1-s)/2&&l<d-c*(1-s)/2)return e3(e)}return h=h||r,h&&(l<u+c*o/2||l>d-c*o/2)?l>u+c/2?1:-1:0}function e3(i){return ri(Ne)<ri(i)?1:-1}function t3(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function i3(i){mg.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&mg.push(n)}}function _p(i){return setTimeout(i,0)}function Ay(i){return clearTimeout(i)}Zm&&Ct(document,"touchmove",function(i){(Je.active||lc)&&i.cancelable&&i.preventDefault()});Je.utils={on:Ct,off:ft,css:je,find:_P,is:function(i,e){return!!js(i,e,i,!1)},extend:B$,throttle:RP,closest:js,toggleClass:ti,clone:PS,index:ri,nextTick:_p,cancelNextTick:Ay,detectDirection:AP,getChild:fg};Je.get=function(i){return i[on]};Je.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(Je.utils=da({},Je.utils,n.utils)),bf.mount(n)})};Je.create=function(i,e){return new Je(i,e)};Je.version=k$;var Ei=[],td,Dy,Oy=!1,Jv,eC,vg,id;function n3(){function i(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return i.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?Ct(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ct(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Ct(document,"touchmove",this._handleFallbackAutoScroll):Ct(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?ft(document,"dragover",this._handleAutoScroll):(ft(document,"pointermove",this._handleFallbackAutoScroll),ft(document,"touchmove",this._handleFallbackAutoScroll),ft(document,"mousemove",this._handleFallbackAutoScroll)),ER(),Rp(),W$()},nulling:function(){vg=Dy=td=Oy=id=Jv=eC=null,Ei.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,s=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(s,o);if(vg=e,t||yf||Ir||Ty){tC(e,this.options,r,t);var a=$r(r,!0);Oy&&(!id||s!==Jv||o!==eC)&&(id&&ER(),id=setInterval(function(){var l=$r(document.elementFromPoint(s,o),!0);l!==a&&(a=l,Rp()),tC(e,n.options,l,t)},10),Jv=s,eC=o)}else{if(!this.options.bubbleScroll||$r(r,!0)===Oo()){Rp();return}tC(e,this.options,$r(r,!1),!1)}}},Ds(i,{pluginName:"scroll",initializeByDefault:!0})}function Rp(){Ei.forEach(function(i){clearInterval(i.pid)}),Ei=[]}function ER(){clearInterval(id)}var tC=RP(function(i,e,t,n){if(e.scroll){var s=(i.touches?i.touches[0]:i).clientX,o=(i.touches?i.touches[0]:i).clientY,r=e.scrollSensitivity,a=e.scrollSpeed,l=Oo(),c=!1,u;Dy!==t&&(Dy=t,Rp(),td=e.scroll,u=e.scrollFn,td===!0&&(td=$r(t,!0)));var d=0,h=td;do{var f=h,g=ai(f),p=g.top,v=g.bottom,y=g.left,C=g.right,m=g.width,w=g.height,E=void 0,R=void 0,O=f.scrollWidth,A=f.scrollHeight,D=je(f),L=f.scrollLeft,S=f.scrollTop;f===l?(E=m<O&&(D.overflowX==="auto"||D.overflowX==="scroll"||D.overflowX==="visible"),R=w<A&&(D.overflowY==="auto"||D.overflowY==="scroll"||D.overflowY==="visible")):(E=m<O&&(D.overflowX==="auto"||D.overflowX==="scroll"),R=w<A&&(D.overflowY==="auto"||D.overflowY==="scroll"));var x=E&&(Math.abs(C-s)<=r&&L+m<O)-(Math.abs(y-s)<=r&&!!L),T=R&&(Math.abs(v-o)<=r&&S+w<A)-(Math.abs(p-o)<=r&&!!S);if(!Ei[d])for(var H=0;H<=d;H++)Ei[H]||(Ei[H]={});(Ei[d].vx!=x||Ei[d].vy!=T||Ei[d].el!==f)&&(Ei[d].el=f,Ei[d].vx=x,Ei[d].vy=T,clearInterval(Ei[d].pid),(x!=0||T!=0)&&(c=!0,Ei[d].pid=setInterval((function(){n&&this.layer===0&&Je.active._onTouchMove(vg);var Y=Ei[this.layer].vy?Ei[this.layer].vy*a:0,Q=Ei[this.layer].vx?Ei[this.layer].vx*a:0;typeof u=="function"&&u.call(Je.dragged.parentNode[on],Q,Y,i,vg,Ei[this.layer].el)!=="continue"||TP(Ei[this.layer].el,Q,Y)}).bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==l&&(h=$r(h,!1)));Oy=c}},30),IP=function(i){var e=i.originalEvent,t=i.putSortable,n=i.dragEl,s=i.activeSortable,o=i.dispatchSortableEvent,r=i.hideGhostForTarget,a=i.unhideGhostForTarget;if(e){var l=t||s;r();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(u)&&(o("spill"),this.onSpill({dragEl:n,putSortable:t}))}};function IS(){}IS.prototype={startIndex:null,dragStart:function(i){var e=i.oldDraggableIndex;this.startIndex=e},onSpill:function(i){var e=i.dragEl,t=i.putSortable;this.sortable.captureAnimationState(),t&&t.captureAnimationState();var n=fg(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),t&&t.animateAll()},drop:IP};Ds(IS,{pluginName:"revertOnSpill"});function MS(){}MS.prototype={onSpill:function(i){var e=i.dragEl,t=i.putSortable,n=t||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:IP};Ds(MS,{pluginName:"removeOnSpill"});var ps;function s3(){function i(){this.defaults={swapClass:"sortable-swap-highlight"}}return i.prototype={dragStart:function(e){var t=e.dragEl;ps=t},dragOverValid:function(e){var t=e.completed,n=e.target,s=e.onMove,o=e.activeSortable,r=e.changed,a=e.cancel;if(o.options.swap){var l=this.sortable.el,c=this.options;if(n&&n!==l){var u=ps;s(n)!==!1?(ti(n,c.swapClass,!0),ps=n):ps=null,u&&u!==ps&&ti(u,c.swapClass,!1)}r(),t(!0),a()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,s=e.dragEl,o=n||this.sortable,r=this.options;ps&&ti(ps,r.swapClass,!1),ps&&(r.swap||n&&n.options.swap)&&s!==ps&&(o.captureAnimationState(),o!==t&&t.captureAnimationState(),o3(s,ps),o.animateAll(),o!==t&&t.animateAll())},nulling:function(){ps=null}},Ds(i,{pluginName:"swap",eventProperties:function(){return{swapItem:ps}}})}function o3(i,e){var t=i.parentNode,n=e.parentNode,s,o;!t||!n||t.isEqualNode(e)||n.isEqualNode(i)||(s=ri(i),o=ri(e),t.isEqualNode(n)&&s<o&&o++,t.insertBefore(e,t.children[s]),n.insertBefore(i,n.children[o]))}var rt=[],Wn=[],Gu,Ws,Hu=!1,Hn=!1,tc=!1,Ut,Bu,$f;function r3(){function i(e){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));e.options.supportPointer?Ct(document,"pointerup",this._deselectMultiDrag):(Ct(document,"mouseup",this._deselectMultiDrag),Ct(document,"touchend",this._deselectMultiDrag)),Ct(document,"keydown",this._checkKeyDown),Ct(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(n,s){var o="";rt.length&&Ws===e?rt.forEach(function(r,a){o+=(a?", ":"")+r.textContent}):o=s.textContent,n.setData("Text",o)}}}return i.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;Ut=t},delayEnded:function(){this.isMultiDrag=~rt.indexOf(Ut)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var s=0;s<rt.length;s++)Wn.push(PS(rt[s])),Wn[s].sortableIndex=rt[s].sortableIndex,Wn[s].draggable=!1,Wn[s].style["will-change"]="",ti(Wn[s],this.options.selectedClass,!1),rt[s]===Ut&&ti(Wn[s],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,s=e.dispatchSortableEvent,o=e.cancel;!this.isMultiDrag||this.options.removeCloneOnHide||rt.length&&Ws===t&&(_R(!0,n),s("clone"),o())},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,s=e.cancel;!this.isMultiDrag||(_R(!1,n),Wn.forEach(function(o){je(o,"display","")}),t(),$f=!1,s())},hideClone:function(e){var t=this;e.sortable;var n=e.cloneNowHidden,s=e.cancel;!this.isMultiDrag||(Wn.forEach(function(o){je(o,"display","none"),t.options.removeCloneOnHide&&o.parentNode&&o.parentNode.removeChild(o)}),n(),$f=!0,s())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&Ws&&Ws.multiDrag._deselectMultiDrag(),rt.forEach(function(t){t.sortableIndex=ri(t)}),rt=rt.sort(function(t,n){return t.sortableIndex-n.sortableIndex}),tc=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){rt.forEach(function(o){o!==Ut&&je(o,"position","absolute")});var s=ai(Ut,!1,!0,!0);rt.forEach(function(o){o!==Ut&&yR(o,s)}),Hn=!0,Hu=!0}n.animateAll(function(){Hn=!1,Hu=!1,t.options.animation&&rt.forEach(function(o){zv(o)}),t.options.sort&&zf()})}},dragOver:function(e){var t=e.target,n=e.completed,s=e.cancel;Hn&&~rt.indexOf(t)&&(n(!1),s())},revert:function(e){var t=e.fromSortable,n=e.rootEl,s=e.sortable,o=e.dragRect;rt.length>1&&(rt.forEach(function(r){s.addAnimationState({target:r,rect:Hn?ai(r):o}),zv(r),r.fromRect=o,t.removeAnimationState(r)}),Hn=!1,a3(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,s=e.insertion,o=e.activeSortable,r=e.parentEl,a=e.putSortable,l=this.options;if(s){if(n&&o._hideClone(),Hu=!1,l.animation&&rt.length>1&&(Hn||!n&&!o.options.sort&&!a)){var c=ai(Ut,!1,!0,!0);rt.forEach(function(d){d!==Ut&&(yR(d,c),r.appendChild(d))}),Hn=!0}if(!n)if(Hn||zf(),rt.length>1){var u=$f;o._showClone(t),o.options.animation&&!$f&&u&&Wn.forEach(function(d){o.addAnimationState({target:d,rect:Bu}),d.fromRect=Bu,d.thisAnimationDuration=null})}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,s=e.activeSortable;if(rt.forEach(function(r){r.thisAnimationDuration=null}),s.options.animation&&!n&&s.multiDrag.isMultiDrag){Bu=Ds({},t);var o=cl(Ut,!0);Bu.top-=o.f,Bu.left-=o.e}},dragOverAnimationComplete:function(){Hn&&(Hn=!1,zf())},drop:function(e){var t=e.originalEvent,n=e.rootEl,s=e.parentEl,o=e.sortable,r=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,c=l||this.sortable;if(t){var u=this.options,d=s.children;if(!tc)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ti(Ut,u.selectedClass,!~rt.indexOf(Ut)),~rt.indexOf(Ut))rt.splice(rt.indexOf(Ut),1),Gu=null,Ju({sortable:o,rootEl:n,name:"deselect",targetEl:Ut,originalEvt:t});else{if(rt.push(Ut),Ju({sortable:o,rootEl:n,name:"select",targetEl:Ut,originalEvt:t}),t.shiftKey&&Gu&&o.el.contains(Gu)){var h=ri(Gu),f=ri(Ut);if(~h&&~f&&h!==f){var g,p;for(f>h?(p=h,g=f):(p=f,g=h+1);p<g;p++)~rt.indexOf(d[p])||(ti(d[p],u.selectedClass,!0),rt.push(d[p]),Ju({sortable:o,rootEl:n,name:"select",targetEl:d[p],originalEvt:t}))}}else Gu=Ut;Ws=c}if(tc&&this.isMultiDrag){if((s[on].options.sort||s!==n)&&rt.length>1){var v=ai(Ut),y=ri(Ut,":not(."+this.options.selectedClass+")");if(!Hu&&u.animation&&(Ut.thisAnimationDuration=null),c.captureAnimationState(),!Hu&&(u.animation&&(Ut.fromRect=v,rt.forEach(function(m){if(m.thisAnimationDuration=null,m!==Ut){var w=Hn?ai(m):v;m.fromRect=w,c.addAnimationState({target:m,rect:w})}})),zf(),rt.forEach(function(m){d[y]?s.insertBefore(m,d[y]):s.appendChild(m),y++}),a===ri(Ut))){var C=!1;rt.forEach(function(m){if(m.sortableIndex!==ri(m)){C=!0;return}}),C&&r("update")}rt.forEach(function(m){zv(m)}),c.animateAll()}Ws=c}(n===s||l&&l.lastPutMode!=="clone")&&Wn.forEach(function(m){m.parentNode&&m.parentNode.removeChild(m)})}},nullingGlobal:function(){this.isMultiDrag=tc=!1,Wn.length=0},destroyGlobal:function(){this._deselectMultiDrag(),ft(document,"pointerup",this._deselectMultiDrag),ft(document,"mouseup",this._deselectMultiDrag),ft(document,"touchend",this._deselectMultiDrag),ft(document,"keydown",this._checkKeyDown),ft(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(typeof tc<"u"&&tc)&&Ws===this.sortable&&!(e&&js(e.target,this.options.draggable,this.sortable.el,!1))&&!(e&&e.button!==0))for(;rt.length;){var t=rt[0];ti(t,this.options.selectedClass,!1),rt.shift(),Ju({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Ds(i,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[on];!t||!t.options.multiDrag||~rt.indexOf(e)||(Ws&&Ws!==t&&(Ws.multiDrag._deselectMultiDrag(),Ws=t),ti(e,t.options.selectedClass,!0),rt.push(e))},deselect:function(e){var t=e.parentNode[on],n=rt.indexOf(e);!t||!t.options.multiDrag||!~n||(ti(e,t.options.selectedClass,!1),rt.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return rt.forEach(function(s){t.push({multiDragElement:s,index:s.sortableIndex});var o;Hn&&s!==Ut?o=-1:Hn?o=ri(s,":not(."+e.options.selectedClass+")"):o=ri(s),n.push({multiDragElement:s,index:o})}),{items:M$(rt),clones:[].concat(Wn),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),e==="ctrl"?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function a3(i,e){rt.forEach(function(t,n){var s=e.children[t.sortableIndex+(i?Number(n):0)];s?e.insertBefore(t,s):e.appendChild(t)})}function _R(i,e){Wn.forEach(function(t,n){var s=e.children[t.sortableIndex+(i?Number(n):0)];s?e.insertBefore(t,s):e.appendChild(t)})}function zf(){rt.forEach(function(i){i!==Ut&&i.parentNode&&i.parentNode.removeChild(i)})}Je.mount(new n3);Je.mount(MS,IS);const l3=Object.freeze(Object.defineProperty({__proto__:null,default:Je,MultiDrag:r3,Sortable:Je,Swap:s3},Symbol.toStringTag,{value:"Module"})),c3=A$(l3);(function(i,e){(function(t,n){i.exports=n(c3)})(typeof self<"u"?self:x$,function(t){return function(n){var s={};function o(r){if(s[r])return s[r].exports;var a=s[r]={i:r,l:!1,exports:{}};return n[r].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=n,o.c=s,o.d=function(r,a,l){o.o(r,a)||Object.defineProperty(r,a,{enumerable:!0,get:l})},o.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,a){if(a&1&&(r=o(r)),a&8||a&4&&typeof r=="object"&&r&&r.__esModule)return r;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:r}),a&2&&typeof r!="string")for(var c in r)o.d(l,c,(function(u){return r[u]}).bind(null,c));return l},o.n=function(r){var a=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(a,"a",a),a},o.o=function(r,a){return Object.prototype.hasOwnProperty.call(r,a)},o.p="",o(o.s="fb15")}({"01f9":function(n,s,o){var r=o("2d00"),a=o("5ca1"),l=o("2aba"),c=o("32e9"),u=o("84f2"),d=o("41a0"),h=o("7f20"),f=o("38fd"),g=o("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),v="@@iterator",y="keys",C="values",m=function(){return this};n.exports=function(w,E,R,O,A,D,L){d(R,E,O);var S=function(ae){if(!p&&ae in Y)return Y[ae];switch(ae){case y:return function(){return new R(this,ae)};case C:return function(){return new R(this,ae)}}return function(){return new R(this,ae)}},x=E+" Iterator",T=A==C,H=!1,Y=w.prototype,Q=Y[g]||Y[v]||A&&Y[A],te=Q||S(A),F=A?T?S("entries"):te:void 0,k=E=="Array"&&Y.entries||Q,q,V,J;if(k&&(J=f(k.call(new w)),J!==Object.prototype&&J.next&&(h(J,x,!0),!r&&typeof J[g]!="function"&&c(J,g,m))),T&&Q&&Q.name!==C&&(H=!0,te=function(){return Q.call(this)}),(!r||L)&&(p||H||!Y[g])&&c(Y,g,te),u[E]=te,u[x]=m,A)if(q={values:T?te:S(C),keys:D?te:S(y),entries:F},L)for(V in q)V in Y||l(Y,V,q[V]);else a(a.P+a.F*(p||H),E,q);return q}},"02f4":function(n,s,o){var r=o("4588"),a=o("be13");n.exports=function(l){return function(c,u){var d=String(a(c)),h=r(u),f=d.length,g,p;return h<0||h>=f?l?"":void 0:(g=d.charCodeAt(h),g<55296||g>56319||h+1===f||(p=d.charCodeAt(h+1))<56320||p>57343?l?d.charAt(h):g:l?d.slice(h,h+2):(g-55296<<10)+(p-56320)+65536)}}},"0390":function(n,s,o){var r=o("02f4")(!0);n.exports=function(a,l,c){return l+(c?r(a,l).length:1)}},"0bfb":function(n,s,o){var r=o("cb7c");n.exports=function(){var a=r(this),l="";return a.global&&(l+="g"),a.ignoreCase&&(l+="i"),a.multiline&&(l+="m"),a.unicode&&(l+="u"),a.sticky&&(l+="y"),l}},"0d58":function(n,s,o){var r=o("ce10"),a=o("e11e");n.exports=Object.keys||function(l){return r(l,a)}},1495:function(n,s,o){var r=o("86cc"),a=o("cb7c"),l=o("0d58");n.exports=o("9e1e")?Object.defineProperties:function(c,u){a(c);for(var d=l(u),h=d.length,f=0,g;h>f;)r.f(c,g=d[f++],u[g]);return c}},"214f":function(n,s,o){o("b0c5");var r=o("2aba"),a=o("32e9"),l=o("79e5"),c=o("be13"),u=o("2b4c"),d=o("520a"),h=u("species"),f=!l(function(){var p=/./;return p.exec=function(){var v=[];return v.groups={a:"7"},v},"".replace(p,"$<a>")!=="7"}),g=function(){var p=/(?:)/,v=p.exec;p.exec=function(){return v.apply(this,arguments)};var y="ab".split(p);return y.length===2&&y[0]==="a"&&y[1]==="b"}();n.exports=function(p,v,y){var C=u(p),m=!l(function(){var D={};return D[C]=function(){return 7},""[p](D)!=7}),w=m?!l(function(){var D=!1,L=/a/;return L.exec=function(){return D=!0,null},p==="split"&&(L.constructor={},L.constructor[h]=function(){return L}),L[C](""),!D}):void 0;if(!m||!w||p==="replace"&&!f||p==="split"&&!g){var E=/./[C],R=y(c,C,""[p],function(D,L,S,x,T){return L.exec===d?m&&!T?{done:!0,value:E.call(L,S,x)}:{done:!0,value:D.call(S,L,x)}:{done:!1}}),O=R[0],A=R[1];r(String.prototype,p,O),a(RegExp.prototype,C,v==2?function(D,L){return A.call(D,this,L)}:function(D){return A.call(D,this)})}}},"230e":function(n,s,o){var r=o("d3f4"),a=o("7726").document,l=r(a)&&r(a.createElement);n.exports=function(c){return l?a.createElement(c):{}}},"23c6":function(n,s,o){var r=o("2d95"),a=o("2b4c")("toStringTag"),l=r(function(){return arguments}())=="Arguments",c=function(u,d){try{return u[d]}catch{}};n.exports=function(u){var d,h,f;return u===void 0?"Undefined":u===null?"Null":typeof(h=c(d=Object(u),a))=="string"?h:l?r(d):(f=r(d))=="Object"&&typeof d.callee=="function"?"Arguments":f}},2621:function(n,s){s.f=Object.getOwnPropertySymbols},"2aba":function(n,s,o){var r=o("7726"),a=o("32e9"),l=o("69a8"),c=o("ca5a")("src"),u=o("fa5b"),d="toString",h=(""+u).split(d);o("8378").inspectSource=function(f){return u.call(f)},(n.exports=function(f,g,p,v){var y=typeof p=="function";y&&(l(p,"name")||a(p,"name",g)),f[g]!==p&&(y&&(l(p,c)||a(p,c,f[g]?""+f[g]:h.join(String(g)))),f===r?f[g]=p:v?f[g]?f[g]=p:a(f,g,p):(delete f[g],a(f,g,p)))})(Function.prototype,d,function(){return typeof this=="function"&&this[c]||u.call(this)})},"2aeb":function(n,s,o){var r=o("cb7c"),a=o("1495"),l=o("e11e"),c=o("613b")("IE_PROTO"),u=function(){},d="prototype",h=function(){var f=o("230e")("iframe"),g=l.length,p="<",v=">",y;for(f.style.display="none",o("fab2").appendChild(f),f.src="javascript:",y=f.contentWindow.document,y.open(),y.write(p+"script"+v+"document.F=Object"+p+"/script"+v),y.close(),h=y.F;g--;)delete h[d][l[g]];return h()};n.exports=Object.create||function(f,g){var p;return f!==null?(u[d]=r(f),p=new u,u[d]=null,p[c]=f):p=h(),g===void 0?p:a(p,g)}},"2b4c":function(n,s,o){var r=o("5537")("wks"),a=o("ca5a"),l=o("7726").Symbol,c=typeof l=="function",u=n.exports=function(d){return r[d]||(r[d]=c&&l[d]||(c?l:a)("Symbol."+d))};u.store=r},"2d00":function(n,s){n.exports=!1},"2d95":function(n,s){var o={}.toString;n.exports=function(r){return o.call(r).slice(8,-1)}},"2fdb":function(n,s,o){var r=o("5ca1"),a=o("d2c8"),l="includes";r(r.P+r.F*o("5147")(l),"String",{includes:function(c){return!!~a(this,c,l).indexOf(c,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(n,s,o){var r=o("86cc"),a=o("4630");n.exports=o("9e1e")?function(l,c,u){return r.f(l,c,a(1,u))}:function(l,c,u){return l[c]=u,l}},"38fd":function(n,s,o){var r=o("69a8"),a=o("4bf8"),l=o("613b")("IE_PROTO"),c=Object.prototype;n.exports=Object.getPrototypeOf||function(u){return u=a(u),r(u,l)?u[l]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?c:null}},"41a0":function(n,s,o){var r=o("2aeb"),a=o("4630"),l=o("7f20"),c={};o("32e9")(c,o("2b4c")("iterator"),function(){return this}),n.exports=function(u,d,h){u.prototype=r(c,{next:a(1,h)}),l(u,d+" Iterator")}},"456d":function(n,s,o){var r=o("4bf8"),a=o("0d58");o("5eda")("keys",function(){return function(l){return a(r(l))}})},4588:function(n,s){var o=Math.ceil,r=Math.floor;n.exports=function(a){return isNaN(a=+a)?0:(a>0?r:o)(a)}},4630:function(n,s){n.exports=function(o,r){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:r}}},"4bf8":function(n,s,o){var r=o("be13");n.exports=function(a){return Object(r(a))}},5147:function(n,s,o){var r=o("2b4c")("match");n.exports=function(a){var l=/./;try{"/./"[a](l)}catch{try{return l[r]=!1,!"/./"[a](l)}catch{}}return!0}},"520a":function(n,s,o){var r=o("0bfb"),a=RegExp.prototype.exec,l=String.prototype.replace,c=a,u="lastIndex",d=function(){var g=/a/,p=/b*/g;return a.call(g,"a"),a.call(p,"a"),g[u]!==0||p[u]!==0}(),h=/()??/.exec("")[1]!==void 0,f=d||h;f&&(c=function(g){var p=this,v,y,C,m;return h&&(y=new RegExp("^"+p.source+"$(?!\\s)",r.call(p))),d&&(v=p[u]),C=a.call(p,g),d&&C&&(p[u]=p.global?C.index+C[0].length:v),h&&C&&C.length>1&&l.call(C[0],y,function(){for(m=1;m<arguments.length-2;m++)arguments[m]===void 0&&(C[m]=void 0)}),C}),n.exports=c},"52a7":function(n,s){s.f={}.propertyIsEnumerable},5537:function(n,s,o){var r=o("8378"),a=o("7726"),l="__core-js_shared__",c=a[l]||(a[l]={});(n.exports=function(u,d){return c[u]||(c[u]=d!==void 0?d:{})})("versions",[]).push({version:r.version,mode:o("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(n,s,o){var r=o("7726"),a=o("8378"),l=o("32e9"),c=o("2aba"),u=o("9b43"),d="prototype",h=function(f,g,p){var v=f&h.F,y=f&h.G,C=f&h.S,m=f&h.P,w=f&h.B,E=y?r:C?r[g]||(r[g]={}):(r[g]||{})[d],R=y?a:a[g]||(a[g]={}),O=R[d]||(R[d]={}),A,D,L,S;y&&(p=g);for(A in p)D=!v&&E&&E[A]!==void 0,L=(D?E:p)[A],S=w&&D?u(L,r):m&&typeof L=="function"?u(Function.call,L):L,E&&c(E,A,L,f&h.U),R[A]!=L&&l(R,A,S),m&&O[A]!=L&&(O[A]=L)};r.core=a,h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,n.exports=h},"5eda":function(n,s,o){var r=o("5ca1"),a=o("8378"),l=o("79e5");n.exports=function(c,u){var d=(a.Object||{})[c]||Object[c],h={};h[c]=u(d),r(r.S+r.F*l(function(){d(1)}),"Object",h)}},"5f1b":function(n,s,o){var r=o("23c6"),a=RegExp.prototype.exec;n.exports=function(l,c){var u=l.exec;if(typeof u=="function"){var d=u.call(l,c);if(typeof d!="object")throw new TypeError("RegExp exec method returned something other than an Object or null");return d}if(r(l)!=="RegExp")throw new TypeError("RegExp#exec called on incompatible receiver");return a.call(l,c)}},"613b":function(n,s,o){var r=o("5537")("keys"),a=o("ca5a");n.exports=function(l){return r[l]||(r[l]=a(l))}},"626a":function(n,s,o){var r=o("2d95");n.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return r(a)=="String"?a.split(""):Object(a)}},6762:function(n,s,o){var r=o("5ca1"),a=o("c366")(!0);r(r.P,"Array",{includes:function(l){return a(this,l,arguments.length>1?arguments[1]:void 0)}}),o("9c6c")("includes")},6821:function(n,s,o){var r=o("626a"),a=o("be13");n.exports=function(l){return r(a(l))}},"69a8":function(n,s){var o={}.hasOwnProperty;n.exports=function(r,a){return o.call(r,a)}},"6a99":function(n,s,o){var r=o("d3f4");n.exports=function(a,l){if(!r(a))return a;var c,u;if(l&&typeof(c=a.toString)=="function"&&!r(u=c.call(a))||typeof(c=a.valueOf)=="function"&&!r(u=c.call(a))||!l&&typeof(c=a.toString)=="function"&&!r(u=c.call(a)))return u;throw TypeError("Can't convert object to primitive value")}},7333:function(n,s,o){var r=o("0d58"),a=o("2621"),l=o("52a7"),c=o("4bf8"),u=o("626a"),d=Object.assign;n.exports=!d||o("79e5")(function(){var h={},f={},g=Symbol(),p="abcdefghijklmnopqrst";return h[g]=7,p.split("").forEach(function(v){f[v]=v}),d({},h)[g]!=7||Object.keys(d({},f)).join("")!=p})?function(h,f){for(var g=c(h),p=arguments.length,v=1,y=a.f,C=l.f;p>v;)for(var m=u(arguments[v++]),w=y?r(m).concat(y(m)):r(m),E=w.length,R=0,O;E>R;)C.call(m,O=w[R++])&&(g[O]=m[O]);return g}:d},7726:function(n,s){var o=n.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=o)},"77f1":function(n,s,o){var r=o("4588"),a=Math.max,l=Math.min;n.exports=function(c,u){return c=r(c),c<0?a(c+u,0):l(c,u)}},"79e5":function(n,s){n.exports=function(o){try{return!!o()}catch{return!0}}},"7f20":function(n,s,o){var r=o("86cc").f,a=o("69a8"),l=o("2b4c")("toStringTag");n.exports=function(c,u,d){c&&!a(c=d?c:c.prototype,l)&&r(c,l,{configurable:!0,value:u})}},8378:function(n,s){var o=n.exports={version:"2.6.5"};typeof __e=="number"&&(__e=o)},"84f2":function(n,s){n.exports={}},"86cc":function(n,s,o){var r=o("cb7c"),a=o("c69a"),l=o("6a99"),c=Object.defineProperty;s.f=o("9e1e")?Object.defineProperty:function(u,d,h){if(r(u),d=l(d,!0),r(h),a)try{return c(u,d,h)}catch{}if("get"in h||"set"in h)throw TypeError("Accessors not supported!");return"value"in h&&(u[d]=h.value),u}},"9b43":function(n,s,o){var r=o("d8e8");n.exports=function(a,l,c){if(r(a),l===void 0)return a;switch(c){case 1:return function(u){return a.call(l,u)};case 2:return function(u,d){return a.call(l,u,d)};case 3:return function(u,d,h){return a.call(l,u,d,h)}}return function(){return a.apply(l,arguments)}}},"9c6c":function(n,s,o){var r=o("2b4c")("unscopables"),a=Array.prototype;a[r]==null&&o("32e9")(a,r,{}),n.exports=function(l){a[r][l]=!0}},"9def":function(n,s,o){var r=o("4588"),a=Math.min;n.exports=function(l){return l>0?a(r(l),9007199254740991):0}},"9e1e":function(n,s,o){n.exports=!o("79e5")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},a352:function(n,s){n.exports=t},a481:function(n,s,o){var r=o("cb7c"),a=o("4bf8"),l=o("9def"),c=o("4588"),u=o("0390"),d=o("5f1b"),h=Math.max,f=Math.min,g=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g,y=function(C){return C===void 0?C:String(C)};o("214f")("replace",2,function(C,m,w,E){return[function(O,A){var D=C(this),L=O==null?void 0:O[m];return L!==void 0?L.call(O,D,A):w.call(String(D),O,A)},function(O,A){var D=E(w,O,this,A);if(D.done)return D.value;var L=r(O),S=String(this),x=typeof A=="function";x||(A=String(A));var T=L.global;if(T){var H=L.unicode;L.lastIndex=0}for(var Y=[];;){var Q=d(L,S);if(Q===null||(Y.push(Q),!T))break;var te=String(Q[0]);te===""&&(L.lastIndex=u(S,l(L.lastIndex),H))}for(var F="",k=0,q=0;q<Y.length;q++){Q=Y[q];for(var V=String(Q[0]),J=h(f(c(Q.index),S.length),0),ae=[],se=1;se<Q.length;se++)ae.push(y(Q[se]));var ce=Q.groups;if(x){var re=[V].concat(ae,J,S);ce!==void 0&&re.push(ce);var K=String(A.apply(void 0,re))}else K=R(V,S,J,ae,ce,A);J>=k&&(F+=S.slice(k,J)+K,k=J+V.length)}return F+S.slice(k)}];function R(O,A,D,L,S,x){var T=D+O.length,H=L.length,Y=v;return S!==void 0&&(S=a(S),Y=p),w.call(x,Y,function(Q,te){var F;switch(te.charAt(0)){case"$":return"$";case"&":return O;case"`":return A.slice(0,D);case"'":return A.slice(T);case"<":F=S[te.slice(1,-1)];break;default:var k=+te;if(k===0)return Q;if(k>H){var q=g(k/10);return q===0?Q:q<=H?L[q-1]===void 0?te.charAt(1):L[q-1]+te.charAt(1):Q}F=L[k-1]}return F===void 0?"":F})}})},aae3:function(n,s,o){var r=o("d3f4"),a=o("2d95"),l=o("2b4c")("match");n.exports=function(c){var u;return r(c)&&((u=c[l])!==void 0?!!u:a(c)=="RegExp")}},ac6a:function(n,s,o){for(var r=o("cadf"),a=o("0d58"),l=o("2aba"),c=o("7726"),u=o("32e9"),d=o("84f2"),h=o("2b4c"),f=h("iterator"),g=h("toStringTag"),p=d.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=a(v),C=0;C<y.length;C++){var m=y[C],w=v[m],E=c[m],R=E&&E.prototype,O;if(R&&(R[f]||u(R,f,p),R[g]||u(R,g,m),d[m]=p,w))for(O in r)R[O]||l(R,O,r[O],!0)}},b0c5:function(n,s,o){var r=o("520a");o("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},be13:function(n,s){n.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},c366:function(n,s,o){var r=o("6821"),a=o("9def"),l=o("77f1");n.exports=function(c){return function(u,d,h){var f=r(u),g=a(f.length),p=l(h,g),v;if(c&&d!=d){for(;g>p;)if(v=f[p++],v!=v)return!0}else for(;g>p;p++)if((c||p in f)&&f[p]===d)return c||p||0;return!c&&-1}}},c649:function(n,s,o){(function(r){o.d(s,"c",function(){return f}),o.d(s,"a",function(){return d}),o.d(s,"b",function(){return l}),o.d(s,"d",function(){return h}),o("a481");function a(){return typeof window<"u"?window.console:r.console}var l=a();function c(g){var p=Object.create(null);return function(v){var y=p[v];return y||(p[v]=g(v))}}var u=/-(\w)/g,d=c(function(g){return g.replace(u,function(p,v){return v?v.toUpperCase():""})});function h(g){g.parentElement!==null&&g.parentElement.removeChild(g)}function f(g,p,v){var y=v===0?g.children[0]:g.children[v-1].nextSibling;g.insertBefore(p,y)}}).call(this,o("c8ba"))},c69a:function(n,s,o){n.exports=!o("9e1e")&&!o("79e5")(function(){return Object.defineProperty(o("230e")("div"),"a",{get:function(){return 7}}).a!=7})},c8ba:function(n,s){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}n.exports=o},ca5a:function(n,s){var o=0,r=Math.random();n.exports=function(a){return"Symbol(".concat(a===void 0?"":a,")_",(++o+r).toString(36))}},cadf:function(n,s,o){var r=o("9c6c"),a=o("d53b"),l=o("84f2"),c=o("6821");n.exports=o("01f9")(Array,"Array",function(u,d){this._t=c(u),this._i=0,this._k=d},function(){var u=this._t,d=this._k,h=this._i++;return!u||h>=u.length?(this._t=void 0,a(1)):d=="keys"?a(0,h):d=="values"?a(0,u[h]):a(0,[h,u[h]])},"values"),l.Arguments=l.Array,r("keys"),r("values"),r("entries")},cb7c:function(n,s,o){var r=o("d3f4");n.exports=function(a){if(!r(a))throw TypeError(a+" is not an object!");return a}},ce10:function(n,s,o){var r=o("69a8"),a=o("6821"),l=o("c366")(!1),c=o("613b")("IE_PROTO");n.exports=function(u,d){var h=a(u),f=0,g=[],p;for(p in h)p!=c&&r(h,p)&&g.push(p);for(;d.length>f;)r(h,p=d[f++])&&(~l(g,p)||g.push(p));return g}},d2c8:function(n,s,o){var r=o("aae3"),a=o("be13");n.exports=function(l,c,u){if(r(c))throw TypeError("String#"+u+" doesn't accept regex!");return String(a(l))}},d3f4:function(n,s){n.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},d53b:function(n,s){n.exports=function(o,r){return{value:r,done:!!o}}},d8e8:function(n,s){n.exports=function(o){if(typeof o!="function")throw TypeError(o+" is not a function!");return o}},e11e:function(n,s){n.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(n,s,o){var r=o("5ca1"),a=o("9def"),l=o("d2c8"),c="startsWith",u=""[c];r(r.P+r.F*o("5147")(c),"String",{startsWith:function(d){var h=l(this,d,c),f=a(Math.min(arguments.length>1?arguments[1]:void 0,h.length)),g=String(d);return u?u.call(h,g,f):h.slice(f,f+g.length)===g}})},f6fd:function(n,s){(function(o){var r="currentScript",a=o.getElementsByTagName("script");r in o||Object.defineProperty(o,r,{get:function(){try{throw new Error}catch(u){var l,c=(/.*at [^\(]*\((.*):.+:.+\)$/ig.exec(u.stack)||[!1])[1];for(l in a)if(a[l].src==c||a[l].readyState=="interactive")return a[l];return null}}})})(document)},f751:function(n,s,o){var r=o("5ca1");r(r.S+r.F,"Object",{assign:o("7333")})},fa5b:function(n,s,o){n.exports=o("5537")("native-function-to-string",Function.toString)},fab2:function(n,s,o){var r=o("7726").document;n.exports=r&&r.documentElement},fb15:function(n,s,o){if(o.r(s),typeof window<"u"){o("f6fd");var r;(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(o.p=r[1])}o("f751"),o("f559"),o("ac6a"),o("cadf"),o("456d");function a(V){if(Array.isArray(V))return V}function l(V,J){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(V)))){var ae=[],se=!0,ce=!1,re=void 0;try{for(var K=V[Symbol.iterator](),he;!(se=(he=K.next()).done)&&(ae.push(he.value),!(J&&ae.length===J));se=!0);}catch(ne){ce=!0,re=ne}finally{try{!se&&K.return!=null&&K.return()}finally{if(ce)throw re}}return ae}}function c(V,J){(J==null||J>V.length)&&(J=V.length);for(var ae=0,se=new Array(J);ae<J;ae++)se[ae]=V[ae];return se}function u(V,J){if(V){if(typeof V=="string")return c(V,J);var ae=Object.prototype.toString.call(V).slice(8,-1);if(ae==="Object"&&V.constructor&&(ae=V.constructor.name),ae==="Map"||ae==="Set")return Array.from(V);if(ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ae))return c(V,J)}}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(V,J){return a(V)||l(V,J)||u(V,J)||d()}o("6762"),o("2fdb");function f(V){if(Array.isArray(V))return c(V)}function g(V){if(typeof Symbol<"u"&&Symbol.iterator in Object(V))return Array.from(V)}function p(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(V){return f(V)||g(V)||u(V)||p()}var y=o("a352"),C=o.n(y),m=o("c649");function w(V,J,ae){return ae===void 0||(V=V||{},V[J]=ae),V}function E(V,J){return V.map(function(ae){return ae.elm}).indexOf(J)}function R(V,J,ae,se){if(!V)return[];var ce=V.map(function(he){return he.elm}),re=J.length-se,K=v(J).map(function(he,ne){return ne>=re?ce.length:ce.indexOf(he)});return ae?K.filter(function(he){return he!==-1}):K}function O(V,J){var ae=this;this.$nextTick(function(){return ae.$emit(V.toLowerCase(),J)})}function A(V){var J=this;return function(ae){J.realList!==null&&J["onDrag"+V](ae),O.call(J,V,ae)}}function D(V){return["transition-group","TransitionGroup"].includes(V)}function L(V){if(!V||V.length!==1)return!1;var J=h(V,1),ae=J[0].componentOptions;return ae?D(ae.tag):!1}function S(V,J,ae){return V[ae]||(J[ae]?J[ae]():void 0)}function x(V,J,ae){var se=0,ce=0,re=S(J,ae,"header");re&&(se=re.length,V=V?[].concat(v(re),v(V)):v(re));var K=S(J,ae,"footer");return K&&(ce=K.length,V=V?[].concat(v(V),v(K)):v(K)),{children:V,headerOffset:se,footerOffset:ce}}function T(V,J){var ae=null,se=function(ne,ie){ae=w(ae,ne,ie)},ce=Object.keys(V).filter(function(ne){return ne==="id"||ne.startsWith("data-")}).reduce(function(ne,ie){return ne[ie]=V[ie],ne},{});if(se("attrs",ce),!J)return ae;var re=J.on,K=J.props,he=J.attrs;return se("on",re),se("props",K),Object.assign(ae.attrs,he),ae}var H=["Start","Add","Remove","Update","End"],Y=["Choose","Unchoose","Sort","Filter","Clone"],Q=["Move"].concat(H,Y).map(function(V){return"on"+V}),te=null,F={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(V){return V}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},k={name:"draggable",inheritAttrs:!1,props:F,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(V){var J=this.$slots.default;this.transitionMode=L(J);var ae=x(J,this.$slots,this.$scopedSlots),se=ae.children,ce=ae.headerOffset,re=ae.footerOffset;this.headerOffset=ce,this.footerOffset=re;var K=T(this.$attrs,this.componentData);return V(this.getTag(),K,se)},created:function(){this.list!==null&&this.value!==null&&m.b.error("Value and list props are mutually exclusive! Please set one or another."),this.element!=="div"&&m.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),this.options!==void 0&&m.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var V=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var J={};H.forEach(function(ce){J["on"+ce]=A.call(V,ce)}),Y.forEach(function(ce){J["on"+ce]=O.bind(V,ce)});var ae=Object.keys(this.$attrs).reduce(function(ce,re){return ce[Object(m.a)(re)]=V.$attrs[re],ce},{}),se=Object.assign({},this.options,ae,J,{onMove:function(ce,re){return V.onDragMove(ce,re)}});!("draggable"in se)&&(se.draggable=">*"),this._sortable=new C.a(this.rootContainer,se),this.computeIndexes()},beforeDestroy:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(V){this.updateOptions(V)},deep:!0},$attrs:{handler:function(V){this.updateOptions(V)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var V=this._vnode.fnOptions;return V&&V.functional},getTag:function(){return this.tag||this.element},updateOptions:function(V){for(var J in V){var ae=Object(m.a)(J);Q.indexOf(ae)===-1&&this._sortable.option(ae,V[J])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var V=this.$slots.default;return this.transitionMode?V[0].child.$slots.default:V},computeIndexes:function(){var V=this;this.$nextTick(function(){V.visibleIndexes=R(V.getChildrenNodes(),V.rootContainer.children,V.transitionMode,V.footerOffset)})},getUnderlyingVm:function(V){var J=E(this.getChildrenNodes()||[],V);if(J===-1)return null;var ae=this.realList[J];return{index:J,element:ae}},getUnderlyingPotencialDraggableComponent:function(V){var J=V.__vue__;return!J||!J.$options||!D(J.$options._componentTag)?!("realList"in J)&&J.$children.length===1&&"realList"in J.$children[0]?J.$children[0]:J:J.$parent},emitChanges:function(V){var J=this;this.$nextTick(function(){J.$emit("change",V)})},alterList:function(V){if(this.list){V(this.list);return}var J=v(this.value);V(J),this.$emit("input",J)},spliceList:function(){var V=arguments,J=function(ae){return ae.splice.apply(ae,v(V))};this.alterList(J)},updatePosition:function(V,J){var ae=function(se){return se.splice(J,0,se.splice(V,1)[0])};this.alterList(ae)},getRelatedContextFromMoveEvent:function(V){var J=V.to,ae=V.related,se=this.getUnderlyingPotencialDraggableComponent(J);if(!se)return{component:se};var ce=se.realList,re={list:ce,component:se};if(J!==ae&&ce&&se.getUnderlyingVm){var K=se.getUnderlyingVm(ae);if(K)return Object.assign(K,re)}return re},getVmIndex:function(V){var J=this.visibleIndexes,ae=J.length;return V>ae-1?ae:J[V]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(V){if(!(!this.noTransitionOnDrag||!this.transitionMode)){var J=this.getChildrenNodes();J[V].data=null;var ae=this.getComponent();ae.children=[],ae.kept=void 0}},onDragStart:function(V){this.context=this.getUnderlyingVm(V.item),V.item._underlying_vm_=this.clone(this.context.element),te=V.item},onDragAdd:function(V){var J=V.item._underlying_vm_;if(J!==void 0){Object(m.d)(V.item);var ae=this.getVmIndex(V.newIndex);this.spliceList(ae,0,J),this.computeIndexes();var se={element:J,newIndex:ae};this.emitChanges({added:se})}},onDragRemove:function(V){if(Object(m.c)(this.rootContainer,V.item,V.oldIndex),V.pullMode==="clone"){Object(m.d)(V.clone);return}var J=this.context.index;this.spliceList(J,1);var ae={element:this.context.element,oldIndex:J};this.resetTransitionData(J),this.emitChanges({removed:ae})},onDragUpdate:function(V){Object(m.d)(V.item),Object(m.c)(V.from,V.item,V.oldIndex);var J=this.context.index,ae=this.getVmIndex(V.newIndex);this.updatePosition(J,ae);var se={element:this.context.element,oldIndex:J,newIndex:ae};this.emitChanges({moved:se})},updateProperty:function(V,J){V.hasOwnProperty(J)&&(V[J]+=this.headerOffset)},computeFutureIndex:function(V,J){if(!V.element)return 0;var ae=v(J.to.children).filter(function(K){return K.style.display!=="none"}),se=ae.indexOf(J.related),ce=V.component.getVmIndex(se),re=ae.indexOf(te)!==-1;return re||!J.willInsertAfter?ce:ce+1},onDragMove:function(V,J){var ae=this.move;if(!ae||!this.realList)return!0;var se=this.getRelatedContextFromMoveEvent(V),ce=this.context,re=this.computeFutureIndex(se,V);Object.assign(ce,{futureIndex:re});var K=Object.assign({},V,{relatedContext:se,draggedContext:ce});return ae(K,J)},onDragEnd:function(){this.computeIndexes(),te=null}}};typeof window<"u"&&"Vue"in window&&window.Vue.component("draggable",k);var q=k;s.default=q}}).default})})(D$);typeof window<"u"&&window.Vue&&window.Vue.use(wP);const u3={name:"pivotComponent",data(){return{columnDefs:null,rowData:{},API:null}},methods:{load(){var i=this;const e=location.host.split(":")[0],t=location.protocol+"//"+e+"/";i.API=t+"api/pivot",console.log(i.API),si(i.API).then(n=>n.json()).then(function(n){i.rowData=n})}},components:{VuePivottable:wP},beforeMount(){this.load()}};function d3(i,e,t,n,s,o){const r=de("vue-pivottable");return me(),kt(He,null,[De(" Pivot "),b(r,{data:[{color:"blue",shape:"circle"},{color:"red",shape:"triangle"}],rows:["color"],cols:["shape"]})],64)}const h3=nt(u3,[["render",d3]]),f3={name:"pivotView",setup(){return{}},components:{pivot:h3}};function p3(i,e,t,n,s,o){const r=de("pivot");return me(),we(r)}const g3=nt(f3,[["render",p3]]),m3={name:"dashboardCardNumbers",props:{data:{},caption:String,image:String},methods:{getLabel(i){return qn("gender",i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i}},setup(i){return{t:Oe}}};function v3(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("v-list-item"),u=de("v-divider"),d=de("v-list"),h=de("v-card-text"),f=de("v-card");return me(),we(f,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t("Animals")),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(h,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"}},{append:oe(()=>[De(Me(n.t("Count")),1)]),default:oe(()=>[De(Me(n.t("Gender"))+" ",1)]),_:1}),b(u),(me(!0),kt(He,null,Wo(t.data,g=>(me(),we(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"},key:g.genderId},{append:oe(()=>[De(Me(g.count),1)]),default:oe(()=>[De(Me(o.getLabel(g.genderId))+" ",1)]),_:2},1024))),128)),b(c,null,{append:oe(()=>[De(Me(o.sum),1)]),default:oe(()=>[De(Me(n.t("Sum"))+" ",1)]),_:1})]),_:1})]),_:1})]),_:1})}const C3=nt(m3,[["render",v3]]),y3={name:"dashboardCardNumbers",props:{data:{},caption:String,image:String},methods:{open(i){Rs.push("animal/"+i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i}},setup(i){return{t:Oe}}};function b3(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("v-list-item"),u=de("v-divider"),d=de("v-list"),h=de("v-card-text"),f=de("v-card");return me(),we(f,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t(t.caption)),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(h,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"}},{append:oe(()=>[De(Me(n.t("Remark")),1)]),default:oe(()=>[De(Me(n.t("tag"))+" ",1)]),_:1}),b(u),(me(!0),kt(He,null,Wo(t.data,g=>(me(),we(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"},onClick:p=>o.open(g.label)},{append:oe(()=>[De(Me(g.remark),1)]),default:oe(()=>[De(Me(g.label)+" ",1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})}const w3=nt(y3,[["render",b3]]);/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function wf(i){return i+.5|0}const zr=(i,e,t)=>Math.max(Math.min(i,t),e);function nd(i){return zr(wf(i*2.55),0,255)}function ta(i){return zr(wf(i*255),0,255)}function nr(i){return zr(wf(i/2.55)/100,0,1)}function RR(i){return zr(wf(i*100),0,100)}const gs={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Py=[..."0123456789ABCDEF"],S3=i=>Py[i&15],E3=i=>Py[(i&240)>>4]+Py[i&15],Kf=i=>(i&240)>>4===(i&15),_3=i=>Kf(i.r)&&Kf(i.g)&&Kf(i.b)&&Kf(i.a);function R3(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&gs[i[1]]*17,g:255&gs[i[2]]*17,b:255&gs[i[3]]*17,a:e===5?gs[i[4]]*17:255}:(e===7||e===9)&&(t={r:gs[i[1]]<<4|gs[i[2]],g:gs[i[3]]<<4|gs[i[4]],b:gs[i[5]]<<4|gs[i[6]],a:e===9?gs[i[7]]<<4|gs[i[8]]:255})),t}const T3=(i,e)=>i<255?e(i):"";function x3(i){var e=_3(i)?S3:E3;return i?"#"+e(i.r)+e(i.g)+e(i.b)+T3(i.a,e):void 0}const A3=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function MP(i,e,t){const n=e*Math.min(t,1-t),s=(o,r=(o+i/30)%12)=>t-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function D3(i,e,t){const n=(s,o=(s+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function O3(i,e,t){const n=MP(i,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)n[s]*=1-e-t,n[s]+=e;return n}function P3(i,e,t,n,s){return i===s?(e-t)/n+(e<t?6:0):e===s?(t-i)/n+2:(i-e)/n+4}function LS(i){const t=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(t,n,s),r=Math.min(t,n,s),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=P3(t,n,s,u,o),l=l*60+.5),[l|0,c||0,a]}function FS(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(ta)}function NS(i,e,t){return FS(MP,i,e,t)}function I3(i,e,t){return FS(O3,i,e,t)}function M3(i,e,t){return FS(D3,i,e,t)}function LP(i){return(i%360+360)%360}function L3(i){const e=A3.exec(i);let t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?nd(+e[5]):ta(+e[5]));const s=LP(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?n=I3(s,o,r):e[1]==="hsv"?n=M3(s,o,r):n=NS(s,o,r),{r:n[0],g:n[1],b:n[2],a:t}}function F3(i,e){var t=LS(i);t[0]=LP(t[0]+e),t=NS(t),i.r=t[0],i.g=t[1],i.b=t[2]}function N3(i){if(!i)return;const e=LS(i),t=e[0],n=RR(e[1]),s=RR(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${s}%, ${nr(i.a)})`:`hsl(${t}, ${n}%, ${s}%)`}const TR={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},xR={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function k3(){const i={},e=Object.keys(xR),t=Object.keys(TR);let n,s,o,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],s=0;s<t.length;s++)o=t[s],a=a.replace(o,TR[o]);o=parseInt(xR[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}let Yf;function V3(i){Yf||(Yf=k3(),Yf.transparent=[0,0,0,0]);const e=Yf[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const G3=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function H3(i){const e=G3.exec(i);let t=255,n,s,o;if(e){if(e[7]!==n){const r=+e[7];t=e[8]?nd(r):zr(r*255,0,255)}return n=+e[1],s=+e[3],o=+e[5],n=255&(e[2]?nd(n):zr(n,0,255)),s=255&(e[4]?nd(s):zr(s,0,255)),o=255&(e[6]?nd(o):zr(o,0,255)),{r:n,g:s,b:o,a:t}}}function B3(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${nr(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const iC=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ic=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function W3(i,e,t){const n=ic(nr(i.r)),s=ic(nr(i.g)),o=ic(nr(i.b));return{r:ta(iC(n+t*(ic(nr(e.r))-n))),g:ta(iC(s+t*(ic(nr(e.g))-s))),b:ta(iC(o+t*(ic(nr(e.b))-o))),a:i.a+t*(e.a-i.a)}}function qf(i,e,t){if(i){let n=LS(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=NS(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function FP(i,e){return i&&Object.assign(e||{},i)}function AR(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=ta(i[3]))):(e=FP(i,{r:0,g:0,b:0,a:1}),e.a=ta(e.a)),e}function U3(i){return i.charAt(0)==="r"?H3(i):L3(i)}class hh{constructor(e){if(e instanceof hh)return e;const t=typeof e;let n;t==="object"?n=AR(e):t==="string"&&(n=R3(e)||V3(e)||U3(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=FP(this._rgb);return e&&(e.a=nr(e.a)),e}set rgb(e){this._rgb=AR(e)}rgbString(){return this._valid?B3(this._rgb):void 0}hexString(){return this._valid?x3(this._rgb):void 0}hslString(){return this._valid?N3(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,s=e.rgb;let o;const r=t===o?.5:t,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=W3(this._rgb,e._rgb,t)),this}clone(){return new hh(this.rgb)}alpha(e){return this._rgb.a=ta(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=wf(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return qf(this._rgb,2,e),this}darken(e){return qf(this._rgb,2,-e),this}saturate(e){return qf(this._rgb,1,e),this}desaturate(e){return qf(this._rgb,1,-e),this}rotate(e){return F3(this._rgb,e),this}}/*!
* Chart.js v4.3.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/function Qo(){}const j3=(()=>{let i=0;return()=>i++})();function Vt(i){return i===null||typeof i>"u"}function Jt(i){if(Array.isArray&&Array.isArray(i))return!0;const e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Tt(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function ki(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function jn(i,e){return ki(i)?i:e}function Dt(i,e){return typeof i>"u"?e:i}const $3=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,NP=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function jt(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function Ft(i,e,t,n){let s,o,r;if(Jt(i))if(o=i.length,n)for(s=o-1;s>=0;s--)e.call(t,i[s],s);else for(s=0;s<o;s++)e.call(t,i[s],s);else if(Tt(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)e.call(t,i[r[s]],r[s])}function Cg(i,e){let t,n,s,o;if(!i||!e||i.length!==e.length)return!1;for(t=0,n=i.length;t<n;++t)if(s=i[t],o=e[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function yg(i){if(Jt(i))return i.map(yg);if(Tt(i)){const e=Object.create(null),t=Object.keys(i),n=t.length;let s=0;for(;s<n;++s)e[t[s]]=yg(i[t[s]]);return e}return i}function kP(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function z3(i,e,t,n){if(!kP(i))return;const s=e[i],o=t[i];Tt(s)&&Tt(o)?fh(s,o,n):e[i]=yg(o)}function fh(i,e,t){const n=Jt(e)?e:[e],s=n.length;if(!Tt(i))return i;t=t||{};const o=t.merger||z3;let r;for(let a=0;a<s;++a){if(r=n[a],!Tt(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],i,r,t)}return i}function bd(i,e){return fh(i,e,{merger:K3})}function K3(i,e,t){if(!kP(i))return;const n=e[i],s=t[i];Tt(n)&&Tt(s)?bd(n,s):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=yg(s))}const DR={"":i=>i,x:i=>i.x,y:i=>i.y};function Y3(i){const e=i.split("."),t=[];let n="";for(const s of e)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function q3(i){const e=Y3(i);return t=>{for(const n of e){if(n==="")break;t=t&&t[n]}return t}}function ha(i,e){return(DR[e]||(DR[e]=q3(e)))(i)}function kS(i){return i.charAt(0).toUpperCase()+i.slice(1)}const ph=i=>typeof i<"u",fa=i=>typeof i=="function",OR=(i,e)=>{if(i.size!==e.size)return!1;for(const t of i)if(!e.has(t))return!1;return!0};function X3(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const Ri=Math.PI,wn=2*Ri,bg=Number.POSITIVE_INFINITY,Q3=Ri/180,rn=Ri/2,Ba=Ri/4,PR=Ri*2/3,Kr=Math.log10,ia=Math.sign;function Tp(i,e,t){return Math.abs(i-e)<t}function IR(i){const e=Math.round(i);i=Tp(i,e,i/1e3)?e:i;const t=Math.pow(10,Math.floor(Kr(i))),n=i/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function Z3(i){const e=[],t=Math.sqrt(i);let n;for(n=1;n<t;n++)i%n===0&&(e.push(n),e.push(i/n));return t===(t|0)&&e.push(t),e.sort((s,o)=>s-o).pop(),e}function wg(i){return!isNaN(parseFloat(i))&&isFinite(i)}function J3(i,e){const t=Math.round(i);return t-e<=i&&t+e>=i}function VP(i,e,t){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Qs(i){return i*(Ri/180)}function VS(i){return i*(180/Ri)}function MR(i){if(!ki(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function ez(i,e){const t=e.x-i.x,n=e.y-i.y,s=Math.sqrt(t*t+n*n);let o=Math.atan2(n,t);return o<-.5*Ri&&(o+=wn),{angle:o,distance:s}}function tz(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function wo(i){return(i%wn+wn)%wn}function Iy(i,e,t,n){const s=wo(i),o=wo(e),r=wo(t),a=wo(o-s),l=wo(r-s),c=wo(s-o),u=wo(s-r);return s===o||s===r||n&&o===r||a>l&&c<u}function Zs(i,e,t){return Math.max(e,Math.min(t,i))}function iz(i){return Zs(i,-32768,32767)}function pc(i,e,t,n=1e-6){return i>=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function GS(i,e,t){t=t||(r=>i[r]<e);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n}}const My=(i,e,t,n)=>GS(i,t,n?s=>{const o=i[s][e];return o<t||o===t&&i[s+1][e]===t}:s=>i[s][e]<t),nz=(i,e,t)=>GS(i,t,n=>i[n][e]>=t);function sz(i,e,t){let n=0,s=i.length;for(;n<s&&i[n]<e;)n++;for(;s>n&&i[s-1]>t;)s--;return n>0||s<i.length?i.slice(n,s):i}const GP=["push","pop","shift","splice","unshift"];function oz(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),GP.forEach(t=>{const n="_onData"+kS(t),s=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function LR(i,e){const t=i._chartjs;if(!t)return;const n=t.listeners,s=n.indexOf(e);s!==-1&&n.splice(s,1),!(n.length>0)&&(GP.forEach(o=>{delete i[o]}),delete i._chartjs)}function HP(i){const e=new Set(i);return e.size===i.length?i:Array.from(e)}const BP=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function WP(i,e){let t=[],n=!1;return function(...s){t=s,n||(n=!0,BP.call(window,()=>{n=!1,i.apply(e,t)}))}}function rz(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}const HS=i=>i==="start"?"left":i==="end"?"right":"center",Zi=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2,az=(i,e,t,n)=>i===(n?"left":"right")?t:i==="center"?(e+t)/2:e,Xf=i=>i===0||i===1,FR=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*wn/t)),NR=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*wn/t)+1,wd={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*rn)+1,easeOutSine:i=>Math.sin(i*rn),easeInOutSine:i=>-.5*(Math.cos(Ri*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Xf(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Xf(i)?i:FR(i,.075,.3),easeOutElastic:i=>Xf(i)?i:NR(i,.075,.3),easeInOutElastic(i){return Xf(i)?i:i<.5?.5*FR(i*2,.1125,.45):.5+.5*NR(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-wd.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?wd.easeInBounce(i*2)*.5:wd.easeOutBounce(i*2-1)*.5+.5};function UP(i){if(i&&typeof i=="object"){const e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function kR(i){return UP(i)?i:new hh(i)}function nC(i){return UP(i)?i:new hh(i).saturate(.5).darken(.1).hexString()}const lz=["x","y","borderWidth","radius","tension"],cz=["color","borderColor","backgroundColor"];function uz(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:cz},numbers:{type:"number",properties:lz}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function dz(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const VR=new Map;function hz(i,e){e=e||{};const t=i+JSON.stringify(e);let n=VR.get(t);return n||(n=new Intl.NumberFormat(i,e),VR.set(t,n)),n}function Sf(i,e,t){return hz(e,t).format(i)}const jP={values(i){return Jt(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";const n=this.chart.options.locale;let s,o=i;if(t.length>1){const c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=fz(i,t)}const r=Kr(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Sf(i,n,l)},logarithmic(i,e,t){if(i===0)return"0";const n=t[e].significand||i/Math.pow(10,Math.floor(Kr(i)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?jP.numeric.call(this,i,e,t):""}};function fz(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var Jm={formatters:jP};function pz(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Jm.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const _l=Object.create(null),Ly=Object.create(null);function Sd(i,e){if(!e)return i;const t=e.split(".");for(let n=0,s=t.length;n<s;++n){const o=t[n];i=i[o]||(i[o]=Object.create(null))}return i}function sC(i,e,t){return typeof e=="string"?fh(Sd(i,e),t):fh(Sd(i,""),e)}class gz{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>nC(s.backgroundColor),this.hoverBorderColor=(n,s)=>nC(s.borderColor),this.hoverColor=(n,s)=>nC(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return sC(this,e,t)}get(e){return Sd(this,e)}describe(e,t){return sC(Ly,e,t)}override(e,t){return sC(_l,e,t)}route(e,t,n,s){const o=Sd(this,e),r=Sd(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){const l=this[a],c=r[s];return Tt(l)?Object.assign({},c,l):Dt(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(t=>t(this))}}var ci=new gz({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[uz,dz,pz]);function mz(i){return!i||Vt(i.size)||Vt(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Sg(i,e,t,n,s){let o=e[s];return o||(o=e[s]=i.measureText(s).width,t.push(s)),o>n&&(n=o),n}function vz(i,e,t,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let r=0;const a=t.length;let l,c,u,d,h;for(l=0;l<a;l++)if(d=t[l],d!=null&&!Jt(d))r=Sg(i,s,o,r,d);else if(Jt(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!Jt(h)&&(r=Sg(i,s,o,r,h));i.restore();const f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Wa(i,e,t){const n=i.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*n)/n+s}function GR(i,e){e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore()}function HR(i,e,t,n){$P(i,e,t,n,null)}function $P(i,e,t,n,s){let o,r,a,l,c,u,d,h;const f=e.pointStyle,g=e.rotation,p=e.radius;let v=(g||0)*Q3;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(t,n),i.rotate(v),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:s?i.ellipse(t,n,s/2,p,0,0,wn):i.arc(t,n,p,0,wn),i.closePath();break;case"triangle":u=s?s/2:p,i.moveTo(t+Math.sin(v)*u,n-Math.cos(v)*p),v+=PR,i.lineTo(t+Math.sin(v)*u,n-Math.cos(v)*p),v+=PR,i.lineTo(t+Math.sin(v)*u,n-Math.cos(v)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(v+Ba)*l,d=Math.cos(v+Ba)*(s?s/2-c:l),a=Math.sin(v+Ba)*l,h=Math.sin(v+Ba)*(s?s/2-c:l),i.arc(t-d,n-a,c,v-Ri,v-rn),i.arc(t+h,n-r,c,v-rn,v),i.arc(t+d,n+a,c,v,v+rn),i.arc(t-h,n+r,c,v+rn,v+Ri),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,u=s?s/2:l,i.rect(t-u,n-l,2*u,2*l);break}v+=Ba;case"rectRot":d=Math.cos(v)*(s?s/2:p),r=Math.cos(v)*p,a=Math.sin(v)*p,h=Math.sin(v)*(s?s/2:p),i.moveTo(t-d,n-a),i.lineTo(t+h,n-r),i.lineTo(t+d,n+a),i.lineTo(t-h,n+r),i.closePath();break;case"crossRot":v+=Ba;case"cross":d=Math.cos(v)*(s?s/2:p),r=Math.cos(v)*p,a=Math.sin(v)*p,h=Math.sin(v)*(s?s/2:p),i.moveTo(t-d,n-a),i.lineTo(t+d,n+a),i.moveTo(t+h,n-r),i.lineTo(t-h,n+r);break;case"star":d=Math.cos(v)*(s?s/2:p),r=Math.cos(v)*p,a=Math.sin(v)*p,h=Math.sin(v)*(s?s/2:p),i.moveTo(t-d,n-a),i.lineTo(t+d,n+a),i.moveTo(t+h,n-r),i.lineTo(t-h,n+r),v+=Ba,d=Math.cos(v)*(s?s/2:p),r=Math.cos(v)*p,a=Math.sin(v)*p,h=Math.sin(v)*(s?s/2:p),i.moveTo(t-d,n-a),i.lineTo(t+d,n+a),i.moveTo(t+h,n-r),i.lineTo(t-h,n+r);break;case"line":r=s?s/2:Math.cos(v)*p,a=Math.sin(v)*p,i.moveTo(t-r,n-a),i.lineTo(t+r,n+a);break;case"dash":i.moveTo(t,n),i.lineTo(t+Math.cos(v)*(s?s/2:p),n+Math.sin(v)*p);break;case!1:i.closePath();break}i.fill(),e.borderWidth>0&&i.stroke()}}function gc(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function BS(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function WS(i){i.restore()}function Cz(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),Vt(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function yz(i,e,t,n,s){if(s.strikethrough||s.underline){const o=i.measureText(n),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,u),i.lineTo(a,u),i.stroke()}}function bz(i,e){const t=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=t}function Rl(i,e,t,n,s,o={}){const r=Jt(e)?e:[e],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=s.string,Cz(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&bz(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),Vt(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,t,n,o.maxWidth)),i.fillText(c,t,n,o.maxWidth),yz(i,t,n,c,o),n+=Number(s.lineHeight);i.restore()}function gh(i,e){const{x:t,y:n,w:s,h:o,radius:r}=e;i.arc(t+r.topLeft,n+r.topLeft,r.topLeft,-rn,Ri,!0),i.lineTo(t,n+o-r.bottomLeft),i.arc(t+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,Ri,rn,!0),i.lineTo(t+s-r.bottomRight,n+o),i.arc(t+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,rn,0,!0),i.lineTo(t+s,n+r.topRight),i.arc(t+s-r.topRight,n+r.topRight,r.topRight,0,-rn,!0),i.lineTo(t+r.topLeft,n)}const wz=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Sz=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ez(i,e){const t=(""+i).match(wz);if(!t||t[1]==="normal")return e*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return e*i}const _z=i=>+i||0;function zP(i,e){const t={},n=Tt(e),s=n?Object.keys(e):e,o=Tt(i)?n?r=>Dt(i[r],i[e[r]]):r=>i[r]:()=>i;for(const r of s)t[r]=_z(o(r));return t}function KP(i){return zP(i,{top:"y",right:"x",bottom:"y",left:"x"})}function ul(i){return zP(i,["topLeft","topRight","bottomLeft","bottomRight"])}function un(i){const e=KP(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Di(i,e){i=i||{},e=e||ci.font;let t=Dt(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=Dt(i.style,e.style);n&&!(""+n).match(Sz)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:Dt(i.family,e.family),lineHeight:Ez(Dt(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:Dt(i.weight,e.weight),string:""};return s.string=mz(s),s}function Qf(i,e,t,n){let s=!0,o,r,a;for(o=0,r=i.length;o<r;++o)if(a=i[o],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),s=!1),t!==void 0&&Jt(a)&&(a=a[t%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function Rz(i,e,t){const{min:n,max:s}=i,o=NP(e,(s-n)/2),r=(a,l)=>t&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function zl(i,e){return Object.assign(Object.create(i),e)}function US(i,e=[""],t,n,s=()=>i[0]){const o=t||i;typeof n>"u"&&(n=QP("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>US([a,...i],e,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return qP(a,l,()=>Mz(l,e,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return WR(a).includes(l)},ownKeys(a){return WR(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Qc(i,e,t,n){const s={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:YP(i,n),setContext:o=>Qc(i,o,t,n),override:o=>Qc(i.override(o),e,t,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return qP(o,r,()=>xz(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function YP(i,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=i;return{allKeys:s,scriptable:t,indexable:n,isScriptable:fa(t)?t:()=>t,isIndexable:fa(n)?n:()=>n}}const Tz=(i,e)=>i?i+kS(e):e,jS=(i,e)=>Tt(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function qP(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];const n=t();return i[e]=n,n}function xz(i,e,t){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i;let a=n[e];return fa(a)&&r.isScriptable(e)&&(a=Az(e,a,i,t)),Jt(a)&&a.length&&(a=Dz(e,a,i,r.isIndexable)),jS(e,a)&&(a=Qc(a,s,o&&o[e],r)),a}function Az(i,e,t,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=t;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=e(o,r||n);return a.delete(i),jS(i,l)&&(l=$S(s._scopes,s,i,l)),l}function Dz(i,e,t,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=t;if(typeof o.index<"u"&&n(i))return e[o.index%e.length];if(Tt(e[0])){const l=e,c=s._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=$S(c,s,i,u);e.push(Qc(d,o,r&&r[i],a))}}return e}function XP(i,e,t){return fa(i)?i(e,t):i}const Oz=(i,e)=>i===!0?e:typeof i=="string"?ha(e,i):void 0;function Pz(i,e,t,n,s){for(const o of e){const r=Oz(t,o);if(r){i.add(r);const a=XP(r._fallback,t,s);if(typeof a<"u"&&a!==t&&a!==n)return a}else if(r===!1&&typeof n<"u"&&t!==n)return null}return!1}function $S(i,e,t,n){const s=e._rootScopes,o=XP(e._fallback,t,n),r=[...i,...s],a=new Set;a.add(n);let l=BR(a,r,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=BR(a,r,o,l,n),l===null)?!1:US(Array.from(a),[""],s,o,()=>Iz(e,t,n))}function BR(i,e,t,n,s){for(;t;)t=Pz(i,e,t,n,s);return t}function Iz(i,e,t){const n=i._getTarget();e in n||(n[e]={});const s=n[e];return Jt(s)&&Tt(t)?t:s||{}}function Mz(i,e,t,n){let s;for(const o of e)if(s=QP(Tz(o,i),t),typeof s<"u")return jS(i,s)?$S(t,n,i,s):s}function QP(i,e){for(const t of e){if(!t)continue;const n=t[i];if(typeof n<"u")return n}}function WR(i){let e=i._keys;return e||(e=i._keys=Lz(i._scopes)),e}function Lz(i){const e=new Set;for(const t of i)for(const n of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(n);return Array.from(e)}function Fz(i,e,t,n){const{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,u;for(a=0,l=n;a<l;++a)c=a+t,u=e[c],r[a]={r:s.parse(ha(u,o),c)};return r}function ZP(){return typeof window<"u"&&typeof document<"u"}function zS(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Eg(i,e,t){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*e.parentNode[t])):n=i,n}const ev=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Nz(i,e){return ev(i).getPropertyValue(e)}const kz=["top","right","bottom","left"];function dl(i,e,t){const n={};t=t?"-"+t:"";for(let s=0;s<4;s++){const o=kz[s];n[o]=parseFloat(i[e+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Vz=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function Gz(i,e){const t=i.touches,n=t&&t.length?t[0]:i,{offsetX:s,offsetY:o}=n;let r=!1,a,l;if(Vz(s,o,i.target))a=s,l=o;else{const c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Ka(i,e){if("native"in i)return i;const{canvas:t,currentDevicePixelRatio:n}=e,s=ev(t),o=s.boxSizing==="border-box",r=dl(s,"padding"),a=dl(s,"border","width"),{x:l,y:c,box:u}=Gz(i,t),d=r.left+(u&&a.left),h=r.top+(u&&a.top);let{width:f,height:g}=e;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/f*t.width/n),y:Math.round((c-h)/g*t.height/n)}}function Hz(i,e,t){let n,s;if(e===void 0||t===void 0){const o=zS(i);if(!o)e=i.clientWidth,t=i.clientHeight;else{const r=o.getBoundingClientRect(),a=ev(o),l=dl(a,"border","width"),c=dl(a,"padding");e=r.width-c.width-l.width,t=r.height-c.height-l.height,n=Eg(a.maxWidth,o,"clientWidth"),s=Eg(a.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:n||bg,maxHeight:s||bg}}const Zf=i=>Math.round(i*10)/10;function Bz(i,e,t,n){const s=ev(i),o=dl(s,"margin"),r=Eg(s.maxWidth,i,"clientWidth")||bg,a=Eg(s.maxHeight,i,"clientHeight")||bg,l=Hz(i,e,t);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=dl(s,"border","width"),f=dl(s,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-o.width),u=Math.max(0,n?c/n:u-o.height),c=Zf(Math.min(c,r,l.maxWidth)),u=Zf(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Zf(c/2)),(e!==void 0||t!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=Zf(Math.floor(u*n))),{width:c,height:u}}function UR(i,e,t){const n=e||1,s=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(t||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}const Wz=function(){let i=!1;try{const e={get passive(){return i=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return i}();function jR(i,e){const t=Nz(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}const Uz=function(i,e){return{x(t){return i+i+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}},jz=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,e){return i+e},leftForLtr(i,e){return i}}};function Rc(i,e,t){return i?Uz(e,t):jz()}function JP(i,e){let t,n;(e==="ltr"||e==="rtl")&&(t=i.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),i.prevTextDirection=n)}function eI(i,e){e!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",e[0],e[1]))}/*!
* Chart.js v4.3.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/class $z{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,s){const o=t.listeners[s],r=t.duration;o.forEach(a=>a({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(n-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=BP.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;const o=n.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,e,"progress")),o.length||(n.running=!1,this._notify(s,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const n=t.items;let s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Jo=new $z;const $R="transparent",zz={boolean(i,e,t){return t>.5?e:i},color(i,e,t){const n=kR(i||$R),s=n.valid&&kR(e||$R);return s&&s.valid?s.mix(n,t).hexString():e},number(i,e,t){return i+(e-i)*t}};class Kz{constructor(e,t,n,s){const o=t[n];s=Qf([e.to,s,o,e.from]);const r=Qf([e.from,o,s]);this._active=!0,this._fn=e.fn||zz[e.type||typeof r],this._easing=wd[e.easing]||wd.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);const s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=Qf([e.to,t,s,e.from]),this._from=Qf([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||t<n),!this._active){this._target[s]=a,this._notify(!0);return}if(t<0){this._target[s]=o;return}l=t/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){const t=e?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][t]()}}class tI{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Tt(e))return;const t=Object.keys(ci.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!Tt(o))return;const r={};for(const a of t)r[a]=o[a];(Jt(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(e,t){const n=t.options,s=qz(e,n);if(!s)return[];const o=this._createAnimations(s,n);return n.$shared&&Yz(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){const n=this._properties,s=[],o=e.$animations||(e.$animations={}),r=Object.keys(t),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,t));continue}const u=t[c];let d=o[c];const h=n.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){e[c]=u;continue}o[c]=d=new Kz(h,e,c,u),s.push(d)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const n=this._createAnimations(e,t);if(n.length)return Jo.add(this._chart,n),!0}}function Yz(i,e){const t=[],n=Object.keys(e);for(let s=0;s<n.length;s++){const o=i[n[s]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function qz(i,e){if(!e)return;let t=i.options;if(!t){i.options=e;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function zR(i,e){const t=i&&i.options||{},n=t.reverse,s=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:n?o:s,end:n?s:o}}function Xz(i,e,t){if(t===!1)return!1;const n=zR(i,t),s=zR(e,t);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Qz(i){let e,t,n,s;return Tt(i)?(e=i.top,t=i.right,n=i.bottom,s=i.left):e=t=n=s=i,{top:e,right:t,bottom:n,left:s,disabled:i===!1}}function iI(i,e){const t=[],n=i._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)t.push(n[s].index);return t}function KR(i,e,t,n={}){const s=i.keys,o=n.mode==="single";let r,a,l,c;if(e!==null){for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===t){if(n.all)continue;break}c=i.values[l],ki(c)&&(o||e===0||ia(e)===ia(c))&&(e+=c)}return e}}function Zz(i){const e=Object.keys(i),t=new Array(e.length);let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n],t[n]={x:o,y:i[o]};return t}function YR(i,e){const t=i&&i.options.stacked;return t||t===void 0&&e.stack!==void 0}function Jz(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}function e5(i){const{min:e,max:t,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function t5(i,e,t){const n=i[e]||(i[e]={});return n[t]||(n[t]={})}function qR(i,e,t,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const o=i[s.index];if(t&&o>0||!t&&o<0)return s.index}return null}function XR(i,e){const{chart:t,_cachedMeta:n}=i,s=t._stacks||(t._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,u=Jz(o,r,n),d=e.length;let h;for(let f=0;f<d;++f){const g=e[f],{[l]:p,[c]:v}=g,y=g._stacks||(g._stacks={});h=y[c]=t5(s,u,p),h[a]=v,h._top=qR(h,r,!0,n.type),h._bottom=qR(h,r,!1,n.type);const C=h._visualValues||(h._visualValues={});C[a]=v}}function oC(i,e){const t=i.scales;return Object.keys(t).filter(n=>t[n].axis===e).shift()}function i5(i,e){return zl(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function n5(i,e,t){return zl(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Wu(i,e){const t=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){e=e||i._parsed;for(const s of e){const o=s._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}const rC=i=>i==="reset"||i==="none",QR=(i,e)=>e?i:Object.assign({},i),s5=(i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:iI(t,!0),values:null};class hl{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=YR(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Wu(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,n=this.getDataset(),s=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,o=t.xAxisID=Dt(n.xAxisID,oC(e,"x")),r=t.yAxisID=Dt(n.yAxisID,oC(e,"y")),a=t.rAxisID=Dt(n.rAxisID,oC(e,"r")),l=t.indexAxis,c=t.iAxisID=s(l,o,r,a),u=t.vAxisID=s(l,r,o,a);t.xScale=this.getScaleForId(o),t.yScale=this.getScaleForId(r),t.rScale=this.getScaleForId(a),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&LR(this._data,this),e._stacked&&Wu(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),n=this._data;if(Tt(t))this._data=Zz(t);else if(n!==t){if(n){LR(n,this);const s=this._cachedMeta;Wu(s),s._parsed=[]}t&&Object.isExtensible(t)&&oz(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,n=this.getDataset();let s=!1;this._dataCheck();const o=t._stacked;t._stacked=YR(t.vScale,t),t.stack!==n.stack&&(s=!0,Wu(t),t.stack=n.stack),this._resyncElements(e),(s||o!==t._stacked)&&XR(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis;let l=e===0&&t===s.length?!0:n._sorted,c=e>0&&n._parsed[e-1],u,d,h;if(this._parsing===!1)n._parsed=s,n._sorted=!0,h=s;else{Jt(s[e])?h=this.parseArrayData(n,s,e,t):Tt(s[e])?h=this.parseObjectData(n,s,e,t):h=this.parsePrimitiveData(n,s,e,t);const f=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<t;++u)n._parsed[u+e]=d=h[u],l&&(f()&&(l=!1),c=d);n._sorted=l}r&&XR(this,h)}parsePrimitiveData(e,t,n,s){const{iScale:o,vScale:r}=e,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,d=new Array(s);let h,f,g;for(h=0,f=s;h<f;++h)g=h+n,d[h]={[a]:u||o.parse(c[g],g),[l]:r.parse(t[g],g)};return d}parseArrayData(e,t,n,s){const{xScale:o,yScale:r}=e,a=new Array(s);let l,c,u,d;for(l=0,c=s;l<c;++l)u=l+n,d=t[u],a[l]={x:o.parse(d[0],u),y:r.parse(d[1],u)};return a}parseObjectData(e,t,n,s){const{xScale:o,yScale:r}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,d,h,f;for(u=0,d=s;u<d;++u)h=u+n,f=t[h],c[u]={x:o.parse(ha(f,a),h),y:r.parse(ha(f,l),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,n){const s=this.chart,o=this._cachedMeta,r=t[e.axis],a={keys:iI(s,!0),values:t._stacks[e.axis]._visualValues};return KR(a,r,o.index,{mode:n})}updateRangeFromParsed(e,t,n,s){const o=n[t.axis];let r=o===null?NaN:o;const a=s&&n._stacks[t.axis];s&&a&&(s.values=a,r=KR(s,o,this._cachedMeta.index)),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r)}getMinMax(e,t){const n=this._cachedMeta,s=n._parsed,o=n._sorted&&e===n.iScale,r=s.length,a=this._getOtherScale(e),l=s5(t,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=e5(a);let h,f;function g(){f=s[h];const p=f[a.axis];return!ki(f[e.axis])||u>p||d<p}for(h=0;h<r&&!(!g()&&(this.updateRangeFromParsed(c,e,f,l),o));++h);if(o){for(h=r-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,e,f,l);break}}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,n=[];let s,o,r;for(s=0,o=t.length;s<o;++s)r=t[s][e.axis],ki(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,n=t.iScale,s=t.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=Qz(Dt(this.options.clip,Xz(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,n=this._cachedMeta,s=n.data||[],o=t.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(e,o,a,l),u=a;u<a+l;++u){const d=s[u];d.hidden||(d.active&&c?r.push(d):d.draw(e,o))}for(u=0;u<r.length;++u)r[u].draw(e,o)}getStyle(e,t){const n=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,t,n){const s=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const r=this._cachedMeta.data[e];o=r.$context||(r.$context=n5(this.getContext(),e,r)),o.parsed=this.getParsed(e),o.raw=s.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=i5(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!t,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",n){const s=t==="active",o=this._cachedDataOpts,r=e+"-"+t,a=o[r],l=this.enableOptionSharing&&ph(n);if(a)return QR(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),d=s?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(ci.elements[e]),g=()=>this.getContext(n,s,t),p=c.resolveNamedOptions(h,f,g,d);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(QR(p,l))),p}_resolveAnimations(e,t,n){const s=this.chart,o=this._cachedDataOpts,r=`animation-${t}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,t),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(e,n,t))}const c=new tI(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||rC(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const n=this.resolveDataElementOptions(e,t),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(t,o)||o!==s;return this.updateSharedOptions(o,t,n),{sharedOptions:o,includeOptions:r}}updateElement(e,t,n,s){rC(s)?Object.assign(e,n):this._resolveAnimations(t,s).update(e,n)}updateSharedOptions(e,t,n){e&&!rC(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,s){e.active=s;const o=this.getStyle(t,s);this._resolveAnimations(t,n,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,t,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,t,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,n=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=n.length,o=t.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,e):o<s&&this._removeElements(o,s-o)}_insertElements(e,t,n=!0){const s=this._cachedMeta,o=s.data,r=e+t;let a;const l=c=>{for(c.length+=t,a=c.length-1;a>=r;a--)c[a]=c[a-t]};for(l(o),a=e;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(e,t),n&&this.updateElements(o,e,t,"reset")}updateElements(e,t,n,s){}_removeElements(e,t){const n=this._cachedMeta;if(this._parsing){const s=n._parsed.splice(e,t);n._stacked&&Wu(n,s)}n.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,n,s]=e;this[t](n,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ot(hl,"defaults",{}),ot(hl,"datasetElementType",null),ot(hl,"dataElementType",null);function o5(i,e){if(!i._cache.$bar){const t=i.getMatchingVisibleMetas(e);let n=[];for(let s=0,o=t.length;s<o;s++)n=n.concat(t[s].controller.getAllParsedValues(i));i._cache.$bar=HP(n.sort((s,o)=>s-o))}return i._cache.$bar}function r5(i){const e=i.iScale,t=o5(e,i.type);let n=e._length,s,o,r,a;const l=()=>{r===32767||r===-32768||(ph(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=t.length;s<o;++s)r=e.getPixelForValue(t[s]),l();for(a=void 0,s=0,o=e.ticks.length;s<o;++s)r=e.getPixelForTick(s),l();return n}function a5(i,e,t,n){const s=t.barThickness;let o,r;return Vt(s)?(o=e.min*t.categoryPercentage,r=t.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:e.pixels[i]-o/2}}function l5(i,e,t,n){const s=e.pixels,o=s[i];let r=i>0?s[i-1]:null,a=i<s.length-1?s[i+1]:null;const l=t.categoryPercentage;r===null&&(r=o-(a===null?e.end-e.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:t.barPercentage,start:c}}function c5(i,e,t,n){const s=t.parse(i[0],n),o=t.parse(i[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),e[t.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function nI(i,e,t,n){return Jt(i)?c5(i,e,t,n):e[t.axis]=t.parse(i,n),e}function ZR(i,e,t,n){const s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[];let c,u,d,h;for(c=t,u=t+n;c<u;++c)h=e[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(nI(h,d,o,c));return l}function aC(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function u5(i,e,t){return i!==0?ia(i):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function d5(i){let e,t,n,s,o;return i.horizontal?(e=i.base>i.x,t="left",n="right"):(e=i.base<i.y,t="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:t,end:n,reverse:e,top:s,bottom:o}}function h5(i,e,t,n){let s=e.borderSkipped;const o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:u}=d5(i);s==="middle"&&t&&(i.enableBorderRadius=!0,(t._top||0)===n?s=c:(t._bottom||0)===n?s=u:(o[JR(u,r,a,l)]=!0,s=c)),o[JR(s,r,a,l)]=!0,i.borderSkipped=o}function JR(i,e,t,n){return n?(i=f5(i,e,t),i=e0(i,t,e)):i=e0(i,e,t),i}function f5(i,e,t){return i===e?t:i===t?e:i}function e0(i,e,t){return i==="start"?e:i==="end"?t:i}function p5(i,{inflateAmount:e},t){i.inflateAmount=e==="auto"?t===1?.33:0:e}class xp extends hl{parsePrimitiveData(e,t,n,s){return ZR(e,t,n,s)}parseArrayData(e,t,n,s){return ZR(e,t,n,s)}parseObjectData(e,t,n,s){const{iScale:o,vScale:r}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,u=r.axis==="x"?a:l,d=[];let h,f,g,p;for(h=n,f=n+s;h<f;++h)p=t[h],g={},g[o.axis]=o.parse(ha(p,c),h),d.push(nI(ha(p,u),g,r,h));return d}updateRangeFromParsed(e,t,n,s){super.updateRangeFromParsed(e,t,n,s);const o=n._custom;o&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:n,vScale:s}=t,o=this.getParsed(e),r=o._custom,a=aC(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,n,s){const o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(t,s);for(let f=t;f<t+n;f++){const g=this.getParsed(f),p=o||Vt(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),v=this._calculateBarIndexPixels(f,u),y=(g._stacks||{})[a.axis],C={horizontal:c,base:p.base,enableBorderRadius:!y||aC(g._custom)||r===y._top||r===y._bottom,x:c?p.head:v.center,y:c?v.center:p.head,height:c?v.size:Math.abs(p.size),width:c?Math.abs(p.size):v.size};h&&(C.options=d||this.resolveDataElementOptions(f,e[f].active?"active":s));const m=C.options||e[f].options;h5(C,m,y,r),p5(C,m,u.ratio),this.updateElement(e[f],f,C,s)}}_getStacks(e,t){const{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(t),u=c&&c[l.vScale.axis];if(Vt(u)||isNaN(u))return!0};for(const l of s)if(!(t!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===e))break;return r.length||r.push(void 0),r}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,n){const s=this._getStacks(e,n),o=t!==void 0?s.indexOf(t):-1;return o===-1?s.length-1:o}_getRuler(){const e=this.options,t=this._cachedMeta,n=t.iScale,s=[];let o,r;for(o=0,r=t.data.length;o<r;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const a=e.barThickness;return{min:a||r5(t),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:n,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(e),c=l._custom,u=aC(c);let d=l[t.axis],h=0,f=n?this.applyStack(t,l,n):d,g,p;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ia(d)!==ia(c.barEnd)&&(h=0),h+=d);const v=!Vt(o)&&!u?o:h;let y=t.getPixelForValue(v);if(this.chart.getDataVisibility(e)?g=t.getPixelForValue(h+f):g=y,p=g-y,Math.abs(p)<r){p=u5(p,t,a)*r,d===a&&(y-=p/2);const C=t.getPixelForDecimal(0),m=t.getPixelForDecimal(1),w=Math.min(C,m),E=Math.max(C,m);y=Math.max(Math.min(y,E),w),g=y+p,n&&!u&&(l._stacks[t.axis]._visualValues[s]=t.getValueForPixel(g)-t.getValueForPixel(y))}if(y===t.getPixelForValue(a)){const C=ia(p)*t.getLineWidthForValue(a)/2;y+=C,p-=C}return{size:p,base:y,head:g,center:g+p/2}}_calculateBarIndexPixels(e,t){const n=t.scale,s=this.options,o=s.skipNull,r=Dt(s.maxBarThickness,1/0);let a,l;if(t.grouped){const c=o?this._getStackCount(e):t.stackCount,u=s.barThickness==="flex"?l5(e,t,s,c):a5(e,t,s,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);a=u.start+u.chunk*d+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=n.getPixelForValue(this.getParsed(e)[n.axis],e),l=Math.min(r,t.min*t.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,t=e.vScale,n=e.data,s=n.length;let o=0;for(;o<s;++o)this.getParsed(o)[t.axis]!==null&&n[o].draw(this._ctx)}}ot(xp,"id","bar"),ot(xp,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ot(xp,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function g5(i,e,t){let n=1,s=1,o=0,r=0;if(e<wn){const a=i,l=a+e,c=Math.cos(a),u=Math.sin(a),d=Math.cos(l),h=Math.sin(l),f=(m,w,E)=>Iy(m,a,l,!0)?1:Math.max(w,w*t,E,E*t),g=(m,w,E)=>Iy(m,a,l,!0)?-1:Math.min(w,w*t,E,E*t),p=f(0,c,d),v=f(rn,u,h),y=g(Ri,c,d),C=g(Ri+rn,u,h);n=(p-y)/2,s=(v-C)/2,o=-(p+y)/2,r=-(v+C)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}class sd extends hl{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(Tt(n[e])){const{key:l="value"}=this._parsing;o=c=>+ha(n[c],l)}let r,a;for(r=e,a=e+t;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return Qs(this.options.rotation-90)}_getCircumference(){return Qs(this.options.circumference)}_getRotationExtents(){let e=wn,t=-wn;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),r=s._getCircumference();e=Math.min(e,o),t=Math.max(t,o+r)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:n}=t,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-r)/2,0),l=Math.min($3(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:p}=g5(d,u,l),v=(n.width-r)/h,y=(n.height-r)/f,C=Math.max(Math.min(v,y)/2,0),m=NP(this.options.radius,C),w=Math.max(m*l,0),E=(m-w)/this._getVisibleDatasetWeightTotal();this.offsetX=g*m,this.offsetY=p*m,s.total=this.calculateTotal(),this.outerRadius=m-E*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-E*c,0),this.updateElements(o,0,o.length,e)}_circumference(e,t){const n=this.options,s=this._cachedMeta,o=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*o/wn)}updateElements(e,t,n,s){const o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,h=o&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:p,includeOptions:v}=this._getSharedOptions(t,s);let y=this._getRotation(),C;for(C=0;C<t;++C)y+=this._circumference(C,o);for(C=t;C<t+n;++C){const m=this._circumference(C,o),w=e[C],E={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+m,circumference:m,outerRadius:g,innerRadius:f};v&&(E.options=p||this.resolveDataElementOptions(C,w.active?"active":s)),y+=m,this.updateElement(w,C,E,s)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let n=0,s;for(s=0;s<t.length;s++){const o=e._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?wn*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Sf(t._parsed[e],n.options.locale);return{label:s[e]||"",value:o}}getMaxBorderWidth(e){let t=0;const n=this.chart;let s,o,r,a,l;if(!e){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){r=n.getDatasetMeta(s),e=r.data,a=r.controller;break}}if(!e)return 0;for(s=0,o=e.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let n=0,s=e.length;n<s;++n){const o=this.resolveDataElementOptions(n);t=Math.max(t,o.offset||0,o.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}_getRingWeight(e){return Math.max(Dt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ot(sd,"id","doughnut"),ot(sd,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),ot(sd,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),ot(sd,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:s}}=e.legend.options;return t.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});class Ap extends hl{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Sf(t._parsed[e].r,n.options.locale);return{label:s[e]||"",value:o}}parseObjectData(e,t,n,s){return Fz.bind(this)(e,t,n,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<t.min&&(t.min=o),o>t.max&&(t.max=o))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,n=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/e.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,t,n,s){const o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Ri;let f=h,g;const p=360/this.countVisibleElements();for(g=0;g<t;++g)f+=this._computeAngle(g,s,p);for(g=t;g<t+n;g++){const v=e[g];let y=f,C=f+this._computeAngle(g,s,p),m=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=C,o&&(l.animateScale&&(m=0),l.animateRotate&&(y=C=h));const w={x:u,y:d,innerRadius:0,outerRadius:m,startAngle:y,endAngle:C,options:this.resolveDataElementOptions(g,v.active?"active":s)};this.updateElement(v,g,w,s)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?Qs(this.resolveDataElementOptions(e,t).angle||n):0}}ot(Ap,"id","polarArea"),ot(Ap,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),ot(Ap,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n,color:s}}=e.legend.options;return t.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});function Ua(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class KS{constructor(e){ot(this,"options");this.options=e||{}}static override(e){Object.assign(KS.prototype,e)}init(){}formats(){return Ua()}parse(){return Ua()}format(){return Ua()}add(){return Ua()}diff(){return Ua()}startOf(){return Ua()}endOf(){return Ua()}}var m5={_date:KS};function v5(i,e,t,n){const{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&r&&o.length){const l=a._reversePixels?nz:My;if(n){if(s._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(o,e,t-u),h=l(o,e,t+u);return{lo:d.lo,hi:h.hi}}}}else return l(o,e,t)}return{lo:0,hi:o.length-1}}function Ef(i,e,t,n,s){const o=i.getSortedVisibleDatasetMetas(),r=t[e];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:d,hi:h}=v5(o[a],e,r,s);for(let f=d;f<=h;++f){const g=u[f];g.skip||n(g,c,f)}}}function C5(i){const e=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(n,s){const o=e?Math.abs(n.x-s.x):0,r=t?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function lC(i,e,t,n,s){const o=[];return!s&&!i.isPointInArea(e)||Ef(i,t,e,function(a,l,c){!s&&!gc(a,i.chartArea,0)||a.inRange(e.x,e.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function y5(i,e,t,n){let s=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],n),{angle:d}=ez(r,{x:e.x,y:e.y});Iy(d,c,u)&&s.push({element:r,datasetIndex:a,index:l})}return Ef(i,t,e,o),s}function b5(i,e,t,n,s,o){let r=[];const a=C5(t);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(e.x,e.y,s);if(n&&!f)return;const g=u.getCenterPoint(s);if(!(!!o||i.isPointInArea(g))&&!f)return;const v=a(e,g);v<l?(r=[{element:u,datasetIndex:d,index:h}],l=v):v===l&&r.push({element:u,datasetIndex:d,index:h})}return Ef(i,t,e,c),r}function cC(i,e,t,n,s,o){return!o&&!i.isPointInArea(e)?[]:t==="r"&&!n?y5(i,e,t,s):b5(i,e,t,n,s,o)}function t0(i,e,t,n,s){const o=[],r=t==="x"?"inXRange":"inYRange";let a=!1;return Ef(i,t,e,(l,c,u)=>{l[r](e[t],s)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,s))}),n&&!a?[]:o}var w5={evaluateInteractionItems:Ef,modes:{index(i,e,t,n){const s=Ka(e,i),o=t.axis||"x",r=t.includeInvisible||!1,a=t.intersect?lC(i,s,o,n,r):cC(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(i,e,t,n){const s=Ka(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;let a=t.intersect?lC(i,s,o,n,r):cC(i,s,o,!1,n,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(i,e,t,n){const s=Ka(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;return lC(i,s,o,n,r)},nearest(i,e,t,n){const s=Ka(e,i),o=t.axis||"xy",r=t.includeInvisible||!1;return cC(i,s,o,t.intersect,n,r)},x(i,e,t,n){const s=Ka(e,i);return t0(i,s,"x",t.intersect,n)},y(i,e,t,n){const s=Ka(e,i);return t0(i,s,"y",t.intersect,n)}}};const sI=["left","top","right","bottom"];function Uu(i,e){return i.filter(t=>t.pos===e)}function i0(i,e){return i.filter(t=>sI.indexOf(t.pos)===-1&&t.box.axis===e)}function ju(i,e){return i.sort((t,n)=>{const s=e?n:t,o=e?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function S5(i){const e=[];let t,n,s,o,r,a;for(t=0,n=(i||[]).length;t<n;++t)s=i[t],{position:o,options:{stack:r,stackWeight:a=1}}=s,e.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}function E5(i){const e={};for(const t of i){const{stack:n,pos:s,stackWeight:o}=t;if(!n||!sI.includes(s))continue;const r=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return e}function _5(i,e){const t=E5(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=t[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*n:l&&e.availableWidth,a.height=s):(a.width=n,a.height=u?u*s:l&&e.availableHeight)}return t}function R5(i){const e=S5(i),t=ju(e.filter(c=>c.box.fullSize),!0),n=ju(Uu(e,"left"),!0),s=ju(Uu(e,"right")),o=ju(Uu(e,"top"),!0),r=ju(Uu(e,"bottom")),a=i0(e,"x"),l=i0(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:Uu(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function n0(i,e,t,n){return Math.max(i[t],e[t])+Math.max(i[n],e[n])}function oI(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function T5(i,e,t,n){const{pos:s,box:o}=t,r=i.maxPadding;if(!Tt(s)){t.size&&(i[s]-=t.size);const d=n[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,i[s]+=t.size}o.getPadding&&oI(r,o.getPadding());const a=Math.max(0,e.outerWidth-n0(r,i,"left","right")),l=Math.max(0,e.outerHeight-n0(r,i,"top","bottom")),c=a!==i.w,u=l!==i.h;return i.w=a,i.h=l,t.horizontal?{same:c,other:u}:{same:u,other:c}}function x5(i){const e=i.maxPadding;function t(n){const s=Math.max(e[n]-i[n],0);return i[n]+=s,s}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function A5(i,e){const t=e.maxPadding;function n(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(e[r],t[r])}),o}return n(i?["left","right"]:["top","bottom"])}function od(i,e,t,n){const s=[];let o,r,a,l,c,u;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||e.w,a.height||e.h,A5(a.horizontal,e));const{same:d,other:h}=T5(e,t,a,n);c|=d&&s.length,u=u||h,l.fullSize||s.push(a)}return c&&od(s,e,t,n)||u}function Jf(i,e,t,n,s){i.top=t,i.left=e,i.right=e+n,i.bottom=t+s,i.width=n,i.height=s}function s0(i,e,t,n){const s=t.padding;let{x:o,y:r}=e;for(const a of i){const l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=e.w*u,h=c.size||l.height;ph(c.start)&&(r=c.start),l.fullSize?Jf(l,s.left,r,t.outerWidth-s.right-s.left,h):Jf(l,e.left+c.placed,r,d,h),c.start=r,c.placed+=d,r=l.bottom}else{const d=e.h*u,h=c.size||l.width;ph(c.start)&&(o=c.start),l.fullSize?Jf(l,o,s.top,h,t.outerHeight-s.bottom-s.top):Jf(l,o,e.top+c.placed,h,d),c.start=o,c.placed+=d,o=l.right}}e.x=o,e.y=r}var bs={addBox(i,e){i.boxes||(i.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},i.boxes.push(e)},removeBox(i,e){const t=i.boxes?i.boxes.indexOf(e):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(i,e,t,n){if(!i)return;const s=un(i.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(t-s.height,0),a=R5(i.boxes),l=a.vertical,c=a.horizontal;Ft(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,v)=>v.box.options&&v.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),h=Object.assign({},s);oI(h,un(n));const f=Object.assign({maxPadding:h,w:o,h:r,x:s.left,y:s.top},s),g=_5(l.concat(c),d);od(a.fullSize,f,d,g),od(l,f,d,g),od(c,f,d,g)&&od(l,f,d,g),x5(f),s0(a.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,s0(a.rightAndBottom,f,d,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Ft(a.chartArea,p=>{const v=p.box;Object.assign(v,i.chartArea),v.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class rI{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,s){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)}}isAttached(e){return!0}updateConfig(e){}}class D5 extends rI{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Dp="$chartjs",O5={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},o0=i=>i===null||i==="";function P5(i,e){const t=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[Dp]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",o0(s)){const o=jR(i,"width");o!==void 0&&(i.width=o)}if(o0(n))if(i.style.height==="")i.height=i.width/(e||2);else{const o=jR(i,"height");o!==void 0&&(i.height=o)}return i}const aI=Wz?{passive:!0}:!1;function I5(i,e,t){i.addEventListener(e,t,aI)}function M5(i,e,t){i.canvas.removeEventListener(e,t,aI)}function L5(i,e){const t=O5[i.type]||i.type,{x:n,y:s}=Ka(i,e);return{type:t,chart:e,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function _g(i,e){for(const t of i)if(t===e||t.contains(e))return!0}function F5(i,e,t){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_g(a.addedNodes,n),r=r&&!_g(a.removedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function N5(i,e,t){const n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_g(a.removedNodes,n),r=r&&!_g(a.addedNodes,n);r&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const mh=new Map;let r0=0;function lI(){const i=window.devicePixelRatio;i!==r0&&(r0=i,mh.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function k5(i,e){mh.size||window.addEventListener("resize",lI),mh.set(i,e)}function V5(i){mh.delete(i),mh.size||window.removeEventListener("resize",lI)}function G5(i,e,t){const n=i.canvas,s=n&&zS(n);if(!s)return;const o=WP((a,l)=>{const c=s.clientWidth;t(a,l),c<s.clientWidth&&t()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(s),k5(i,o),r}function uC(i,e,t){t&&t.disconnect(),e==="resize"&&V5(i)}function H5(i,e,t){const n=i.canvas,s=WP(o=>{i.ctx!==null&&t(L5(o,i))},i);return I5(n,e,s),s}class B5 extends rI{acquireContext(e,t){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(P5(e,t),n):null}releaseContext(e){const t=e.canvas;if(!t[Dp])return!1;const n=t[Dp].initial;["height","width"].forEach(o=>{const r=n[o];Vt(r)?t.removeAttribute(o):t.setAttribute(o,r)});const s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o]}),t.width=t.width,delete t[Dp],!0}addEventListener(e,t,n){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),r={attach:F5,detach:N5,resize:G5}[t]||H5;s[t]=r(e,t,n)}removeEventListener(e,t){const n=e.$proxies||(e.$proxies={}),s=n[t];if(!s)return;({attach:uC,detach:uC,resize:uC}[t]||M5)(e,t,s),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,s){return Bz(e,t,n,s)}isAttached(e){const t=zS(e);return!!(t&&t.isConnected)}}function W5(i){return!ZP()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?D5:B5}var cp;let Pu=(cp=class{constructor(){ot(this,"x");ot(this,"y");ot(this,"active",!1);ot(this,"options");ot(this,"$animations")}tooltipPosition(e){const{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return wg(this.x)&&wg(this.y)}getProps(e,t){const n=this.$animations;if(!t||!n)return this;const s={};return e.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}},ot(cp,"defaults",{}),ot(cp,"defaultRoutes"),cp);function U5(i,e){const t=i.options.ticks,n=j5(i),s=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?z5(e):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return K5(e,c,o,r/s),c;const u=$5(o,e,s);if(r>0){let d,h;const f=r>1?Math.round((l-a)/(r-1)):null;for(ep(e,c,u,Vt(f)?0:a-f,a),d=0,h=r-1;d<h;d++)ep(e,c,u,o[d],o[d+1]);return ep(e,c,u,l,Vt(f)?e.length:l+f),c}return ep(e,c,u),c}function j5(i){const e=i.options.offset,t=i._tickSize(),n=i._length/t+(e?0:1),s=i._maxLength/t;return Math.floor(Math.min(n,s))}function $5(i,e,t){const n=Y5(i),s=e.length/t;if(!n)return Math.max(s,1);const o=Z3(n);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function z5(i){const e=[];let t,n;for(t=0,n=i.length;t<n;t++)i[t].major&&e.push(t);return e}function K5(i,e,t,n){let s=0,o=t[0],r;for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(e.push(i[r]),s++,o=t[s*n])}function ep(i,e,t,n,s){const o=Dt(n,0),r=Math.min(Dt(s,i.length),i.length);let a=0,l,c,u;for(t=Math.ceil(t),s&&(l=s-n,t=l/Math.floor(l/t)),u=o;u<0;)a++,u=Math.round(o+a*t);for(c=Math.max(o,0);c<r;c++)c===u&&(e.push(i[c]),a++,u=Math.round(o+a*t))}function Y5(i){const e=i.length;let t,n;if(e<2)return!1;for(n=i[0],t=1;t<e;++t)if(i[t]-i[t-1]!==n)return!1;return n}const q5=i=>i==="left"?"right":i==="right"?"left":i,a0=(i,e,t)=>e==="top"||e==="left"?i[e]+t:i[e]-t,l0=(i,e)=>Math.min(e||i,i);function c0(i,e){const t=[],n=i.length/e,s=i.length;let o=0;for(;o<s;o+=n)t.push(i[Math.floor(o)]);return t}function X5(i,e,t){const n=i.ticks.length,s=Math.min(e,n-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(s),c;if(!(t&&(n===1?c=Math.max(l-o,r-l):e===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<e?c:-c,l<o-a||l>r+a)))return l}function Q5(i,e){Ft(i,t=>{const n=t.gc,s=n.length/2;let o;if(s>e){for(o=0;o<s;++o)delete t.data[n[o]];n.splice(0,s)}})}function $u(i){return i.drawTicks?i.tickLength:0}function u0(i,e){if(!i.display)return 0;const t=Di(i.font,e),n=un(i.padding);return(Jt(i.text)?i.text.length:1)*t.lineHeight+n.height}function Z5(i,e){return zl(i,{scale:e,type:"scale"})}function J5(i,e,t){return zl(i,{tick:t,index:e,type:"tick"})}function eK(i,e,t){let n=HS(i);return(t&&e!=="right"||!t&&e==="right")&&(n=q5(n)),n}function tK(i,e,t,n){const{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:u}=l;let d=0,h,f,g;const p=r-s,v=a-o;if(i.isHorizontal()){if(f=Zi(n,o,a),Tt(t)){const y=Object.keys(t)[0],C=t[y];g=u[y].getPixelForValue(C)+p-e}else t==="center"?g=(c.bottom+c.top)/2+p-e:g=a0(i,t,e);h=a-o}else{if(Tt(t)){const y=Object.keys(t)[0],C=t[y];f=u[y].getPixelForValue(C)-v+e}else t==="center"?f=(c.left+c.right)/2-v+e:f=a0(i,t,e);g=Zi(n,r,s),d=t==="left"?-rn:rn}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}class Kl extends Pu{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:s}=this;return e=jn(e,Number.POSITIVE_INFINITY),t=jn(t,Number.NEGATIVE_INFINITY),n=jn(n,Number.POSITIVE_INFINITY),s=jn(s,Number.NEGATIVE_INFINITY),{min:jn(e,n),max:jn(t,s),minDefined:ki(e),maxDefined:ki(t)}}getMinMax(e){let{min:t,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:t,max:n};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,e),s||(t=Math.min(t,r.min)),o||(n=Math.max(n,r.max));return t=o&&t>n?n:t,n=s&&t>n?t:n,{min:jn(t,jn(n,t)),max:jn(n,jn(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){jt(this.options.beforeUpdate,[this])}update(e,t,n){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Rz(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?c0(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=U5(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){jt(this.options.afterUpdate,[this])}beforeSetDimensions(){jt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){jt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),jt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){jt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n],o.label=jt(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){jt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){jt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,n=l0(this.ticks.length,e.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!t.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Zs(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),l=this.maxHeight-$u(e.grid)-t.padding-u0(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),r=VS(Math.min(Math.asin(Zs((u.highest.height+6)/a,-1,1)),Math.asin(Zs(l/c,-1,1))-Math.asin(Zs(h/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){jt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){jt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=u0(s,t.options.font);if(a?(e.width=this.maxWidth,e.height=$u(o)+l):(e.height=this.maxHeight,e.width=$u(o)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=n.padding*2,g=Qs(this.labelRotation),p=Math.cos(g),v=Math.sin(g);if(a){const y=n.mirror?0:v*d.width+p*h.height;e.height=Math.min(this.maxHeight,e.height+y+f)}else{const y=n.mirror?0:p*d.width+v*h.height;e.width=Math.min(this.maxWidth,e.width+y+f)}this._calculatePadding(c,u,v,p)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*e.width,f=n*t.height):(h=n*e.height,f=s*t.width):o==="start"?f=t.width:o==="end"?h=e.width:o!=="inner"&&(h=e.width/2,f=t.width/2),this.paddingLeft=Math.max((h-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let u=t.height/2,d=e.height/2;o==="start"?(u=0,d=e.height):o==="end"&&(u=t.height,d=0),this.paddingTop=u+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){jt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t<n;t++)Vt(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let n=this.ticks;t<n.length&&(n=c0(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(t/l0(t,n));let c=0,u=0,d,h,f,g,p,v,y,C,m,w,E;for(d=0;d<t;d+=l){if(g=e[d].label,p=this._resolveTickFontOptions(d),s.font=v=p.string,y=o[v]=o[v]||{data:{},gc:[]},C=p.lineHeight,m=w=0,!Vt(g)&&!Jt(g))m=Sg(s,y.data,y.gc,m,g),w=C;else if(Jt(g))for(h=0,f=g.length;h<f;++h)E=g[h],!Vt(E)&&!Jt(E)&&(m=Sg(s,y.data,y.gc,m,E),w+=C);r.push(m),a.push(w),c=Math.max(m,c),u=Math.max(w,u)}Q5(o,t);const R=r.indexOf(c),O=a.indexOf(u),A=D=>({width:r[D]||0,height:a[D]||0});return{first:A(0),last:A(t-1),widest:A(R),highest:A(O),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return iz(this._alignToPixels?Wa(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const n=t[e];return n.$context||(n.$context=J5(this.getContext(),e,n))}return this.$context||(this.$context=Z5(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=Qs(this.labelRotation),n=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),r=e.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=$u(o),f=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,v=p/2,y=function(Q){return Wa(n,Q,p)};let C,m,w,E,R,O,A,D,L,S,x,T;if(r==="top")C=y(this.bottom),O=this.bottom-h,D=C-v,S=y(e.top)+v,T=e.bottom;else if(r==="bottom")C=y(this.top),S=e.top,T=y(e.bottom)-v,O=C+v,D=this.top+h;else if(r==="left")C=y(this.right),R=this.right-h,A=C-v,L=y(e.left)+v,x=e.right;else if(r==="right")C=y(this.left),L=e.left,x=y(e.right)-v,R=C+v,A=this.left+h;else if(t==="x"){if(r==="center")C=y((e.top+e.bottom)/2+.5);else if(Tt(r)){const Q=Object.keys(r)[0],te=r[Q];C=y(this.chart.scales[Q].getPixelForValue(te))}S=e.top,T=e.bottom,O=C+v,D=O+h}else if(t==="y"){if(r==="center")C=y((e.left+e.right)/2);else if(Tt(r)){const Q=Object.keys(r)[0],te=r[Q];C=y(this.chart.scales[Q].getPixelForValue(te))}R=C-v,A=R-h,L=e.left,x=e.right}const H=Dt(s.ticks.maxTicksLimit,d),Y=Math.max(1,Math.ceil(d/H));for(m=0;m<d;m+=Y){const Q=this.getContext(m),te=o.setContext(Q),F=a.setContext(Q),k=te.lineWidth,q=te.color,V=F.dash||[],J=F.dashOffset,ae=te.tickWidth,se=te.tickColor,ce=te.tickBorderDash||[],re=te.tickBorderDashOffset;w=X5(this,m,l),w!==void 0&&(E=Wa(n,w,k),c?R=A=L=x=E:O=D=S=T=E,f.push({tx1:R,ty1:O,tx2:A,ty2:D,x1:L,y1:S,x2:x,y2:T,width:k,color:q,borderDash:V,borderDashOffset:J,tickWidth:ae,tickColor:se,tickBorderDash:ce,tickBorderDashOffset:re}))}return this._ticksLength=d,this._borderValue=C,f}_computeLabelItems(e){const t=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,h=$u(n.grid),f=h+u,g=d?-u:f,p=-Qs(this.labelRotation),v=[];let y,C,m,w,E,R,O,A,D,L,S,x,T="middle";if(s==="top")R=this.bottom-g,O=this._getXAxisLabelAlignment();else if(s==="bottom")R=this.top+g,O=this._getXAxisLabelAlignment();else if(s==="left"){const Y=this._getYAxisLabelAlignment(h);O=Y.textAlign,E=Y.x}else if(s==="right"){const Y=this._getYAxisLabelAlignment(h);O=Y.textAlign,E=Y.x}else if(t==="x"){if(s==="center")R=(e.top+e.bottom)/2+f;else if(Tt(s)){const Y=Object.keys(s)[0],Q=s[Y];R=this.chart.scales[Y].getPixelForValue(Q)+f}O=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")E=(e.left+e.right)/2-f;else if(Tt(s)){const Y=Object.keys(s)[0],Q=s[Y];E=this.chart.scales[Y].getPixelForValue(Q)}O=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(l==="start"?T="top":l==="end"&&(T="bottom"));const H=this._getLabelSizes();for(y=0,C=a.length;y<C;++y){m=a[y],w=m.label;const Y=o.setContext(this.getContext(y));A=this.getPixelForTick(y)+o.labelOffset,D=this._resolveTickFontOptions(y),L=D.lineHeight,S=Jt(w)?w.length:1;const Q=S/2,te=Y.color,F=Y.textStrokeColor,k=Y.textStrokeWidth;let q=O;r?(E=A,O==="inner"&&(y===C-1?q=this.options.reverse?"left":"right":y===0?q=this.options.reverse?"right":"left":q="center"),s==="top"?c==="near"||p!==0?x=-S*L+L/2:c==="center"?x=-H.highest.height/2-Q*L+L:x=-H.highest.height+L/2:c==="near"||p!==0?x=L/2:c==="center"?x=H.highest.height/2-Q*L:x=H.highest.height-S*L,d&&(x*=-1),p!==0&&!Y.showLabelBackdrop&&(E+=L/2*Math.sin(p))):(R=A,x=(1-S)*L/2);let V;if(Y.showLabelBackdrop){const J=un(Y.backdropPadding),ae=H.heights[y],se=H.widths[y];let ce=x-J.top,re=0-J.left;switch(T){case"middle":ce-=ae/2;break;case"bottom":ce-=ae;break}switch(O){case"center":re-=se/2;break;case"right":re-=se;break}V={left:re,top:ce,width:se+J.width,height:ae+J.height,color:Y.backdropColor}}v.push({label:w,font:D,textOffset:x,options:{rotation:p,color:te,strokeColor:F,strokeWidth:k,textAlign:q,textBaseline:T,translation:[E,R],backdrop:V}})}return v}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-Qs(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=e+o,l=r.widest.width;let c,u;return t==="left"?s?(u=this.right+o,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):t==="right"?s?(u=this.left+o,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:n,top:s,width:o,height:r}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,s,o,r),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(o=>o.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,r=s.length;o<r;++o){const l=s[o];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=Wa(e,this.left,r)-r/2,u=Wa(e,this.right,a)+a/2,d=h=l):(d=Wa(e,this.top,r)-r/2,h=Wa(e,this.bottom,a)+a/2,c=u=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,d),t.lineTo(u,h),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,s=this._computeLabelArea();s&&BS(n,s);const o=this.getLabelItems(e);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Rl(n,c,0,u,l,a)}s&&WS(n)}drawTitle(){const{ctx:e,options:{position:t,title:n,reverse:s}}=this;if(!n.display)return;const o=Di(n.font),r=un(n.padding),a=n.align;let l=o.lineHeight/2;t==="bottom"||t==="center"||Tt(t)?(l+=r.bottom,Jt(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=tK(this,l,t,a);Rl(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:h,textAlign:eK(a,t,s),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,n=Dt(e.grid&&e.grid.z,-1),s=Dt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Kl.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[];let o,r;for(o=0,r=t.length;o<r;++o){const a=t[o];a[n]===this.id&&(!e||a.type===e)&&s.push(a)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return Di(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class tp{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let n;sK(t)&&(n=this.register(t));const s=this.items,o=e.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in s||(s[o]=e,iK(e,r,n),this.override&&ci.override(e.id,e.overrides)),r}get(e){return this.items[e]}unregister(e){const t=this.items,n=e.id,s=this.scope;n in t&&delete t[n],s&&n in ci[s]&&(delete ci[s][n],this.override&&delete _l[n])}}function iK(i,e,t){const n=fh(Object.create(null),[t?ci.get(t):{},ci.get(e),i.defaults]);ci.set(e,n),i.defaultRoutes&&nK(e,i.defaultRoutes),i.descriptors&&ci.describe(e,i.descriptors)}function nK(i,e){Object.keys(e).forEach(t=>{const n=t.split("."),s=n.pop(),o=[i].concat(n).join("."),r=e[t].split("."),a=r.pop(),l=r.join(".");ci.route(o,s,l,a)})}function sK(i){return"id"in i&&"defaults"in i}class oK{constructor(){this.controllers=new tp(hl,"datasets",!0),this.elements=new tp(Pu,"elements"),this.plugins=new tp(Object,"plugins"),this.scales=new tp(Kl,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach(s=>{const o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(e,o,s):Ft(s,r=>{const a=n||this._getRegistryForType(r);this._exec(e,a,r)})})}_exec(e,t,n){const s=kS(e);jt(n["before"+s],[],n),t[e](n),jt(n["after"+s],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return s}}var bo=new oK;class rK{constructor(){this._init=[]}notify(e,t,n,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=s?this._descriptors(e).filter(s):this._descriptors(e),r=this._notify(o,e,t,n);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),r}_notify(e,t,n,s){s=s||{};for(const o of e){const r=o.plugin,a=r[n],l=[t,s,o.options];if(jt(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){Vt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const n=e&&e.config,s=Dt(n.options&&n.options.plugins,{}),o=aK(n);return s===!1&&!t?[]:cK(e,o,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(t,n),e,"stop"),this._notify(s(n,t),e,"start")}}function aK(i){const e={},t=[],n=Object.keys(bo.plugins.items);for(let o=0;o<n.length;o++)t.push(bo.getPlugin(n[o]));const s=i.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];t.indexOf(r)===-1&&(t.push(r),e[r.id]=!0)}return{plugins:t,localIds:e}}function lK(i,e){return!e&&i===!1?null:i===!0?{}:i}function cK(i,{plugins:e,localIds:t},n,s){const o=[],r=i.getContext();for(const a of e){const l=a.id,c=lK(n[l],s);c!==null&&o.push({plugin:a,options:uK(i.config,{plugin:a,local:t[l]},c,r)})}return o}function uK(i,{plugin:e,local:t},n,s){const o=i.pluginScopeKeys(e),r=i.getOptionScopes(n,o);return t&&e.defaults&&r.push(e.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fy(i,e){const t=ci.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function dK(i,e){let t=i;return i==="_index_"?t=e:i==="_value_"&&(t=e==="x"?"y":"x"),t}function hK(i,e){return i===e?"_index_":"_value_"}function d0(i){if(i==="x"||i==="y"||i==="r")return i}function fK(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ny(i,...e){if(d0(i))return i;for(const t of e){const n=t.axis||fK(t.position)||i.length>1&&d0(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function h0(i,e,t){if(t[e+"AxisID"]===i)return{axis:e}}function pK(i,e){if(e.data&&e.data.datasets){const t=e.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(t.length)return h0(i,"x",t[0])||h0(i,"y",t[0])}return{}}function gK(i,e){const t=_l[i.type]||{scales:{}},n=e.scales||{},s=Fy(i.type,e),o=Object.create(null);return Object.keys(n).forEach(r=>{const a=n[r];if(!Tt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Ny(r,a,pK(r,i),ci.scales[a.type]),c=hK(l,s),u=t.scales||{};o[r]=bd(Object.create(null),[{axis:l},a,u[l],u[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Fy(a,e),u=(_l[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=dK(d,l),f=r[h+"AxisID"]||h;o[f]=o[f]||Object.create(null),bd(o[f],[{axis:h},n[f],u[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];bd(a,[ci.scales[a.type],ci.scale])}),o}function cI(i){const e=i.options||(i.options={});e.plugins=Dt(e.plugins,{}),e.scales=gK(i,e)}function uI(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function mK(i){return i=i||{},i.data=uI(i.data),cI(i),i}const f0=new Map,dI=new Set;function ip(i,e){let t=f0.get(i);return t||(t=e(),f0.set(i,t),dI.add(t)),t}const zu=(i,e,t)=>{const n=ha(e,t);n!==void 0&&i.add(n)};class vK{constructor(e){this._config=mK(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=uI(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),cI(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ip(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return ip(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return ip(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,n=this.type;return ip(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const n=this._scopeCache;let s=n.get(e);return(!s||t)&&(s=new Map,n.set(e,s)),s}getOptionScopes(e,t,n){const{options:s,type:o}=this,r=this._cachedScopes(e,n),a=r.get(t);if(a)return a;const l=new Set;t.forEach(u=>{e&&(l.add(e),u.forEach(d=>zu(l,e,d))),u.forEach(d=>zu(l,s,d)),u.forEach(d=>zu(l,_l[o]||{},d)),u.forEach(d=>zu(l,ci,d)),u.forEach(d=>zu(l,Ly,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),dI.has(t)&&r.set(t,c),c}chartOptionScopes(){const{options:e,type:t}=this;return[e,_l[t]||{},ci.datasets[t]||{},{type:t},ci,Ly]}resolveNamedOptions(e,t,n,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=p0(this._resolverCache,e,s);let l=r;if(yK(r,t)){o.$shared=!1,n=fa(n)?n():n;const c=this.createResolver(e,n,a);l=Qc(r,n,c)}for(const c of t)o[c]=l[c];return o}createResolver(e,t,n=[""],s){const{resolver:o}=p0(this._resolverCache,e,n);return Tt(t)?Qc(o,t,void 0,s):o}}function p0(i,e,t){let n=i.get(e);n||(n=new Map,i.set(e,n));const s=t.join();let o=n.get(s);return o||(o={resolver:US(e,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}const CK=i=>Tt(i)&&Object.getOwnPropertyNames(i).reduce((e,t)=>e||fa(i[t]),!1);function yK(i,e){const{isScriptable:t,isIndexable:n}=YP(i);for(const s of e){const o=t(s),r=n(s),a=(r||o)&&i[s];if(o&&(fa(a)||CK(a))||r&&Jt(a))return!0}return!1}var bK="4.3.0";const wK=["top","bottom","left","right","chartArea"];function g0(i,e){return i==="top"||i==="bottom"||wK.indexOf(i)===-1&&e==="x"}function m0(i,e){return function(t,n){return t[i]===n[i]?t[e]-n[e]:t[i]-n[i]}}function v0(i){const e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),jt(t&&t.onComplete,[i],e)}function SK(i){const e=i.chart,t=e.options.animation;jt(t&&t.onProgress,[i],e)}function hI(i){return ZP()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const Op={},C0=i=>{const e=hI(i);return Object.values(Op).filter(t=>t.canvas===e).pop()};function EK(i,e,t){const n=Object.keys(i);for(const s of n){const o=+s;if(o>=e){const r=i[s];delete i[s],(t>0||o>e)&&(i[o+t]=r)}}}function _K(i,e,t,n){return!t||i.type==="mouseout"?null:n?e:i}function RK(i){const{xScale:e,yScale:t}=i;if(e&&t)return{left:e.left,right:e.right,top:t.top,bottom:t.bottom}}var Nr;let Yl=(Nr=class{static register(...e){bo.add(...e),y0()}static unregister(...e){bo.remove(...e),y0()}constructor(e,t){const n=this.config=new vK(t),s=hI(e),o=C0(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||W5(s)),this.platform.updateConfig(n);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=j3(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new rK,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=rz(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],Op[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Jo.listen(this,"complete",v0),Jo.listen(this,"progress",SK),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:s,_aspectRatio:o}=this;return Vt(e)?t&&o?o:s?n/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return bo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():UR(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return GR(this.canvas,this.ctx),this}stop(){return Jo.stop(this),this}resize(e,t){Jo.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,e,t,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,UR(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),jt(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Ft(t,(n,s)=>{n.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{});let o=[];t&&(o=o.concat(Object.keys(t).map(r=>{const a=t[r],l=Ny(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ft(o,r=>{const a=r.options,l=a.id,c=Ny(l,a),u=Dt(a.type,r.dtype);(a.position===void 0||g0(a.position,c)!==g0(r.dposition))&&(a.position=r.dposition),s[l]=!0;let d=null;if(l in n&&n[l].type===u)d=n[l];else{const h=bo.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),n[d.id]=d}d.init(a,e)}),Ft(s,(r,a)=>{r||delete n[a]}),Ft(n,r=>{bs.configure(this,r,r.options),bs.addBox(this,r)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((s,o)=>s.index-o.index),n>t){for(let s=t;s<n;++s)this._destroyDatasetMeta(s);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(m0("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((n,s)=>{t.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let n,s;for(this._removeUnreferencedMetasets(),n=0,s=t.length;n<s;n++){const o=t[n];let r=this.getDatasetMeta(n);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||Fy(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const l=bo.getController(a),{datasetElementType:c,dataElementType:u}=ci.datasets[a];Object.assign(l,{dataElementType:bo.getElement(u),datasetElementType:c&&bo.getElement(c)}),r.controller=new l(this,n),e.push(r.controller)}}return this._updateMetasets(),e}_resetElements(){Ft(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!s&&o.indexOf(d)===-1;d.buildOrUpdateElements(h),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||Ft(o,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(m0("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ft(this.scales,e=>{bs.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!OR(t,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:n,start:s,count:o}of t){const r=n==="_removeElements"?-o:o;EK(e,s,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,n=o=>new Set(e.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<t;o++)if(!OR(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;bs.update(this,this.width,this.height,e);const t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],Ft(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,n=this.data.datasets.length;t<n;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,n=this.data.datasets.length;t<n;++t)this._updateDataset(t,fa(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const n=this.getDatasetMeta(e),s={meta:n,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Jo.has(this)?this.attached&&!Jo.running(this)&&Jo.start(this):(this.draw(),v0({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:s}=this._resizeBeforeDraw;this._resize(n,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,n=[];let s,o;for(s=0,o=t.length;s<o;++s){const r=t[s];(!e||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,n=e._clip,s=!n.disabled,o=RK(e)||this.chartArea,r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&BS(t,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),e.controller.draw(),s&&WS(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return gc(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,s){const o=w5.modes[t];return typeof o=="function"?o(this,e,n,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],n=this._metasets;let s=n.filter(o=>o&&o._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=zl(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!t.hidden}setDatasetVisibility(e,t){const n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){const s=n?"show":"hide",o=this.getDatasetMeta(e),r=o.controller._resolveAnimations(void 0,s);ph(t)?(o.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Jo.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),GR(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Op[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,n=(o,r)=>{t.addEventListener(this,o,r),e[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};Ft(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,n=(l,c)=>{t.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(t.removeEventListener(this,l,c),delete e[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},t.isAttached(this.canvas)?a():r()}unbindEvents(){Ft(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Ft(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){const s=n?"set":"remove";let o,r,a,l;for(t==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){r=e[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],n=e.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Cg(n,t)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){const s=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),r=o(t,e),a=n?e:o(e,t);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,t){const n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;const o=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(e,t,n){const{_active:s=[],options:o}=this,r=t,a=this._getActiveElements(e,s,n,r),l=X3(e),c=_K(e,this._lastEvent,n,l);n&&(this._lastEvent=null,jt(o.onHover,[e,a,this],this),l&&jt(o.onClick,[e,a,this],this));const u=!Cg(a,s);return(u||t)&&(this._active=a,this._updateHoverStyles(a,s,t)),this._lastEvent=c,u}_getActiveElements(e,t,n,s){if(e.type==="mouseout")return[];if(!n)return t;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}},ot(Nr,"defaults",ci),ot(Nr,"instances",Op),ot(Nr,"overrides",_l),ot(Nr,"registry",bo),ot(Nr,"version",bK),ot(Nr,"getChart",C0),Nr);function y0(){return Ft(Yl.instances,i=>i._plugins.invalidate())}function fI(i,e){const{x:t,y:n,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],e);let a,l,c,u,d;return i.horizontal?(d=r/2,a=Math.min(t,s),l=Math.max(t,s),c=n-d,u=n+d):(d=o/2,a=t-d,l=t+d,c=Math.min(n,s),u=Math.max(n,s)),{left:a,top:c,right:l,bottom:u}}function Yr(i,e,t,n){return i?0:Zs(e,t,n)}function TK(i,e,t){const n=i.options.borderWidth,s=i.borderSkipped,o=KP(n);return{t:Yr(s.top,o.top,0,t),r:Yr(s.right,o.right,0,e),b:Yr(s.bottom,o.bottom,0,t),l:Yr(s.left,o.left,0,e)}}function xK(i,e,t){const{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=ul(s),r=Math.min(e,t),a=i.borderSkipped,l=n||Tt(s);return{topLeft:Yr(!l||a.top||a.left,o.topLeft,0,r),topRight:Yr(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Yr(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Yr(!l||a.bottom||a.right,o.bottomRight,0,r)}}function AK(i){const e=fI(i),t=e.right-e.left,n=e.bottom-e.top,s=TK(i,t/2,n/2),o=xK(i,t/2,n/2);return{outer:{x:e.left,y:e.top,w:t,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function dC(i,e,t,n){const s=e===null,o=t===null,a=i&&!(s&&o)&&fI(i,n);return a&&(s||pc(e,a.left,a.right))&&(o||pc(t,a.top,a.bottom))}function DK(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function OK(i,e){i.rect(e.x,e.y,e.w,e.h)}function hC(i,e,t={}){const n=i.x!==t.x?-e:0,s=i.y!==t.y?-e:0,o=(i.x+i.w!==t.x+t.w?e:0)-n,r=(i.y+i.h!==t.y+t.h?e:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+r,radius:i.radius}}class fl extends Pu{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=AK(this),a=DK(r.radius)?gh:OK;e.save(),(r.w!==o.w||r.h!==o.h)&&(e.beginPath(),a(e,hC(r,t,o)),e.clip(),a(e,hC(o,-t,r)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),a(e,hC(o,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,n){return dC(this,e,t,n)}inXRange(e,t){return dC(this,e,null,t)}inYRange(e,t){return dC(this,null,e,t)}getCenterPoint(e){const{x:t,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(t+s)/2:t,y:o?n:(n+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}ot(fl,"id","bar"),ot(fl,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ot(fl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const ky=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],b0=ky.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));function pI(i){return ky[i%ky.length]}function gI(i){return b0[i%b0.length]}function PK(i,e){return i.borderColor=pI(e),i.backgroundColor=gI(e),++e}function IK(i,e){return i.backgroundColor=i.data.map(()=>pI(e++)),e}function MK(i,e){return i.backgroundColor=i.data.map(()=>gI(e++)),e}function LK(i){let e=0;return(t,n)=>{const s=i.getDatasetMeta(n).controller;s instanceof sd?e=IK(t,e):s instanceof Ap?e=MK(t,e):s&&(e=PK(t,e))}}function w0(i){let e;for(e in i)if(i[e].borderColor||i[e].backgroundColor)return!0;return!1}function FK(i){return i&&(i.borderColor||i.backgroundColor)}var tv={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,e,t){if(!t.enabled)return;const{data:{datasets:n},options:s}=i.config,{elements:o}=s;if(!t.forceOverride&&(w0(n)||FK(s)||o&&w0(o)))return;const r=LK(i);n.forEach(r)}};const S0=(i,e)=>{let{boxHeight:t=e,boxWidth:n=e}=i;return i.usePointStyle&&(t=Math.min(t,e),n=i.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(e,t)}},NK=(i,e)=>i!==null&&e!==null&&i.datasetIndex===e.datasetIndex&&i.index===e.index;class E0 extends Pu{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=jt(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(n=>e.filter(n,this.chart.data))),e.sort&&(t=t.sort((n,s)=>e.sort(n,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,s=Di(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=S0(n,o);let c,u;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=e;o.textAlign="left",o.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,p)=>{const v=n+t/2+o.measureText(g.text).width;(p===0||c[c.length-1]+v+2*a>r)&&(d+=u,c[c.length-(p>0?0:1)]=0,f+=u,h++),l[p]={left:0,top:f,row:h,width:v,height:s},c[c.length-1]+=v+a}),d}_fitCols(e,t,n,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-e;let d=a,h=0,f=0,g=0,p=0;return this.legendItems.forEach((v,y)=>{const{itemWidth:C,itemHeight:m}=kK(n,t,o,v,s);y>0&&f+m+2*a>u&&(d+=h+a,c.push({width:h,height:f}),g+=h+a,p++,h=f=0),l[y]={left:g,top:f,col:p,width:C,height:m},h=Math.max(h,C),f+=m+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,r=Rc(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Zi(n,this.left+s,this.right-this.lineWidths[a]);for(const c of t)a!==c.row&&(a=c.row,l=Zi(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=Zi(n,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of t)c.col!==a&&(a=c.col,l=Zi(n,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;BS(e,this),this._draw(),WS(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:r}=e,a=ci.color,l=Rc(e.rtl,this.left,this.width),c=Di(r.font),{padding:u}=r,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:g,boxHeight:p,itemHeight:v}=S0(r,d),y=function(R,O,A){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();const D=Dt(A.lineWidth,1);if(s.fillStyle=Dt(A.fillStyle,a),s.lineCap=Dt(A.lineCap,"butt"),s.lineDashOffset=Dt(A.lineDashOffset,0),s.lineJoin=Dt(A.lineJoin,"miter"),s.lineWidth=D,s.strokeStyle=Dt(A.strokeStyle,a),s.setLineDash(Dt(A.lineDash,[])),r.usePointStyle){const L={radius:p*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:D},S=l.xPlus(R,g/2),x=O+h;$P(s,L,S,x,r.pointStyleWidth&&g)}else{const L=O+Math.max((d-p)/2,0),S=l.leftForLtr(R,g),x=ul(A.borderRadius);s.beginPath(),Object.values(x).some(T=>T!==0)?gh(s,{x:S,y:L,w:g,h:p,radius:x}):s.rect(S,L,g,p),s.fill(),D!==0&&s.stroke()}s.restore()},C=function(R,O,A){Rl(s,A.text,R,O+v/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},m=this.isHorizontal(),w=this._computeTitleHeight();m?f={x:Zi(o,this.left+u,this.right-n[0]),y:this.top+u+w,line:0}:f={x:this.left+u,y:Zi(o,this.top+w+u,this.bottom-t[0].height),line:0},JP(this.ctx,e.textDirection);const E=v+u;this.legendItems.forEach((R,O)=>{s.strokeStyle=R.fontColor,s.fillStyle=R.fontColor;const A=s.measureText(R.text).width,D=l.textAlign(R.textAlign||(R.textAlign=r.textAlign)),L=g+h+A;let S=f.x,x=f.y;l.setWidth(this.width),m?O>0&&S+L+u>this.right&&(x=f.y+=E,f.line++,S=f.x=Zi(o,this.left+u,this.right-n[f.line])):O>0&&x+E>this.bottom&&(S=f.x=S+t[f.line].width+u,f.line++,x=f.y=Zi(o,this.top+w+u,this.bottom-t[f.line].height));const T=l.x(S);if(y(T,x,R),S=az(D,S+g+h,m?S+L:this.right,e.rtl),C(l.x(S),x,R),m)f.x+=L+u;else if(typeof R.text!="string"){const H=c.lineHeight;f.y+=mI(R,H)}else f.y+=E}),eI(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,n=Di(t.font),s=un(t.padding);if(!t.display)return;const o=Rc(e.rtl,this.left,this.width),r=this.ctx,a=t.position,l=n.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Zi(e.align,d,this.right-h);else{const g=this.columnSizes.reduce((p,v)=>Math.max(p,v.height),0);u=c+Zi(e.align,this.top,this.bottom-g-e.labels.padding-this._computeTitleHeight())}const f=Zi(a,d,d+h);r.textAlign=o.textAlign(HS(a)),r.textBaseline="middle",r.strokeStyle=t.color,r.fillStyle=t.color,r.font=n.string,Rl(r,t.text,f,u,n)}_computeTitleHeight(){const e=this.options.title,t=Di(e.font),n=un(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,s,o;if(pc(e,this.left,this.right)&&pc(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],pc(e,s.left,s.left+s.width)&&pc(t,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(e){const t=this.options;if(!HK(e.type,t))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,o=NK(s,n);s&&!o&&jt(t.onLeave,[e,s,this],this),this._hoveredItem=n,n&&!o&&jt(t.onHover,[e,n,this],this)}else n&&jt(t.onClick,[e,n,this],this)}}function kK(i,e,t,n,s){const o=VK(n,i,e,t),r=GK(s,n,e.lineHeight);return{itemWidth:o,itemHeight:r}}function VK(i,e,t,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),e+t.size/2+n.measureText(s).width}function GK(i,e,t){let n=i;return typeof e.text!="string"&&(n=mI(e,t)),n}function mI(i,e){const t=i.text?i.text.length+.5:0;return e*t}function HK(i,e){return!!((i==="mousemove"||i==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(i==="click"||i==="mouseup"))}var iv={id:"legend",_element:E0,start(i,e,t){const n=i.legend=new E0({ctx:i.ctx,options:t,chart:i});bs.configure(i,n,t),bs.addBox(i,n)},stop(i){bs.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,e,t){const n=i.legend;bs.configure(i,n,t),n.options=t},afterUpdate(i){const e=i.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(i,e){e.replay||i.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,e,t){const n=e.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const e=i.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(t?0:void 0),u=un(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class vI extends Pu{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;const s=Jt(n.text)?n.text.length:1;this._padding=un(n.padding);const o=s*Di(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:t,left:n,bottom:s,right:o,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=Zi(a,n,o),d=t+e,c=o-n):(r.position==="left"?(u=n+e,d=Zi(a,s,t),l=Ri*-.5):(u=o-e,d=Zi(a,t,s),l=Ri*.5),c=s-t),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const n=Di(t.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Rl(e,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:HS(t.align),textBaseline:"middle",translation:[r,a]})}}function BK(i,e){const t=new vI({ctx:i.ctx,options:e,chart:i});bs.configure(i,t,e),bs.addBox(i,t),i.titleBlock=t}var nv={id:"title",_element:vI,start(i,e,t){BK(i,t)},stop(i){const e=i.titleBlock;bs.removeBox(i,e),delete i.titleBlock},beforeUpdate(i,e,t){const n=i.titleBlock;bs.configure(i,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const rd={average(i){if(!i.length)return!1;let e,t,n=0,s=0,o=0;for(e=0,t=i.length;e<t;++e){const r=i[e].element;if(r&&r.hasValue()){const a=r.tooltipPosition();n+=a.x,s+=a.y,++o}}return{x:n/o,y:s/o}},nearest(i,e){if(!i.length)return!1;let t=e.x,n=e.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=tz(e,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();t=l.x,n=l.y}return{x:t,y:n}}};function Co(i,e){return e&&(Jt(e)?Array.prototype.push.apply(i,e):i.push(e)),i}function er(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
`)>-1?i.split(`
`):i}function WK(i,e){const{element:t,datasetIndex:n,index:s}=e,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t}}function _0(i,e){const t=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=e,l=Di(e.bodyFont),c=Di(e.titleFont),u=Di(e.footerFont),d=o.length,h=s.length,f=n.length,g=un(e.padding);let p=g.height,v=0,y=n.reduce((w,E)=>w+E.before.length+E.lines.length+E.after.length,0);if(y+=i.beforeBody.length+i.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),y){const w=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=f*w+(y-f)*l.lineHeight+(y-1)*e.bodySpacing}h&&(p+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let C=0;const m=function(w){v=Math.max(v,t.measureText(w).width+C)};return t.save(),t.font=c.string,Ft(i.title,m),t.font=l.string,Ft(i.beforeBody.concat(i.afterBody),m),C=e.displayColors?r+2+e.boxPadding:0,Ft(n,w=>{Ft(w.before,m),Ft(w.lines,m),Ft(w.after,m)}),C=0,t.font=u.string,Ft(i.footer,m),t.restore(),v+=g.width,{width:v,height:p}}function UK(i,e){const{y:t,height:n}=e;return t<n/2?"top":t>i.height-n/2?"bottom":"center"}function jK(i,e,t,n){const{x:s,width:o}=n,r=t.caretSize+t.caretPadding;if(i==="left"&&s+o+r>e.width||i==="right"&&s-o-r<0)return!0}function $K(i,e,t,n){const{x:s,width:o}=t,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),jK(c,i,e,t)&&(c="center"),c}function R0(i,e,t){const n=t.yAlign||e.yAlign||UK(i,t);return{xAlign:t.xAlign||e.xAlign||$K(i,e,t,n),yAlign:n}}function zK(i,e){let{x:t,width:n}=i;return e==="right"?t-=n:e==="center"&&(t-=n/2),t}function KK(i,e,t){let{y:n,height:s}=i;return e==="top"?n+=t:e==="bottom"?n-=s+t:n-=s/2,n}function T0(i,e,t,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=t,c=s+o,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=ul(r);let g=zK(e,a);const p=KK(e,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,h)+s:a==="right"&&(g+=Math.max(d,f)+s),{x:Zs(g,0,n.width-e.width),y:Zs(p,0,n.height-e.height)}}function np(i,e,t){const n=un(t.padding);return e==="center"?i.x+i.width/2:e==="right"?i.x+i.width-n.right:i.x+n.left}function x0(i){return Co([],er(i))}function YK(i,e,t){return zl(i,{tooltip:e,tooltipItems:t,type:"tooltip"})}function A0(i,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?i.override(t):i}const CI={beforeTitle:Qo,title(i){if(i.length>0){const e=i[0],t=e.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return t[e.dataIndex]}return""},afterTitle:Qo,beforeBody:Qo,beforeLabel:Qo,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let e=i.dataset.label||"";e&&(e+=": ");const t=i.formattedValue;return Vt(t)||(e+=t),e},labelColor(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const t=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Qo,afterBody:Qo,beforeFooter:Qo,footer:Qo,afterFooter:Qo};function An(i,e,t,n){const s=i[e].call(t,n);return typeof s>"u"?CI[e].call(t,n):s}class Vy extends Pu{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&t.options.animation&&n.animations,o=new tI(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=YK(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:n}=t,s=An(n,"beforeTitle",this,e),o=An(n,"title",this,e),r=An(n,"afterTitle",this,e);let a=[];return a=Co(a,er(s)),a=Co(a,er(o)),a=Co(a,er(r)),a}getBeforeBody(e,t){return x0(An(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:n}=t,s=[];return Ft(e,o=>{const r={before:[],lines:[],after:[]},a=A0(n,o);Co(r.before,er(An(a,"beforeLabel",this,o))),Co(r.lines,An(a,"label",this,o)),Co(r.after,er(An(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(e,t){return x0(An(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:n}=t,s=An(n,"beforeFooter",this,e),o=An(n,"footer",this,e),r=An(n,"afterFooter",this,e);let a=[];return a=Co(a,er(s)),a=Co(a,er(o)),a=Co(a,er(r)),a}_createItems(e){const t=this._active,n=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=t.length;l<c;++l)a.push(WK(this.chart,t[l]));return e.filter&&(a=a.filter((u,d,h)=>e.filter(u,d,h,n))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,n))),Ft(a,u=>{const d=A0(e.callbacks,u);s.push(An(d,"labelColor",this,u)),o.push(An(d,"labelPointStyle",this,u)),r.push(An(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(e,t){const n=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=rd[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);const l=this._size=_0(this,n),c=Object.assign({},a,l),u=R0(this.chart,n,c),d=T0(n,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,s){const o=this.getCaretPosition(e,n,s);t.lineTo(o.x1,o.y1),t.lineTo(o.x2,o.y2),t.lineTo(o.x3,o.y3)}getCaretPosition(e,t,n){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ul(a),{x:h,y:f}=e,{width:g,height:p}=t;let v,y,C,m,w,E;return o==="center"?(w=f+p/2,s==="left"?(v=h,y=v-r,m=w+r,E=w-r):(v=h+g,y=v+r,m=w-r,E=w+r),C=v):(s==="left"?y=h+Math.max(l,u)+r:s==="right"?y=h+g-Math.max(c,d)-r:y=this.caretX,o==="top"?(m=f,w=m-r,v=y-r,C=y+r):(m=f+p,w=m+r,v=y+r,C=y-r),E=m),{x1:v,x2:y,x3:C,y1:m,y2:w,y3:E}}drawTitle(e,t,n){const s=this.title,o=s.length;let r,a,l;if(o){const c=Rc(n.rtl,this.x,this.width);for(e.x=np(this,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline="middle",r=Di(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=r.string,l=0;l<o;++l)t.fillText(s[l],c.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+a,l+1===o&&(e.y+=n.titleMarginBottom-a)}}_drawColorBox(e,t,n,s,o){const r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,u=Di(o.bodyFont),d=np(this,"left",o),h=s.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=t.y+f;if(o.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=s.leftForLtr(h,c)+c/2,y=g+l/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,HR(e,p,v,y),e.strokeStyle=r.borderColor,e.fillStyle=r.backgroundColor,HR(e,p,v,y)}else{e.lineWidth=Tt(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,e.strokeStyle=r.borderColor,e.setLineDash(r.borderDash||[]),e.lineDashOffset=r.borderDashOffset||0;const p=s.leftForLtr(h,c),v=s.leftForLtr(s.xPlus(h,1),c-2),y=ul(r.borderRadius);Object.values(y).some(C=>C!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,gh(e,{x:p,y:g,w:c,h:l,radius:y}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),gh(e,{x:v,y:g+1,w:c-2,h:l-2,radius:y}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(p,g,c,l),e.strokeRect(p,g,c,l),e.fillStyle=r.backgroundColor,e.fillRect(v,g+1,c-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=n,d=Di(n.bodyFont);let h=d.lineHeight,f=0;const g=Rc(n.rtl,this.x,this.width),p=function(A){t.fillText(A,g.x(e.x+f),e.y+h/2),e.y+=h+o},v=g.textAlign(r);let y,C,m,w,E,R,O;for(t.textAlign=r,t.textBaseline="middle",t.font=d.string,e.x=np(this,v,n),t.fillStyle=n.bodyColor,Ft(this.beforeBody,p),f=a&&v!=="right"?r==="center"?c/2+u:c+2+u:0,w=0,R=s.length;w<R;++w){for(y=s[w],C=this.labelTextColors[w],t.fillStyle=C,Ft(y.before,p),m=y.lines,a&&m.length&&(this._drawColorBox(t,e,w,g,n),h=Math.max(d.lineHeight,l)),E=0,O=m.length;E<O;++E)p(m[E]),h=d.lineHeight;Ft(y.after,p)}f=0,h=d.lineHeight,Ft(this.afterBody,p),e.y-=o}drawFooter(e,t,n){const s=this.footer,o=s.length;let r,a;if(o){const l=Rc(n.rtl,this.x,this.width);for(e.x=np(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=l.textAlign(n.footerAlign),t.textBaseline="middle",r=Di(n.footerFont),t.fillStyle=n.footerColor,t.font=r.string,a=0;a<o;++a)t.fillText(s[a],l.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+n.footerSpacing}}drawBackground(e,t,n,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=e,{width:c,height:u}=n,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=ul(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(a+d,l),r==="top"&&this.drawCaret(e,t,n,s),t.lineTo(a+c-h,l),t.quadraticCurveTo(a+c,l,a+c,l+h),r==="center"&&o==="right"&&this.drawCaret(e,t,n,s),t.lineTo(a+c,l+u-g),t.quadraticCurveTo(a+c,l+u,a+c-g,l+u),r==="bottom"&&this.drawCaret(e,t,n,s),t.lineTo(a+f,l+u),t.quadraticCurveTo(a,l+u,a,l+u-f),r==="center"&&o==="left"&&this.drawCaret(e,t,n,s),t.lineTo(a,l+d),t.quadraticCurveTo(a,l,a+d,l),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){const r=rd[e.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=_0(this,e),l=Object.assign({},r,this._size),c=R0(t,e,l),u=T0(e,l,c,t);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const r=un(t.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&a&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,s,t),JP(e,t.textDirection),o.y+=r.top,this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),eI(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const n=this._active,s=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Cg(n,s),r=this._positionChanged(s,t);(o||r)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(e,o,t,n),a=this._positionChanged(r,e),l=t||!Cg(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),l}_getActiveElements(e,t,n,s){const o=this.options;if(e.type==="mouseout")return[];if(!s)return t;const r=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(e,t){const{caretX:n,caretY:s,options:o}=this,r=rd[o.position].call(this,e,t);return r!==!1&&(n!==r.x||s!==r.y)}}ot(Vy,"positioners",rd);var sv={id:"tooltip",_element:Vy,positioners:rd,afterInit(i,e,t){t&&(i.tooltip=new Vy({chart:i,options:t}))},beforeUpdate(i,e,t){i.tooltip&&i.tooltip.initialize(t)},reset(i,e,t){i.tooltip&&i.tooltip.initialize(t)},afterDraw(i){const e=i.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(i.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;e.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",t)}},afterEvent(i,e){if(i.tooltip){const t=e.replay;i.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,e)=>e.bodyFont.size,boxWidth:(i,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:CI},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const qK=(i,e,t,n)=>(typeof e=="string"?(t=i.push(e)-1,n.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function XK(i,e,t,n){const s=i.indexOf(e);if(s===-1)return qK(i,e,t,n);const o=i.lastIndexOf(e);return s!==o?t:s}const QK=(i,e)=>i===null?null:Zs(Math.round(i),0,e);function D0(i){const e=this.getLabels();return i>=0&&i<e.length?e[i]:i}class Zc extends Kl{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const n=this.getLabels();for(const{index:s,label:o}of t)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(Vt(e))return null;const n=this.getLabels();return t=isFinite(t)&&n[t]===e?t:XK(n,e,Dt(t,e),this._addedLabels),QK(t,n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),t||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){const e=this.min,t=this.max,n=this.options.offset,s=[];let o=this.getLabels();o=e===0&&t===o.length-1?o:o.slice(e,t+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=e;r<=t;r++)s.push({value:r});return s}getLabelForValue(e){return D0.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ot(Zc,"id","category"),ot(Zc,"defaults",{ticks:{callback:D0}});function ZK(i,e){const t=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=i,f=o||1,g=u-1,{min:p,max:v}=e,y=!Vt(r),C=!Vt(a),m=!Vt(c),w=(v-p)/(d+1);let E=IR((v-p)/g/f)*f,R,O,A,D;if(E<1e-14&&!y&&!C)return[{value:p},{value:v}];D=Math.ceil(v/E)-Math.floor(p/E),D>g&&(E=IR(D*E/g/f)*f),Vt(l)||(R=Math.pow(10,l),E=Math.ceil(E*R)/R),s==="ticks"?(O=Math.floor(p/E)*E,A=Math.ceil(v/E)*E):(O=p,A=v),y&&C&&o&&J3((a-r)/o,E/1e3)?(D=Math.round(Math.min((a-r)/E,u)),E=(a-r)/D,O=r,A=a):m?(O=y?r:O,A=C?a:A,D=c-1,E=(A-O)/D):(D=(A-O)/E,Tp(D,Math.round(D),E/1e3)?D=Math.round(D):D=Math.ceil(D));const L=Math.max(MR(E),MR(O));R=Math.pow(10,Vt(l)?L:l),O=Math.round(O*R)/R,A=Math.round(A*R)/R;let S=0;for(y&&(h&&O!==r?(t.push({value:r}),O<r&&S++,Tp(Math.round((O+S*E)*R)/R,r,O0(r,w,i))&&S++):O<r&&S++);S<D;++S){const x=Math.round((O+S*E)*R)/R;if(C&&x>a)break;t.push({value:x})}return C&&h&&A!==a?t.length&&Tp(t[t.length-1].value,a,O0(a,w,i))?t[t.length-1].value=a:t.push({value:a}):(!C||A===a)&&t.push({value:A}),t}function O0(i,e,{horizontal:t,minRotation:n}){const s=Qs(n),o=(t?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+i).length;return Math.min(e/o,r)}class Rg extends Kl{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return Vt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=t?s:l,a=l=>o=n?o:l;if(e){const l=ia(s),c=ia(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),e||r(s-l)}this.min=s,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:n}=e,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const s={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,r=ZK(s,o);return e.bounds==="ticks"&&VP(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const s=(n-t)/Math.max(e.length-1,1)/2;t-=s,n+=s}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return Sf(e,this.chart.options.locale,this.options.ticks.format)}}class Jc extends Rg{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=ki(e)?e:0,this.max=ki(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,n=Qs(this.options.ticks.minRotation),s=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ot(Jc,"id","linear"),ot(Jc,"defaults",{ticks:{callback:Jm.formatters.numeric}});const vh=i=>Math.floor(Kr(i)),ja=(i,e)=>Math.pow(10,vh(i)+e);function P0(i){return i/Math.pow(10,vh(i))===1}function I0(i,e,t){const n=Math.pow(10,t),s=Math.floor(i/n);return Math.ceil(e/n)-s}function JK(i,e){const t=e-i;let n=vh(t);for(;I0(i,e,n)>10;)n++;for(;I0(i,e,n)<10;)n--;return Math.min(n,vh(i))}function e8(i,{min:e,max:t}){e=jn(i.min,e);const n=[],s=vh(e);let o=JK(e,t),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((e-l)*r)/r,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),h=jn(i.min,Math.round((l+u+d*Math.pow(10,o))*r)/r);for(;h<t;)n.push({value:h,major:P0(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),h=Math.round((l+u+d*Math.pow(10,o))*r)/r;const f=jn(i.max,h);return n.push({value:f,major:P0(f),significand:d}),n}class M0 extends Kl{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const n=Rg.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return ki(n)&&n>0?n:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=ki(e)?Math.max(0,e):null,this.max=ki(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ki(this._userMin)&&(this.min=e===ja(this.min,0)?ja(this.min,-1):ja(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let n=this.min,s=this.max;const o=a=>n=e?n:a,r=a=>s=t?s:a;n===s&&(n<=0?(o(1),r(10)):(o(ja(n,-1)),r(ja(s,1)))),n<=0&&o(ja(s,-1)),s<=0&&r(ja(n,1)),this.min=n,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},n=e8(t,this);return e.bounds==="ticks"&&VP(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":Sf(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Kr(e),this._valueRange=Kr(this.max)-Kr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Kr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}ot(M0,"id","logarithmic"),ot(M0,"defaults",{ticks:{callback:Jm.formatters.logarithmic,major:{enabled:!0}}});function Gy(i){const e=i.ticks;if(e.display&&i.display){const t=un(e.backdropPadding);return Dt(e.font&&e.font.size,ci.font.size)+t.height}return 0}function t8(i,e,t){return t=Jt(t)?t:[t],{w:vz(i,e.string,t),h:t.length*e.lineHeight}}function L0(i,e,t,n,s){return i===n||i===s?{start:e-t/2,end:e+t/2}:i<n||i>s?{start:e-t,end:e}:{start:e,end:e+t}}function i8(i){const e={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},e),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?Ri/o:0;for(let l=0;l<o;l++){const c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;const u=i.getPointPosition(l,i.drawingArea+s[l],a),d=Di(c.font),h=t8(i.ctx,d,i._pointLabels[l]);n[l]=h;const f=wo(i.getIndexAngle(l)+a),g=Math.round(VS(f)),p=L0(g,u.x,h.w,0,180),v=L0(g,u.y,h.h,90,270);n8(t,e,f,p,v)}i.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),i._pointLabelItems=r8(i,n,s)}function n8(i,e,t,n,s){const o=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,i.l=Math.min(i.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,i.r=Math.max(i.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,i.t=Math.min(i.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,i.b=Math.max(i.b,e.b+l))}function s8(i,e,t){const n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=t,l=i.getPointPosition(e,n+s+r,o),c=Math.round(VS(wo(l.angle+rn))),u=c8(l.y,a.h,c),d=a8(c),h=l8(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function o8(i,e){if(!e)return!0;const{left:t,top:n,right:s,bottom:o}=i;return!(gc({x:t,y:n},e)||gc({x:t,y:o},e)||gc({x:s,y:n},e)||gc({x:s,y:o},e))}function r8(i,e,t){const n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Gy(o)/2,additionalAngle:r?Ri/s:0};let c;for(let u=0;u<s;u++){l.padding=t[u],l.size=e[u];const d=s8(i,u,l);n.push(d),a==="auto"&&(d.visible=o8(d,c),d.visible&&(c=d))}return n}function a8(i){return i===0||i===180?"center":i<180?"left":"right"}function l8(i,e,t){return t==="right"?i-=e:t==="center"&&(i-=e/2),i}function c8(i,e,t){return t===90||t===270?i-=e/2:(t>270||t<90)&&(i-=e),i}function u8(i,e,t){const{left:n,top:s,right:o,bottom:r}=t,{backdropColor:a}=e;if(!Vt(a)){const l=ul(e.borderRadius),c=un(e.backdropPadding);i.fillStyle=a;const u=n-c.left,d=s-c.top,h=o-n+c.width,f=r-s+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),gh(i,{x:u,y:d,w:h,h:f,radius:l}),i.fill()):i.fillRect(u,d,h,f)}}function d8(i,e){const{ctx:t,options:{pointLabels:n}}=i;for(let s=e-1;s>=0;s--){const o=i._pointLabelItems[s];if(!o.visible)continue;const r=n.setContext(i.getPointLabelContext(s));u8(t,r,o);const a=Di(r.font),{x:l,y:c,textAlign:u}=o;Rl(t,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function yI(i,e,t,n){const{ctx:s}=i;if(t)s.arc(i.xCenter,i.yCenter,e,0,wn);else{let o=i.getPointPosition(0,e);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,e),s.lineTo(o.x,o.y)}}function h8(i,e,t,n,s){const o=i.ctx,r=e.circular,{color:a,lineWidth:l}=e;!r&&!n||!a||!l||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash),o.lineDashOffset=s.dashOffset,o.beginPath(),yI(i,t,r,n),o.closePath(),o.stroke(),o.restore())}function f8(i,e,t){return zl(i,{label:t,index:e,type:"pointLabel"})}class sp extends Rg{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=un(Gy(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=ki(e)&&!isNaN(e)?e:0,this.max=ki(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gy(this.options))}generateTickLabels(e){Rg.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,n)=>{const s=jt(this.options.pointLabels.callback,[t,n],this);return s||s===0?s:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?i8(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,s))}getIndexAngle(e){const t=wn/(this._pointLabels.length||1),n=this.options.startAngle||0;return wo(e*t+Qs(n))}getDistanceFromCenterForValue(e){if(Vt(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(Vt(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const n=t[e];return f8(this.getContext(),e,n)}}getPointPosition(e,t,n=0){const s=this.getIndexAngle(e)-rn+n;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:n,right:s,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:s,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),yI(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:n,grid:s,border:o}=t,r=this._pointLabels.length;let a,l,c;if(t.pointLabels.display&&d8(this,r),s.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),g=o.setContext(h);h8(this,f,l,r,g)}}),n.display){for(e.save(),a=r-1;a>=0;a--){const u=n.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const s=this.getIndexAngle(0);let o,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!t.reverse)return;const c=n.setContext(this.getContext(l)),u=Di(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,r=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=un(c.backdropPadding);e.fillRect(-r/2-d.left,-o-u.size/2-d.top,r+d.width,u.size+d.height)}Rl(e,a.label,0,-o,u,{color:c.color})}),e.restore()}drawTitle(){}}ot(sp,"id","radialLinear"),ot(sp,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Jm.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),ot(sp,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ot(sp,"descriptors",{angleLines:{_fallback:"grid"}});const ov={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Pn=Object.keys(ov);function p8(i,e){return i-e}function F0(i,e){if(Vt(e))return null;const t=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts;let r=e;return typeof n=="function"&&(r=n(r)),ki(r)||(r=typeof n=="string"?t.parse(r,n):t.parse(r)),r===null?null:(s&&(r=s==="week"&&(wg(o)||o===!0)?t.startOf(r,"isoWeek",o):t.startOf(r,s)),+r)}function N0(i,e,t,n){const s=Pn.length;for(let o=Pn.indexOf(i);o<s-1;++o){const r=ov[Pn[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((t-e)/(a*r.size))<=n)return Pn[o]}return Pn[s-1]}function g8(i,e,t,n,s){for(let o=Pn.length-1;o>=Pn.indexOf(t);o--){const r=Pn[o];if(ov[r].common&&i._adapter.diff(s,n,r)>=e-1)return r}return Pn[t?Pn.indexOf(t):0]}function m8(i){for(let e=Pn.indexOf(i)+1,t=Pn.length;e<t;++e)if(ov[Pn[e]].common)return Pn[e]}function k0(i,e,t){if(!t)i[e]=!0;else if(t.length){const{lo:n,hi:s}=GS(t,e),o=t[n]>=e?t[n]:t[s];i[o]=!0}}function v8(i,e,t,n){const s=i._adapter,o=+s.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=t[a],l>=0&&(e[l].major=!0);return e}function V0(i,e,t){const n=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,n.push({value:a,major:!1});return o===0||!t?n:v8(i,n,s,t)}class Tg extends Kl{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const n=e.time||(e.time={}),s=this._adapter=new m5._date(e.adapters.date);s.init(t),bd(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:F0(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,n=e.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=ki(s)&&!isNaN(s)?s:+t.startOf(Date.now(),n),o=ki(o)&&!isNaN(o)?o:+t.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}buildTicks(){const e=this.options,t=e.time,n=e.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=sz(s,o,r);return this._unit=t.unit||(n.autoSkip?N0(t.minUnit,this.min,this.max,this._getLabelCapacity(o)):g8(this,a.length,t.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:m8(this._unit),this.initOffsets(s),e.reverse&&a.reverse(),V0(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,n=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?n=o:n=(o-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;t=Zs(t,0,r),n=Zs(n,0,r),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){const e=this._adapter,t=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||N0(o.minUnit,t,n,this._getLabelCapacity(t)),a=Dt(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=wg(l)||l===!0,u={};let d=t,h,f;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":r),e.diff(n,t,r)>1e5*a)throw new Error(t+" and "+n+" are too far apart with stepSize of "+a+" "+r);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<n;h=+e.add(h,a,r),f++)k0(u,h,g);return(h===n||s.bounds==="ticks"||f===1)&&k0(u,h,g),Object.keys(u).sort((p,v)=>p-v).map(p=>+p)}getLabelForValue(e){const t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){const s=this.options.time.displayFormats,o=this._unit,r=t||s[o];return this._adapter.format(e,r)}_tickFormatFunction(e,t,n,s){const o=this.options,r=o.ticks.callback;if(r)return jt(r,[e,t,n],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=n[t],f=c&&d&&h&&h.major;return this._adapter.format(e,s||(f?d:u))}generateTickLabels(e){let t,n,s;for(t=0,n=e.length;t<n;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,n=this.ctx.measureText(e).width,s=Qs(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(e){const t=this.options.time,n=t.displayFormats,s=n[t.unit]||n.millisecond,o=this._tickFormatFunction(e,0,V0(this,[e],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,n=s.length;t<n;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,n;if(e.length)return e;const s=this.getLabels();for(t=0,n=s.length;t<n;++t)e.push(F0(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return HP(e.sort(p8))}}ot(Tg,"id","time"),ot(Tg,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function op(i,e,t){let n=0,s=i.length-1,o,r,a,l;t?(e>=i[n].pos&&e<=i[s].pos&&({lo:n,hi:s}=My(i,"pos",e)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(e>=i[n].time&&e<=i[s].time&&({lo:n,hi:s}=My(i,"time",e)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);const c=r-o;return c?a+(l-a)*(e-o)/c:a}class G0 extends Tg{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=op(t,this.min),this._tableRange=op(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:n}=this,s=[],o=[];let r,a,l,c,u;for(r=0,a=e.length;r<a;++r)c=e[r],c>=t&&c<=n&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],l=s[r-1],c=s[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?e=this.normalize(t.concat(n)):e=t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(op(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return op(this._table,n*this._tableRange+this._minPos,!0)}}ot(G0,"id","timeseries"),ot(G0,"defaults",Tg.defaults);const bI={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},C8={type:{type:String,required:!0},...bI},y8=Eb[0]==="2"?(i,e)=>Object.assign(i,{attrs:e}):(i,e)=>Object.assign(i,e);function nc(i){return Ig(i)?it(i):i}function b8(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i;return Ig(e)?new Proxy(i,{}):i}function w8(i,e){const t=i.options;t&&e&&Object.assign(t,e)}function wI(i,e){i.labels=e}function SI(i,e,t){const n=[];i.datasets=e.map(s=>{const o=i.datasets.find(r=>r[t]===s[t]);return!o||!s.data||n.includes(o)?{...s}:(n.push(o),Object.assign(o,s),o)})}function S8(i,e){const t={labels:[],datasets:[]};return wI(t,i.labels),SI(t,i.datasets,e),t}const E8=xl({props:C8,setup(i,e){let{expose:t}=e;const n=Te(null),s=Fe(null);t({chart:s});const o=()=>{if(!n.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=i,f=S8(c,h),g=b8(f,c);s.value=new Yl(n.value,{type:l,data:g,options:{...u},plugins:d})},r=()=>{const l=it(s.value);l&&(l.destroy(),s.value=null)},a=l=>{l.update(i.updateMode)};return Pi(o),dn(r),Le([()=>i.options,()=>i.data],(l,c)=>{let[u,d]=l,[h,f]=c;const g=it(s.value);if(!g)return;let p=!1;if(u){const v=nc(u),y=nc(h);v&&v!==y&&(w8(g,v),p=!0)}if(d){const v=nc(d.labels),y=nc(f.labels),C=nc(d.datasets),m=nc(f.datasets);v!==y&&(wI(g.config.data,v),p=!0),C&&C!==m&&(SI(g.config.data,C,i.datasetIdKey),p=!0)}p&&a(g)},{deep:!0}),()=>ts("canvas",{ref:n})}});function _8(i,e){return Yl.register(e),xl({props:bI,setup(t,n){let{expose:s}=n;const o=Fe(null),r=a=>{o.value=a==null?void 0:a.chart};return s({chart:o}),()=>ts(E8,y8({ref:r},{type:i,...t}))}})}const rv=_8("bar",xp);Yl.register(nv,sv,iv,fl,Zc,Jc,tv);const R8={name:"dashboardCardWeight",props:{inputData:{},image:String},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i},chartData(){var i={labels:[],datasets:[]},e="",t=-1;return this.inputData&&this.inputData.forEach(n=>{console.log(n);for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))if(s=="selectedGroups"){n[s]?e=cv(n[s])[0].title:e="";var o={label:e,data:[]};t++,i.datasets.push(o)}else{var r=i.labels.indexOf(s);r==-1&&(i.labels.push(s),r=i.labels.indexOf(s)),i.datasets[t].data[r]=n[s]}}),i}},components:{Bar:rv},data(){return{chartOptions:{responsive:!0}}},setup(i){return{t:Oe}}};function T8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("Bar"),u=de("v-card-text"),d=de("v-card");return me(),we(d,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t("Everage Weigt")),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(u,null,{default:oe(()=>[b(c,{id:"my-chart-id",options:s.chartOptions,data:o.chartData},null,8,["options","data"])]),_:1})]),_:1})}const x8=nt(R8,[["render",T8]]);Yl.register(nv,sv,iv,fl,Zc,Jc,tv);const A8={name:"dashboardCardPregnancy",props:{inputData:{},caption:String,image:String},methods:{getLabel(i){return qn("gender",i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i},chartData(){function i(s,o){var r;for(r=0;r<s.length;r++)if(s[r].label===o)return r;return-1}var e={labels:[],datasets:[]};if(this.inputData!==void 0){var t=[];this.inputData.forEach(s=>{t.includes(s.date)||t.push(s.date)});var n=[];this.inputData.forEach(s=>{var o=i(n,s.pregnancy);if(o==-1){var r={label:s.pregnancy,data:[]};n.push(r)}}),this.inputData.forEach(s=>{var o=i(n,s.pregnancy);n[o].data.push(s.count)}),e={labels:t,datasets:n}}return e}},components:{Bar:rv},data(){return{chartOptions:{responsive:!0}}},setup(i){return{}}};function D8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("Bar"),u=de("v-card-text"),d=de("v-card");return me(),we(d,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(t.caption),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(u,null,{default:oe(()=>[b(c,{id:"my-chart-id",options:s.chartOptions,data:o.chartData},null,8,["options","data"])]),_:1})]),_:1})}const O8=nt(A8,[["render",D8]]);Yl.register(nv,sv,iv,fl,Zc,Jc,tv);const P8={name:"dashboardCardWeight",props:{inputData:{},caption:String,image:String},methods:{getLabel(i){return qn("gender",i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i},chartData(){var i={labels:"",datasets:[]};if(this.inputData!==void 0){var e=[];this.inputData.forEach(n=>{e.includes(n.date)||e.push(n.date)});var t=[{label:"Insiminarions",data:[]}];this.inputData.forEach(n=>{t[0].data.push(n.count)}),i={labels:e,datasets:t}}return i}},components:{Bar:rv},data(){return{chartOptions:{responsive:!0}}},setup(i){return{t:Oe}}};function I8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("Bar"),u=de("v-card-text"),d=de("v-card");return me(),we(d,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t(t.caption)),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(u,null,{default:oe(()=>[b(c,{id:"my-chart-id",options:s.chartOptions,data:o.chartData},null,8,["options","data"])]),_:1})]),_:1})}const M8=nt(P8,[["render",I8]]),L8={name:"dashboardCardLastSeen",props:{inputData:{},caption:String,image:String},methods:{open(i){Rs.push("animal/"+i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i}},setup(i){return{t:Oe}}};function F8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("v-list-item"),u=de("v-divider"),d=de("v-list"),h=de("v-card-text"),f=de("v-card");return me(),we(f,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(t.caption),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(h,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"}},{append:oe(()=>[De(Me(n.t("Days")),1)]),default:oe(()=>[De(Me(n.t("tag"))+" ",1)]),_:1}),b(u),(me(!0),kt(He,null,Wo(t.inputData,g=>(me(),we(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"},onClick:p=>o.open(g.label)},{append:oe(()=>[De(Me(Math.round(g.lastSeenDays)),1)]),default:oe(()=>[De(Me(g.label)+" ",1)]),_:2},1032,["onClick"]))),256))]),_:1})]),_:1})]),_:1})}const N8=nt(L8,[["render",F8]]),k8={name:"dashboardCardNumbers",props:{inputData:{},caption:String,image:String},methods:{getLabel(i){return qn("group",i)}},computed:{sum(){var i=0;for(const e in this.inputData)i=i+this.inputData[e].count*1;return i}},setup(i){return{t:Oe,getGroupObject:_I}}};function V8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("v-list-item"),u=de("v-divider"),d=de("v-list"),h=de("v-card-text"),f=de("v-card");return me(),we(f,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t("Groups")),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(h,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"}},{append:oe(()=>[De(Me(n.t("Count")),1)]),default:oe(()=>[De(Me(n.t("Group"))+" ",1)]),_:1}),b(u),(me(!0),kt(He,null,Wo(t.inputData,g=>(me(),we(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"},key:g.selectedGroups},{append:oe(()=>[De(Me(g.count),1)]),default:oe(()=>[De(Me(n.getGroupObject(g.selectedGroups).label)+" ",1)]),_:2},1024))),128)),b(c,null,{append:oe(()=>[De(Me(o.sum),1)]),default:oe(()=>[De(Me(n.t("Sum"))+" ",1)]),_:1})]),_:1})]),_:1})]),_:1})}const G8=nt(k8,[["render",V8]]),H8={name:"dashboardCardNumbers",props:{data:{},caption:String,image:String},methods:{getLabel(i){return qn("status",i)}},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i}},setup(i){return{t:Oe}}};function B8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("v-list-item"),u=de("v-divider"),d=de("v-list"),h=de("v-card-text"),f=de("v-card");return me(),we(f,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t("Animals Status")),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(h,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"}},{append:oe(()=>[De(Me(n.t("Count")),1)]),default:oe(()=>[De(Me(n.t("Status"))+" ",1)]),_:1}),b(u),(me(!0),kt(He,null,Wo(t.data,g=>(me(),we(c,{style:{"min-height":"0px","padding-top":"0px","padding-bottom":"0px"},key:g.genderId},{append:oe(()=>[De(Me(g.count),1)]),default:oe(()=>[De(Me(o.getLabel(g.statusId))+" ",1)]),_:2},1024))),128)),b(c,null,{append:oe(()=>[De(Me(o.sum),1)]),default:oe(()=>[De(Me(n.t("Sum"))+" ",1)]),_:1})]),_:1})]),_:1})]),_:1})}const W8=nt(H8,[["render",B8]]);Yl.register(nv,sv,iv,fl,Zc,Jc,tv);const U8={name:"dashboardCardWeight",props:{inputData:{},image:String},computed:{sum(){var i=0;for(const e in this.data)i=i+this.data[e].count*1;return i},chartData(){var i={labels:[],datasets:[]},e="",t=-1;return this.inputData&&this.inputData.forEach(n=>{console.log(n);for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))if(s=="actionId"){console.log("getLabel "+n[s]),n[s]?e=qn("action",n[s]):e="";var o={label:e,data:[]};t++,i.datasets.push(o)}else{var r=i.labels.indexOf(s);r==-1&&(i.labels.push(s),r=i.labels.indexOf(s)),i.datasets[t].data[r]=n[s]}}),i}},components:{Bar:rv},data(){return{chartOptions:{responsive:!0,scales:{x:{stacked:!0},y:{stacked:!0}}}}},setup(i){return{t:Oe}}};function j8(i,e,t,n,s,o){const r=de("v-chip"),a=de("v-card-title"),l=de("v-img"),c=de("Bar"),u=de("v-card-text"),d=de("v-card");return me(),we(d,{class:"mx-auto","max-width":"400"},{default:oe(()=>[b(l,{class:"align-end text-white",height:"200",src:t.image,cover:""},{default:oe(()=>[b(a,null,{default:oe(()=>[b(r,{size:"x-large"},{default:oe(()=>[De(Me(n.t("Action Overview")),1)]),_:1})]),_:1})]),_:1},8,["src"]),b(u,null,{default:oe(()=>[b(c,{id:"my-chart-id",options:s.chartOptions,data:o.chartData},null,8,["options","data"])]),_:1})]),_:1})}const $8=nt(U8,[["render",j8]]),z8={name:"dashboardView",data(){return{stat:{}}},beforeMount(){this.load()},methods:{load(){var i=this;const e=location.host.split(":")[0],t=location.protocol+"//"+e+"/";i.API=t+"api/statistic",si(i.API).then(n=>n.json()).then(function(n){i.stat=n})}},components:{dashboardCardNumbers:C3,dashboardCardList:w3,dashboardCardWeight:x8,dashboardCardInsimination:M8,dashboardCardPregnancy:O8,dashboardCardLastSeen:N8,dashboardCardAnimalesPerGroup:G8,dashboardCardCountStatus:W8,dashboardCardDateAction:$8}};function K8(i,e,t,n,s,o){const r=de("dashboardCardList"),a=de("v-col"),l=de("dashboardCardNumbers"),c=de("dashboardCardCountStatus"),u=de("dashboardCardLastSeen"),d=de("v-row"),h=de("dashboardCardWeight"),f=de("dashboardCardDateAction"),g=de("dashboardCardAnimalesPerGroup"),p=de("dashboardCardPregnancy"),v=de("v-container");return me(),we(v,null,{default:oe(()=>[b(d,null,{default:oe(()=>[b(a,{cols:"3"},{default:oe(()=>[b(r,{caption:"Remarks",image:"i2.jpg",data:s.stat.remarks},null,8,["data"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(l,{caption:"Herde Size",image:"i1.jpg",data:s.stat.animalcountGender},null,8,["data"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(c,{caption:"Herde Status",image:"i8.jpg",data:s.stat.animalcountStatus},null,8,["data"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(u,{caption:"Not Seen",image:"i6.jpg",inputData:s.stat.lastSeen},null,8,["inputData"])]),_:1})]),_:1}),b(d,null,{default:oe(()=>[b(a,{cols:"3"},{default:oe(()=>[b(h,{caption:"Weight Gain",image:"i3.jpg",inputData:s.stat.p_groupDateGain},null,8,["inputData"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(f,{caption:"Insimination",image:"i7.jpg",inputData:s.stat.dateAction},null,8,["inputData"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(g,{caption:"Animales per Group",image:"i5.jpg",inputData:s.stat.animalcountGroup},null,8,["inputData"])]),_:1}),b(a,{cols:"3"},{default:oe(()=>[b(p,{caption:"Echografie",image:"i4.jpg",inputData:s.stat.pregnancy},null,8,["inputData"])]),_:1})]),_:1})]),_:1})}const H0=nt(z8,[["render",K8]]),Y8=[{path:"/",name:"default",component:H0},{path:"/herde",name:"herde",component:YH},{path:"/coral",name:"coral",beforeEnter:(i,e)=>(t4(),!0),component:Mj},{path:"/sales",name:"sales",component:b$},{path:"/animal/:id?",name:"animal",component:X2},{path:"/help",name:"help",component:sj},{path:"/crud/:id",name:"crud",component:Gj},{path:"/report",name:"report",component:dj},{path:"/account",name:"account",component:l$},{path:"/pivot",name:"pivot",component:g3},{path:"/dashboard",name:"dashboard",component:H0},{path:"/login",name:"login",component:p$}],Rs=o1({history:wN(),routes:Y8}),B0=[{id:"LANGID",text:"PY"},{id:"coral",text:"CORAL"},{id:"HERDE",text:"REBAÑOS"},{id:"NEW",text:"NUEVO"},{id:"SEARCH",text:"BUSCAR"},{id:"PRINT",text:"IMPRIMIR"},{id:"TAG",text:"ETIQUETA"},{id:"BREED",text:"RAZA"},{id:"GENDER",text:"SEXO"},{id:"AGE",text:"EDAD"},{id:"LAST WEIGHT",text:"ÚLTIMO PESO"},{id:"COLOR",text:"COLOR"},{id:"HAIR",text:"PELO"},{id:"CALVES",text:"TERNEROS"},{id:"DAM",text:"VACA"},{id:"SIRE",text:"SEMENTAL"},{id:"SELLER",text:"VENDEDOR"},{id:"BUYER",text:"COMPRADOR"},{id:"PURCHASE",text:"COMPRA"},{id:"SALES",text:"VENTAS"},{id:"LOCATION",text:"UBICACIÓN"},{id:"LAST SEEN",text:"ÚLTIMA VEZ VISTO"},{id:"WARNING",text:"ADVERTENCIA"},{id:"GROUPS",text:"GRUPOS"},{id:"REMARK",text:"OBSERVACIÓN"},{id:"CANCEL",text:"CANCELAR"},{id:"SAVE",text:"GUARDAR"},{id:"ACTION",text:"ACCIÓN"},{id:"VALUE",text:"VALOR"},{id:"DATE",text:"FECHA"},{id:"HISTORY",text:"HISTORIAL"},{id:"ADD ACTION",text:"AGREGAR ACCIÓN"},{id:"MODIFY",text:"MODIFICAR"},{id:"OFFER",text:"OFERTA"},{id:"LABEL",text:"ETIQUETA"},{id:"MONTH",text:"MES"},{id:"ADDRESS",text:"DIRECCIÓN"},{id:"SEND",text:"ENVIAR"},{id:"GROUP",text:"GRUPO"},{id:"WEIGHT",text:"PESO"},{id:"Data",text:"Datos"},{id:"USER",text:"USUARIO"},{id:"ADD GROUP",text:"AGREGAR GRUPO"},{id:"DELETE GROUP",text:"BORRAR GRUPO"},{id:"DELETE",text:"BORRAR"},{id:"SELECTED",text:"SELECCIONADO"},{id:"ANIMAL",text:"ANIMAL"},{id:"TAXID",text:"RUC"},{id:"ANIMALS",text:"ANIMALES"},{id:"SUM",text:"SUMA"},{id:"ORIGIN",text:"ORIGEN"},{id:"PROCUREMENT",text:"ADQUISICIÓN"},{id:"AGE (MONTH)",text:"EDAD"},{id:"DATE OF BIRTH",text:"FECHA DE NACIMIENTO"},{id:"VISIT OUR HOMEPAGE FOR OUR MONTHLY OFFERS.",text:"VISITE NUESTRA PÁGINA WEB PARA LAS OFERTAS MENSUALES"},{id:"TEMPLATETEASER",text:"Suscribase a nuestra lista de correo para recibir cotizaciones mensuales."},{id:"OFFERSUMMARY",text:"Ofrecemos <animalCount> animales con un precio de <price> GS pro KG. Actualmente todos los animales pesan <sumWeight> Kg. Estimamos un precio total de <total> GS."},{id:"PAYMENT TERMS",text:"El precio dependerá del peso de los animales durante la entrega. Aceptamos, si no se acuerda lo contrario, dinero en efectivo."},{id:"TODO",text:"TODO"},{id:"PAYMENT",text:"PAGO"},{id:"COUNT",text:""},{id:"ACTIONS",text:"ACCIONES"},{id:"STATUS",text:"ESTADO"},{id:"LOCATIONS",text:"UBICACIONES"},{id:"ACCOUNTS",text:"CUENTAS"},{id:"ACCOUNT",text:"CUENTA"},{id:"PAYMENTS",text:"PAGOS"},{id:"EXPENSE TYPE",text:"TIPO DE GASTO"},{id:"DASHBOARD",text:"TABLERO"},{id:"CONFIG",text:"CONFIGURACIÓN"},{id:"HELP",text:"AYUDA"},{id:"REMARKS",text:"OBSERVACIONES"},{id:"DAYS",text:"DÍAS"},{id:"EVERAGE WEIGT",text:"PESO MEDIO"},{id:"INSIMINATION",text:"INSIMINACIÓN"},{id:"RECEIPT",text:"RECIBO"},{id:"RECEIPIENT",text:"RECIBIDOR"},{id:"EXPENSE LOCATION",text:"UBICACIÓN"},{id:"AMOUNT",text:"CANTIDAD"},{id:"KG",text:""},{id:"ECO RESULT",text:"RESULTADO ECO"},{id:"ECO DAYS+",text:"DÍAS ECO"},{id:"PCS",text:""},{id:"EDIT",text:"EDITAR"},{id:"SHORTCUTS",text:"ACCESOS DIRECTOS"},{id:"READ TAG",text:"LEER ETIQUETA"},{id:"SWITCH SCREEN TO CORAL VIEW",text:"CAMBIAR PAGINA A VISTA DE CORAL"},{id:"SWITCH SCREEN TO SALES VIEW",text:"CAMBIAR PAGINA A VISTA DE VENTAS"},{id:"SWITCH SCREEN TO DASHBOARD VIEW",text:"CAMBIAR PAGINA A LA VISTA DEL TABLERO"},{id:"NEW TAG",text:"NUEVA ETIQUETA"},{id:"ENTER EXISTING TAG",text:"INGRESE LA ETIQUETA EXISTENTE"},{id:"OLD TAG",text:"ETIQUETA ANTIGUA"},{id:"OK",text:"Si"},{id:"SHUTDOWN",text:"APAGAR"},{id:"DO YOU REALY WANT TO SHUTDOWN THIS COMPUTER?",text:"¿DE VERDAD QUIERES APAGAR ESTA COMPUTADORA?"},{id:"KG/WEEK",text:"KG/SEMANA"},{id:"DO YOU REALY WANT TO DELETE THIS ITEM? IT CANNOT BE UNDONE.",text:"¿DE VERDAD QUIERES ELIMINAR ESTE ELEMENTO? NO SE PUEDE DESHACER."},{id:"MODIFY ANIMALS",text:"MOD ANIMAL"},{id:"SET GROUP",text:"SET"},{id:"DELETE GROUPS",text:"DEL"},{id:"SET STATUS",text:"STATUS"},{id:"SEEN",text:"VISTO"},{id:"DELETE ANIMAL",text:"DEL ANIMAL"},{id:"GAINPERWEEK",text:"AUMENTO"}],q8=[{id:"LANGID",text:"DE"},{id:"coral",text:"coral"},{id:"HERDE",text:"Herde"},{id:"NEW",text:"Neu"},{id:"SEARCH",text:"Suchen"},{id:"PRINT",text:"Drucken"},{id:"TAG",text:"Marke"},{id:"BREED",text:"Rasse"},{id:"GENDER",text:"Geschlecht"},{id:"AGE",text:"Alter"},{id:"LAST WEIGHT",text:"Letztes Gewicht"},{id:"COLOR",text:"Farbe"},{id:"HAIR",text:"Haare"},{id:"CALVES",text:"Nachkommen"},{id:"DAM",text:"Mutter"},{id:"SIRE",text:"Vater"},{id:"SELLER",text:"Verkäufer"},{id:"BUYER",text:"Käufer"},{id:"PURCHASE",text:"Kaufdatum"},{id:"SALES",text:"Verkaufdatum"},{id:"LOCATION",text:"Standort"},{id:"LAST SEEN",text:"Letzte Sichtung"},{id:"WARNING",text:"Warnung"},{id:"GROUPS",text:"Gruppen"},{id:"REMARK",text:"Bemerkung"},{id:"CANCEL",text:"Abbruch"},{id:"SAVE",text:"Sichern"},{id:"ACTION",text:"Aktion"},{id:"VALUE",text:"Wert"},{id:"DATE",text:"Datum"},{id:"HISTORY",text:"Historie"},{id:"ADD ACTION",text:"Aktion Hinzufügen"},{id:"MODIFY",text:"Ändern"},{id:"OFFER",text:"Angebot"},{id:"LABEL",text:"Label"},{id:"MONTH",text:"Monat"},{id:"ADDRESS",text:"Addresse"},{id:"SEND",text:"Senden"},{id:"GROUP",text:"Gruppen"},{id:"WEIGHT",text:"Gewicht"},{id:"Data",text:"Stammdaten"},{id:"USER",text:"Nutzer"},{id:"ADD GROUP",text:"Gruppe Hinzufügen"},{id:"DELETE GROUP",text:"Gruppe Löschen"},{id:"DELETE",text:"Löschen"},{id:"SELECTED",text:"Ausgewählt"},{id:"ANIMAL",text:"Tier"},{id:"TAXID",text:"Steuernummer"},{id:"ANIMALS",text:"Tiere"},{id:"SUM",text:"Summe"},{id:"ORIGIN",text:"Herkunft"},{id:"PROCUREMENT",text:"Einkauf"},{id:"AGE (MONTH)",text:"Alter (Monate)"},{id:"DATE OF BIRTH",text:"Geboren am"},{id:"TEMPLATETEASER",text:"Besuchen Sie unsere Homepage um monatliche Angebote zu erhalten."},{id:"OFFERSUMMARY",text:"Wir bieten Ihnen <animalCount> Tiere zum Preis von <price> GS pro KG an. Aktuell wiegen die Tiere <sumWeight> Kg. Es ergibt sich also ein Gesamtpreis von <total> GS."},{id:"PAYMENT TERMS",text:"Der Preis richtet sich nach dem Gewicht, welches bei der Abholung ermittelt wird. Wir akzeptieren, falls nicht anders vereinbart, Barzahlung."}],X8=[{id:"LANGID",text:"BR"},{id:"coral",text:"CURRAL"},{id:"HERDE",text:"REBANHO"},{id:"NEW",text:"NOVO"},{id:"SEARCH",text:"PROCURAR"},{id:"PRINT",text:"IMPRIMIR"},{id:"TAG",text:"ETIQUETA"},{id:"BREED",text:"RAÇA"},{id:"GENDER",text:"GÊNERO"},{id:"AGE",text:"IDADE"},{id:"LAST WEIGHT",text:"ÚLTIMO PESO"},{id:"COLOR",text:"COR"},{id:"HAIR",text:"CABELO"},{id:"CALVES",text:"BEZERROS"},{id:"DAM",text:"MÃE"},{id:"SIRE",text:"PAI"},{id:"SELLER",text:"VENDEDOR"},{id:"BUYER",text:"COMPRADOR"},{id:"PURCHASE",text:"COMPRAR"},{id:"SALES",text:"VENDAS"},{id:"LOCATION",text:"LOCALIZAÇÃO"},{id:"LAST SEEN",text:"VISTO PELA ÚLTIMA VEZ"},{id:"WARNING",text:"AVISO"},{id:"GROUPS",text:"GRUPOS"},{id:"REMARK",text:"OBSERVAÇÃO"},{id:"CANCEL",text:"CANCELAR"},{id:"SAVE",text:"GUARDAR"},{id:"ACTION",text:"AÇÃO"},{id:"VALUE",text:"VALOR"},{id:"DATE",text:"DATA"},{id:"HISTORY",text:"HISTÓRIA"},{id:"ADD ACTION",text:"ADICIONAR AÇÃO"},{id:"MODIFY",text:"MODIFICAR"},{id:"OFFER",text:"OFERECER"},{id:"LABEL",text:"RÓTULO"},{id:"MONTH",text:"MÊS"},{id:"ADDRESS",text:"MORADA"},{id:"SEND",text:"ENVIAR"},{id:"GROUP",text:"GRUPO"},{id:"WEIGHT",text:"PESO"},{id:"Data",text:"DADOS"},{id:"USER",text:"USER"},{id:"ADD GROUP",text:"ADICIONAR GRUPO"},{id:"DELETE GROUP",text:"DELETAR GRUPO"},{id:"DELETE",text:"DELETAR"},{id:"SELECTED",text:"SELECIONADO"},{id:"ANIMAL",text:"ANIMAL"},{id:"TAXID",text:"TAXI"},{id:"ANIMALS",text:"ANIMAIS"},{id:"SUM",text:"SOMA"},{id:"ORIGIN",text:"ORIGEN"},{id:"PROCUREMENT",text:"AQUISIÇÃO"},{id:"AGE (MONTH)",text:"IDADE (MÊS)"},{id:"DATE OF BIRTH",text:"DATA DE NASCIMENTO"},{id:"VISIT OUR HOMEPAGE FOR OUR MONTHLY OFFERS.",text:"VISITE NOSSA PÁGINA PARA NOSSAS OFERTAS MENSAIS"},{id:"TEMPLATETEASER",text:"Inscreva-se em nossa lista de e-mails para receber cotações mensais."},{id:"OFFERSUMMARY",text:"Oferecemos <AnimalCount> animais por um preço de <price> GS por KG. Atualmente todos os animais pesam <sumWeight> Kg. Estimamos um total de <total> GS."},{id:"PAYMENT TERMS",text:"O preço dependerá do peso dos animais durante a entrega. Aceitamos pagamento em dinhero, salvo acordos feitos anteriormente."}],Q8=[{id:"LANGID",text:"CN"},{id:"coral",text:"畜欄"},{id:"HERDE",text:"牧群"},{id:"NEW",text:"新增"},{id:"SEARCH",text:"搜索"},{id:"PRINT",text:"打印"},{id:"TAG",text:"標籤"},{id:"BREED",text:"品種"},{id:"GENDER",text:"性別"},{id:"AGE",text:"年齡"},{id:"LAST WEIGHT",text:"上次體重"},{id:"COLOR",text:"顏色"},{id:"HAIR",text:"毛髮"},{id:"CALVES",text:"幼崽"},{id:"DAM",text:"母畜"},{id:"SIRE",text:"繁殖"},{id:"SELLER",text:"賣家"},{id:"BUYER",text:"買家"},{id:"PURCHASE",text:"購買"},{id:"SALES",text:"銷售量"},{id:"LOCATION",text:"地點"},{id:"LAST SEEN",text:"上次見面"},{id:"WARNING",text:"注意"},{id:"GROUPS",text:"群體"},{id:"REMARK",text:"備註"},{id:"CANCEL",text:"取消"},{id:"SAVE",text:"儲存"},{id:"ACTION",text:"行動"},{id:"VALUE",text:"數值"},{id:"DATE",text:"日期"},{id:"HISTORY",text:"歷史"},{id:"ADD ACTION",text:"新增行動"},{id:"MODIFY",text:"修改"},{id:"OFFER",text:"開價"},{id:"LABEL",text:"標籤"},{id:"MONTH",text:"月"},{id:"ADDRESS",text:"地址"},{id:"SEND",text:"發送"},{id:"GROUP",text:"群組"},{id:"WEIGHT",text:"重量"},{id:"Data",text:"數據"},{id:"USER",text:"用戶"},{id:"ADD GROUP",text:"新增群組"},{id:"DELETE GROUP",text:"刪除群組"},{id:"DELETE",text:"刪除"},{id:"SELECTED",text:"已選擇"},{id:"ANIMAL",text:"動物"},{id:"TAXID",text:"稅號"},{id:"ANIMALS",text:"動物"},{id:"SUM",text:"總和"},{id:"ORIGIN",text:"來源"},{id:"PROCUREMENT",text:"採購"},{id:"AGE (MONTH)",text:"年齡 (月數)"},{id:"DATE OF BIRTH",text:"出生日期"},{id:"VISIT OUR HOMEPAGE FOR OUR MONTHLY OFFERS.",text:"瀏覽我們的主頁,了解我們每月優惠"},{id:"TEMPLATETEASER",text:"加入我們的郵件列表,以獲取每月報價。"},{id:"OFFERSUMMARY",text:"我們提供<animalCount>只動物,價格為每公斤<price> GS 。 目前所有動物體重為<sumWeight>KG。 我們估計總價格為<total>GS。"},{id:"PAYMENT TERMS",text:"價格將按照交接時動物的重量。 如沒有其他約定,我們接受現金。"}],Z8=[{id:"LANGID",text:"EN"},{id:"coral",text:"coral"},{id:"HERDE",text:"Herde"},{id:"NEW",text:"New"},{id:"SEARCH",text:"Search"},{id:"PRINT",text:"Print"},{id:"TAG",text:"Tag"},{id:"BREED",text:"Breed"},{id:"GENDER",text:"Gender"},{id:"AGE",text:"Age"},{id:"LAST WEIGHT",text:"Last Weight"},{id:"COLOR",text:"Color"},{id:"HAIR",text:"Hair"},{id:"CALVES",text:"Calves"},{id:"DAM",text:"Dam"},{id:"SIRE",text:"Sire"},{id:"SELLER",text:"Seller"},{id:"BUYER",text:"Buyer"},{id:"PURCHASE",text:"Purchse"},{id:"SALES",text:"Sales"},{id:"LOCATION",text:"Location"},{id:"LAST SEEN",text:"Last Seen"},{id:"WARNING",text:"Warning"},{id:"GROUPS",text:"Groups"},{id:"REMARK",text:"Remark"},{id:"CANCEL",text:"Cancel"},{id:"SAVE",text:"Save"},{id:"ACTION",text:"Action"},{id:"VALUE",text:"Value"},{id:"DATE",text:"Date"},{id:"HISTORY",text:"History"},{id:"ADD ACTION",text:"Add Action"},{id:"MODIFY",text:"Modify"},{id:"OFFER",text:"Offer"},{id:"LABEL",text:"Label"},{id:"MONTH",text:"Month"},{id:"ADDRESS",text:"Address"},{id:"SEND",text:"Send"},{id:"GROUP",text:"Group"},{id:"WEIGHT",text:"Weight"},{id:"Data",text:"Data"},{id:"USER",text:"User"},{id:"ADD GROUP",text:"Add Group"},{id:"DELETE GROUP",text:"Delete Group"},{id:"DELETE",text:"Delete"},{id:"SELECTED",text:"Selected"},{id:"TEMPLATETEASER",text:"Enrole into our mailing list to receive montly quotes."},{id:"OFFERSUMMARY",text:"We offer <animalCount> animals with a price of <price> GS pro KG. Currently all animals weigh <sumWeight> Kg. We estimate a total price of <total> GS."},{id:"PAYMENT TERMS",text:"The price will depend on the weight of the animals during handover. We accept, if not otherwise agreed, cash."}],J8=[{id:"LANGID",text:"TW"},{id:"coral",text:"畜栏"},{id:"HERDE",text:"牧群"},{id:"NEW",text:"新增"},{id:"SEARCH",text:"搜索"},{id:"PRINT",text:"打印"},{id:"TAG",text:"标签"},{id:"BREED",text:"品种"},{id:"GENDER",text:"性别"},{id:"AGE",text:"年龄"},{id:"LAST WEIGHT",text:"上次体重"},{id:"COLOR",text:"颜色"},{id:"HAIR",text:"毛发"},{id:"CALVES",text:"幼崽"},{id:"DAM",text:"母畜"},{id:"SIRE",text:"繁殖"},{id:"SELLER",text:"卖家"},{id:"BUYER",text:"买家"},{id:"PURCHASE",text:"购买"},{id:"SALES",text:"销售量"},{id:"LOCATION",text:"地点"},{id:"LAST SEEN",text:"上次见面"},{id:"WARNING",text:"注意"},{id:"GROUPS",text:"群体"},{id:"REMARK",text:"备注"},{id:"CANCEL",text:"取消"},{id:"SAVE",text:"储存"},{id:"ACTION",text:"行动"},{id:"VALUE",text:"数值"},{id:"DATE",text:"日期"},{id:"HISTORY",text:"历史"},{id:"ADD ACTION",text:"新增行动"},{id:"MODIFY",text:"修改"},{id:"OFFER",text:"开价"},{id:"LABEL",text:"标签"},{id:"MONTH",text:"月"},{id:"ADDRESS",text:"地址"},{id:"SEND",text:"发送"},{id:"GROUP",text:"群组"},{id:"WEIGHT",text:"重量"},{id:"Data",text:"数据"},{id:"USER",text:"用户"},{id:"ADD GROUP",text:"新增群组"},{id:"DELETE GROUP",text:"删除群组"},{id:"DELETE",text:"删除"},{id:"SELECTED",text:"已选择"},{id:"ANIMAL",text:"动物"},{id:"TAXID",text:"税号"},{id:"ANIMALS",text:"动物"},{id:"SUM",text:"总和"},{id:"ORIGIN",text:"来源"},{id:"PROCUREMENT",text:"采购"},{id:"AGE (MONTH)",text:"年龄 (月数)"},{id:"DATE OF BIRTH",text:"出生日期"},{id:"VISIT OUR HOMEPAGE FOR OUR MONTHLY OFFERS.",text:"浏览我们的主页,了解我们每月优惠"},{id:"TEMPLATETEASER",text:"加入我们的邮件列表,以获取每月报价"},{id:"OFFERSUMMARY",text:"我们提供<animalCount>只动物,价格为每公斤 <price> GS. 目前所有动物体重为<sumWeight>KG. 我们估计总价格为<total>GS。"},{id:"PAYMENT TERMS",text:"价格将按照交接时动物的重量。 如没有其他约定,我们接受现金."}];var rp=null,ap="";const e4=location.host.split(":")[0];var bi=location.protocol+"//"+e4+"/";console.log("***********************");console.log(bi);console.log("***********************");function t4(){Ye.state.coralMonitor=!0}async function i4(){await br(bi+"api/xls",Ye.state.selectedData),Kt.publish("system/export","1")}async function n4(i){Kt.publish("language",i)}async function s4(){console.log("SHUTDOWN"),Kt.publish("system/shutdown","1")}async function o4(){console.log("UPDATE"),Kt.publish("system/update","1")}async function r4(){console.log("BACKUP"),Kt.publish("system/backup","1")}async function fC(i){Kt.publish("display",i)}var Ye={},Kt={};async function si(i=""){const e=await fetch(i,{method:"GET",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.token},redirect:"follow",referrerPolicy:"no-referrer"});return e.status==401&&Rs.push("/login"),e}async function br(i="",e={}){console.log("POST"),console.log(JSON.stringify(e));const t=await fetch(i,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.token},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)});return Kt.publish("system","db update"),t}async function EI(i="",e={}){const t=await fetch(i,{method:"DELETE",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.token},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)});return Kt.publish("system","db update"),t}function a4(i){let e="LANGUAGE=",n=decodeURIComponent(document.cookie).split(";");for(let s=0;s<n.length;s++){let o=n[s];for(;o.charAt(0)==" ";)o=o.substring(1);if(o.indexOf(e)==0)return o.substring(e.length,o.length)}return""}function Oe(i){var e="["+i+"]";if(!rp){var t=a4(),n=B0;t=="PY"&&(n=B0),t=="DE"&&(n=q8),t=="BR"&&(n=X8),t=="CN"&&(n=Q8),t=="EN"&&(n=Z8),t=="TW"&&(n=J8),rp=n}if(rp){var s=rp.find(o=>o.id===i.toUpperCase());s?e=s.text:(ap.indexOf(i.toUpperCase(),0)<0&&(ap=ap+'{"id": "'+i.toUpperCase()+`", "text":""},
`),console.log(ap))}return e}function fi(i){var e=1;switch(Ye.state.config.lang){case"PY":e=1;break;case"EN":e=2;break;case"DE":e=3;break;case"BR":e=4;break;case"TW":e=5;break;case"CN":e=6;break}var t=[];for(let s=0;s<i.length;s++){var n={title:Object.values(i[s])[e],value:i[s].id};i[s].color&&(n.color=i[s].color),i[s].icon&&(n.icon=i[s].icon),t.push(n)}return t}function l4(i){var e=[];for(let n=0;n<i.length;n++){var t={title:i[n].label,value:i[n].id};e.push(t)}return e}function qn(i,e){var t=[];i=="breed"&&(t=Ye.state.breed),i=="gender"&&(t=Ye.state.gender),i=="hair"&&(t=Ye.state.hair),i=="color"&&(t=Ye.state.color),i=="action"&&(t=Ye.state.action),i=="status"&&(t=Ye.state.status);var n=1;switch(Ye.state.config.lang){case"PY":n=1;break;case"EN":n=2;break;case"DE":n=3;break;case"BR":n=4;break;case"TW":n=5;break;case"CN":n=6;break}var s="";return e&&(s=Object.values(t[e-1])[n]),s}function Os(){return bi}function av(i){var e=[];return i.length&&(e=i.map(function(t){return{title:t.companyName,value:t.id}})),e}function c4(){Ye.state.showOffer=!1,Ye.state.showModify=!1}async function W0(i,e){Ye.state.animal.label=i;var t={new:i,old:e};await br(bi+"api/tag",t),Ed(t.newLabel)}async function u4(){Ye=Aa(),Ye.state.autoWeight=!0,Ye.state.autoTag=!0;try{var i="wss://"+window.location.host.split(":")[0]+":1884/ws";window.location.protocol!="https:"&&(i="ws://"+window.location.host.split(":")[0]+":1884/ws"),Kt=yP.connect(i,{clean:!0})}catch{}Kt.on("connect",()=>{Kt.subscribe("tag",function(){}),Kt.subscribe("scale",function(){}),Kt.subscribe("system",function(){}),Kt.subscribe("system/usb",function(){}),Kt.subscribe("system/updateAvailable",function(){}),Kt.subscribe("system/scriptOutput",function(){}),Kt.subscribe("system/internet",function(){}),Kt.subscribe("system/coral",function(){}),Kt.subscribe("system/battery",function(){}),Kt.subscribe("system/charging",function(){}),Kt.subscribe("language",function(){}),Kt.subscribe("display",function(){})}),Kt.on("error",e=>{}),Kt.on("message",async(e,t)=>{var n=t.toString().trim();if(e=="scale"){var n=t.toString().trim();Ye.state.scale=n}e=="system"&&t=="db update"&&(Ye.state.animal.id="",Ye.state.refreshData=!0,lv(Ye.state.animal.label)),e=="system/usb"&&(Ye.state.USB=t.toString().trim()),e=="system/internet"&&(Ye.state.internet=t.toString().trim()),e=="system/coral"&&(Ye.state.coral=t.toString().trim()),e=="system/battery"&&(Ye.state.battery=t.toString().trim()),e=="system/charging"&&(Ye.state.charging=t.toString().trim()),e=="system/scriptOutput"&&(Ye.state.scriptOutput=t.toString().trim()),e=="system/updateAvailable"&&(Ye.state.updateAvailable=t.toString().trim()),e=="display"&&(console.log(t.toString()),Ye.state.coralMonitor&&Rs.push(t.toString())),e=="language"&&loadLang(t.toString())})}async function Ed(i){let e="";var t={};const n=bi+"api/animal/tag/"+i;try{t=await si(n);var s={};if(t.status!="404")return s=await t.json(),s[0].id!=Ye.state.animal.id&&(Ye.commit("setAnimal",s[0]),await T4(s[0].id)),e=s[0].id,e}catch{}return""}function d4(){var i=!0;return Rs.currentRoute.value.name=="coral"&&(i=!1),Rs.currentRoute.value.name=="login"&&(i=!1),Rs.currentRoute.value.name=="sales"&&(i=!1),i}async function h4(){const i=bi+"api/config",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setConfig",t),!0}async function f4(){const i=bi+"api/breed",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setBreed",t),!0}async function p4(){const i=bi+"api/status",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setStatus",t),!0}async function g4(){const i=bi+"api/group",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setGroup",t),!0}async function m4(){const i=bi+"api/gender",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setGender",t),!0}async function v4(){const i=bi+"api/location",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setLocation",t),!0}async function C4(){const i=bi+"api/color",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setColor",t),!0}async function y4(){const i=bi+"api/hair",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setHair",t),!0}async function b4(){const i=bi+"api/account",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setAccount",t),!0}async function w4(){const i=bi+"api/payment",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setPayment",t),!0}async function S4(){const i=bi+"api/expenseType",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setExpenseType",t),!0}async function E4(){const i=bi+"api/address",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setAddress",t),!0}async function _4(){c4(),Ye.state.showOffer=1}async function lv(i){i&&Kt.publish("tag",i)}async function R4(){const i=bi+"api/action",e=await si(i);var t={};return e.status!="201"&&(t=await e.json()),Ye.commit("setAction",t),!0}async function T4(i){const e=bi+"api/actionList/"+i,t=await si(e);var n={};t.status!="201"&&(n=await t.json());for(var s=0;s<n.length;s++)n[s].actionLabel=qn("action",n[s].actionId),n[s].color=Ye.state.action.find(o=>o.id===n[s].actionId).color,n[s].icon=Ye.state.action.find(o=>o.id===n[s].actionId).icon;return Ye.commit("setActionList",n.reverse()),!0}async function x4(i){const e=Object.assign({},i);return await br(bi+"api/actionList",e)}function _I(i){for(var e="",t=0;t<Ye.state.group.length;t++)Ye.state.group[t].id.toString()===i&&(e=Ye.state.group[t]);return e}function cv(i){var e=[];return i&&i.split(",").forEach(n=>{const s=_I(n);var o={value:n*1,title:s.label,icon:s.icon,color:s.color};e.push(o)}),e}async function Hy(i){const e=Object.assign({},i);return await br(bi+"api/animal",e)}async function A4(i){i.$store.state.report="offer",i.$router.push("/report")}const D4={computed:{selected:{get(){return this.$store.state.config.language},set(i){n4(i)}}},setup(){var i=["DE","PY","BR","EN","TW","CN"];return{available:i}}};function O4(i,e,t,n,s,o){const r=de("v-select");return me(),we(r,{modelValue:o.selected,"onUpdate:modelValue":e[0]||(e[0]=a=>o.selected=a),items:n.available},null,8,["modelValue","items"])}const P4=nt(D4,[["render",O4]]);const I4={setup(){return{t:Oe}},computed:{done:function(){var i=this.$store.state.scriptOutput+" ";return!i.includes("DONE")}},data(){return{okButton:void 0,cancelButton:"Go Back",intervalID:0,resolvePromise:void 0,rejectPromise:void 0,showMe:!1}},methods:{show(i={}){return this.intervalId=setInterval(this.load,2e3),this.title=i.title,this.message=i.message,this.okButton=i.okButton,i.cancelButton&&(this.cancelButton=i.cancelButton),this.showMe=!0,new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})},confirm(){this.showMe=!1,clearInterval(this.intervalId),this.resolvePromise(!0)},load(){var i=this;const e=location.host.split(":")[0],t=location.protocol+"//"+e+"/";i.API=t+"api/system/shellStatus",si(i.API).then(n=>n.text()).then(function(n){i.message=n,console.log(n)})},cancel(){this.showMe=!1,clearInterval(this.intervalId),this.resolvePromise(!1)}}};function M4(i,e,t,n,s,o){const r=de("v-card-title"),a=de("v-card-text"),l=de("v-spacer"),c=de("v-btn"),u=de("v-card-actions"),d=de("v-card"),h=de("v-dialog"),f=de("v-row");return me(),we(f,{justify:"center"},{default:oe(()=>[b(h,{modelValue:s.showMe,"onUpdate:modelValue":e[1]||(e[1]=g=>s.showMe=g),persistent:"",width:"auto"},{default:oe(()=>[b(d,null,{default:oe(()=>[b(r,{class:"text-h5"},{default:oe(()=>[De(" Status Script")]),_:1}),b(a,null,{default:oe(()=>[De(Me(i.$store.state.scriptOutput),1)]),_:1}),b(u,null,{default:oe(()=>[b(l),(me(),we(c,{disabled:o.done,key:i.$store.state.key,onClick:e[0]||(e[0]=g=>o.confirm()),color:"success"},{default:oe(()=>[De(Me(n.t("OK")),1)]),_:1},8,["disabled"]))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const L4=nt(I4,[["render",M4]]),F4=Aa(),N4={components:{confirmDialog:qw},setup(){return{store:F4,t:Oe,formatSelect:fi}},computed:{status(){return fi(this.$store.state.status)}},data:()=>({selectedStatus:0,actions:[{value:3,title:Oe("Set Status")},{value:4,title:Oe("Delete Animal")}],selectedAction:null,title:void 0,message:void 0,okButton:void 0,cancelButton:"Go Back",resolvePromise:void 0,rejectPromise:void 0,showMe:!1}),methods:{show(i={}){return this.title=i.title,this.message=i.message,this.okButton=i.okButton,i.cancelButton&&(this.cancelButton=i.cancelButton),this.showMe=!0,new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})},async confirm(){var i={};this.selectedAction==4&&(i={title:"Delete",message:Oe("Do you realy want to delete ")+this.$store.state.selectedData.length+Oe(" animals ?")}),this.selectedAction==3&&(i={title:"Update",message:Oe("Do you realy want to set the status of ")+this.$store.state.selectedData.length+Oe(" animals ?")}),await this.$refs.confirmDialog.show(i)&&this.$store.state.selectedData.forEach(t=>{if(this.selectedAction==3){const n={id:t.id,statusId:this.selectedStatus};console.log(n),br(Os()+"api/animal",n)}if(this.selectedAction==4){const n=Os()+"api/animal/"+t.id;EI(n)}}),this.showMe=!1,this.resolvePromise(!0)},cancel(){this.showMe=!1,this.resolvePromise(!1)}}};function k4(i,e,t,n,s,o){const r=de("confirmDialog"),a=de("v-card-title"),l=de("v-autocomplete"),c=de("v-icon"),u=de("v-chip"),d=de("v-select"),h=de("v-card-text"),f=de("v-spacer"),g=de("v-btn"),p=de("v-card-actions"),v=de("v-card"),y=de("v-dialog"),C=de("v-row");return me(),kt(He,null,[b(r,{ref:"confirmDialog"},null,512),b(C,{justify:"center"},{default:oe(()=>[b(y,{modelValue:i.showMe,"onUpdate:modelValue":e[5]||(e[5]=m=>i.showMe=m),persistent:"",width:"auto"},{default:oe(()=>[b(v,null,{default:oe(()=>[b(a,{class:"text-h5"},{default:oe(()=>[De(Me(n.t("Modify Animals"))+" ("+Me(i.$store.state.selectedData.length)+") ",1)]),_:1}),b(h,null,{default:oe(()=>[(me(),we(l,{items:i.actions,modelValue:i.selectedAction,"onUpdate:modelValue":e[0]||(e[0]=m=>i.selectedAction=m),label:n.t("Action"),key:i.$store.state.key},null,8,["items","modelValue","label"])),i.selectedAction==1||i.selectedAction==2?(me(),we(l,{items:i.group,modelValue:i.selectedGroups,"onUpdate:modelValue":e[1]||(e[1]=m=>i.selectedGroups=m),label:n.t("Groups"),key:i.$store.state.key},{selection:oe(m=>[b(u,{class:"coralChip",color:m.item.raw.color},{default:oe(()=>[b(c,{icon:m.item.raw.icon},null,8,["icon"]),De(Me(m.item.raw.title),1)]),_:2},1032,["color"])]),_:1},8,["items","modelValue","label"])):Yt("",!0),i.selectedAction==3?(me(),we(d,{modelValue:i.selectedStatus,"onUpdate:modelValue":e[2]||(e[2]=m=>i.selectedStatus=m),items:o.status,label:n.t("Status"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"])):Yt("",!0)]),_:1}),b(p,null,{default:oe(()=>[b(f),(me(),we(g,{key:i.$store.state.key,onClick:e[3]||(e[3]=m=>o.cancel()),color:"grey"},{default:oe(()=>[De(Me(n.t("Cancel")),1)]),_:1})),(me(),we(g,{key:i.$store.state.key,onClick:e[4]||(e[4]=m=>o.confirm()),color:"success"},{default:oe(()=>[De(Me(n.t("OK")),1)]),_:1}))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const RI=nt(N4,[["render",k4]]),V4={setup(){return{t:Oe}},data:()=>({tag:"",oldTag:"",resolvePromise:void 0,rejectPromise:void 0,showMe:!1}),mounted:function(){},methods:{show(i={}){return this.tag=i.tag,this.showMe=!0,new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})},confirm(){this.showMe=!1,this.oldTag!=""?this.resolvePromise(this.oldTag):this.resolvePromise(!0)},cancel(){this.showMe=!1,this.resolvePromise(!1)}}};function G4(i,e,t,n,s,o){const r=de("v-card-title"),a=de("v-text-field"),l=de("v-card-text"),c=de("v-spacer"),u=de("v-btn"),d=de("v-card-actions"),h=de("v-card"),f=de("v-dialog"),g=de("v-row");return me(),we(g,{justify:"center"},{default:oe(()=>[b(f,{modelValue:i.showMe,"onUpdate:modelValue":e[5]||(e[5]=p=>i.showMe=p),persistent:"",width:"auto"},{default:oe(()=>[b(h,null,{default:oe(()=>[b(r,{class:"text-h5"},{default:oe(()=>[De(Me(n.t("New Tag"))+" "+Me(i.tag),1)]),_:1}),b(l,null,{default:oe(()=>[De(Me(n.t("Enter Existing Tag"))+" ",1),b(a,{autofocus:"","prepend-inner-icon":"mdi-tag","hide-details":"","single-line":"",variant:"outlined",dense:"",label:n.t("Old Tag"),class:"shrink mx-4",modelValue:i.oldTag,"onUpdate:modelValue":e[0]||(e[0]=p=>i.oldTag=p),onKeyup:[e[1]||(e[1]=Md(p=>o.confirm(),["enter"])),e[2]||(e[2]=Md(p=>o.cancel(),["esc"]))]},null,8,["label","modelValue"])]),_:1}),b(d,null,{default:oe(()=>[b(c),(me(),we(u,{key:i.$store.state.key,onClick:e[3]||(e[3]=p=>o.cancel()),color:"grey"},{default:oe(()=>[De(Me(n.t("Cancel")),1)]),_:1})),(me(),we(u,{key:i.$store.state.key,onClick:e[4]||(e[4]=p=>o.confirm()),color:"success"},{default:oe(()=>[De(Me(n.t("OK")),1)]),_:1}))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const H4=nt(V4,[["render",G4]]);var lp={},pC=!1;const B4={name:"searchField",data(){return{term:""}},mounted(){try{var i="wss://"+window.location.host.split(":")[0]+":1884/ws";window.location.protocol!="https:"&&(i="ws://"+window.location.host.split(":")[0]+":1884/ws"),lp=yP.connect(i,{clean:!0})}catch{}lp.on("connect",()=>{lp.subscribe("tag",function(){})}),lp.on("message",async(e,t)=>{console.log("MQTT");var n=t.toString().trim();e=="tag"&&this.$store.state.autoTag&&this.search(n)})},setup(){return{t:Oe}},methods:{async search(i){var e=this.term.toUpperCase();if(i&&(e=i),this.$store.state.coralMonitor)Ed(e);else{var t=this.$store.state.animal.id,n=await Ed(e);if(n==""){const s=await this.$refs.newAnimalAssistant_1.show({tag:e});s!=!1&&(s==!0?await W0(e,""):await W0(e,s),Ed(e),this.term="",Rs.push("/animal"))}else console.log("Load new animal"),n!=t&&!pC&&(pC=!0,await lv(e),pC=!1),this.term="",Rs.push("/animal")}}},components:{newAnimalAssistant_1:H4}},W4=pt("br",null,null,-1);function U4(i,e,t,n,s,o){const r=de("newAnimalAssistant_1"),a=de("v-text-field");return me(),kt(He,null,[b(r,{ref:"newAnimalAssistant_1"},null,512),W4,b(a,{autofocus:"","prepend-inner-icon":"mdi-tag","hide-details":"","single-line":"",variant:"outlined",dense:"",label:n.t("Tag"),class:"shrink mx-4",modelValue:s.term,"onUpdate:modelValue":e[0]||(e[0]=l=>s.term=l),onKeyup:e[1]||(e[1]=Md(l=>o.search(),["enter"]))},null,8,["label","modelValue"])],64)}const j4=nt(B4,[["render",U4]]);var $4={},z4=[];const K4={name:"topBarComponent",data(){return{m:$4,t:Oe,getBaseURL:Os,term:"",menu:z4}},computed:{connectionType(){var i=0;return this.$store.state.coral=="1"&&(i=1),this.$store.state.internet=="1"&&(i=2),i},batteryLevel(){return this.$store.state.battery*1},charging(){return this.$store.state.charging*1},routeTarget(){return this.$router.currentRoute.value.name}},watch:{routeTarget(i,e){this.updateMenu()}},methods:{async computerOff(){await this.$refs.confirmDialog.show({title:Oe("Shutdown"),message:Oe("Do you realy want to shutdown this computer?"),okButton:Oe("OK")})&&s4()},async backup(){r4(),await this.$refs.shellStatusDialog.show({})},async update(){o4(),await this.$refs.shellStatusDialog.show({})},toggleScale(){this.$store.state.autoWeight=!this.$store.state.autoWeight},toggleReader(){this.$store.state.autoTag=!this.$store.state.autoTag},show(i){if(i==1)return!0;if(i==2){var e=!1;return this.$store.state.selectedData!=null&&this.$store.state.selectedData.length>0&&(e=!0),e}if(i==3)return!1;if(i==4){var e=!1;return console.log("4"),console.log(this.$store.state.USB*1),this.$store.state.selectedData!=null&&this.$store.state.selectedData.length>0&&this.$store.state.USB*1===1&&(e=!0),e}},updateStatus(){this.$store.state.autoWeight=this.toggleSwitches.includes(0),this.$store.state.autoTag=this.toggleSwitches.includes(1)},async run(i){i=="3"&&openReport(this),i=="4"&&_4(),i=="5"&&await this.$refs.modifyDialog.show({title:"Shutdown",message:"Do you realy want to shutdown this computer?",okButton:"OK"}),i=="6"&&(i4(this.$store.state.selectedData),await this.$refs.shellStatusDialog.show({}))},updateMenu(){var i=[{text:"Print",icon:"mdi-printer",method:"3",vif:1}],e=[{text:"Modify",icon:"mdi-pencil",method:"5",vif:2},{text:"Offer",icon:"mdi-currency-usd",method:"4",vif:2},{text:"Export",icon:"mdi-content-save",method:"6",vif:4}],t=[{text:"Send",icon:"mdi-mail",method:"",vif:3}];this.menu=[],this.$router.currentRoute.value.name=="animal"&&(this.menu=i),this.$router.currentRoute.value.name=="herde"&&(this.menu=e),this.$router.currentRoute.value.name=="report"&&(this.menu=t)}},mounted(){this.updateMenu()},setup(){return{}},components:{confirmDialog:qw,modifyDialog:RI,searchField:j4,shellStatusDialog:L4}};function Y4(i,e,t,n,s,o){const r=de("confirmDialog"),a=de("modifyDialog"),l=de("shellStatusDialog"),c=de("v-img"),u=de("v-icon"),d=de("v-btn"),h=de("v-toolbar-title"),f=de("searchField"),g=de("v-col"),p=de("v-badge"),v=de("v-toolbar");return me(),we(v,{color:"blue-grey-darken-4",dense:""},{prepend:oe(()=>[b(c,{src:"logo.svg",class:"img pr-16"}),(me(!0),kt(He,null,Wo(s.menu,y=>(me(),kt("div",{key:y.text},[o.show(y.vif)?(me(),we(d,{icon:"",key:i.$store.state.key+"-"+y.text,onClick:C=>o.run(y.method)},{default:oe(()=>[b(u,{left:""},{default:oe(()=>[De(Me(y.icon),1)]),_:2},1024)]),_:2},1032,["onClick"])):Yt("",!0)]))),128))]),append:oe(()=>[b(d,{icon:"",class:"ma-2",onClick:e[2]||(e[2]=y=>o.toggleScale()),color:"primary"},{default:oe(()=>[b(u,{class:en({activeIcon:i.$store.state.autoWeight,inactiveIcon:!i.$store.state.autoWeight})},{default:oe(()=>[De("mdi-scale")]),_:1},8,["class"])]),_:1}),b(d,{icon:"",class:"ma-2",onClick:e[3]||(e[3]=y=>o.toggleReader()),color:"primary"},{default:oe(()=>[b(u,{class:en({activeIcon:i.$store.state.autoTag,inactiveIcon:!i.$store.state.autoTag})},{default:oe(()=>[De("mdi-tag")]),_:1},8,["class"])]),_:1}),b(d,{icon:"",class:"ma-1",color:"primary"},{default:oe(()=>[o.connectionType===0?(me(),we(u,{key:0,class:"inactiveIcon"},{default:oe(()=>[De("mdi-lan-check")]),_:1})):Yt("",!0),o.connectionType===1?(me(),we(u,{key:1,class:"activeIcon"},{default:oe(()=>[De("mdi-lan-check")]),_:1})):Yt("",!0),o.connectionType===2?(me(),we(u,{key:2,class:"activeIcon"},{default:oe(()=>[De("mdi-web")]),_:1})):Yt("",!0)]),_:1}),b(d,{icon:"",stacked:"",class:"ma-1",color:"primary"},{default:oe(()=>[b(p,{content:i.$store.state.battery,color:"error"},{default:oe(()=>[o.charging?(me(),we(u,{key:0,class:"activeIcon"},{default:oe(()=>[De("mdi-battery-charging")]),_:1})):Yt("",!0),o.batteryLevel>=70&&!o.charging?(me(),we(u,{key:1,class:"activeIcon"},{default:oe(()=>[De("mdi-battery")]),_:1})):Yt("",!0),o.batteryLevel<70&&o.batteryLevel>30&&!o.charging?(me(),we(u,{key:2,class:"midIcon"},{default:oe(()=>[De("mdi-battery-40")]),_:1})):Yt("",!0),o.batteryLevel<=30&&!o.charging?(me(),we(u,{key:3,class:"inactiveIcon"},{default:oe(()=>[De("mdi-battery-alert")]),_:1})):Yt("",!0)]),_:1},8,["content"])]),_:1}),b(d,{icon:"",class:"ma-2",onClick:e[4]||(e[4]=y=>o.computerOff())},{default:oe(()=>[b(u,null,{default:oe(()=>[De("mdi-radiobox-marked")]),_:1})]),_:1})]),default:oe(()=>[b(r,{ref:"confirmDialog"},null,512),b(a,{ref:"modifyDialog"},null,512),b(l,{ref:"shellStatusDialog"},null,512),b(h),i.$store.state.updateAvailable*1===1?(me(),we(d,{key:0,icon:"",class:"textIcon",onClick:e[0]||(e[0]=y=>o.update())},{default:oe(()=>[De(" UPDATE ")]),_:1})):Yt("",!0),i.$store.state.USB*1===1?(me(),we(d,{key:1,icon:"",class:"ma-2 textIcon",onClick:e[1]||(e[1]=y=>o.backup())},{default:oe(()=>[De("BACKUP ")]),_:1})):Yt("",!0),b(g,{cols:"12",sm:"2"},{default:oe(()=>[b(f)]),_:1})]),_:1})}const q4=nt(K4,[["render",Y4],["__scopeId","data-v-849a9714"]]);const X4={name:"sideMenuComponent",data(){return{drawer:!0,rail:!0,links:[{text:Oe("Todo"),route:"/crud/todo"},{text:Oe("Address"),route:"/crud/address"},{text:Oe("Group"),route:"/crud/group"},{text:Oe("Actions"),route:"/crud/action"},{text:Oe("Status"),route:"/crud/status"},{text:Oe("Locations"),route:"/crud/location"},{text:Oe("Breed"),route:"/crud/breed"},{text:Oe("Color"),route:"/crud/color"},{text:Oe("Hair"),route:"/crud/hair"},{text:Oe("Accounts"),route:"/crud/account"},{text:Oe("Payments"),route:"/crud/payment"},{text:Oe("Expense Type"),route:"/crud/expenseType"},{text:Oe("User"),route:"/crud/user"}]}},methods:{route(i){Rs.push(i)}},setup(){return{t:Oe,getBaseURL:Os}},components:{}};function Q4(i,e,t,n,s,o){const r=de("v-icon"),a=de("v-btn"),l=de("v-list-item"),c=de("v-divider"),u=de("router-link"),d=de("v-list-item-title"),h=de("v-list"),f=de("v-menu"),g=de("v-navigation-drawer"),p=de("v-main"),v=de("v-layout"),y=de("v-card");return me(),we(y,null,{default:oe(()=>[b(v,null,{default:oe(()=>[b(g,{modelValue:s.drawer,"onUpdate:modelValue":e[2]||(e[2]=C=>s.drawer=C),rail:s.rail,temporary:"",permanent:""},{default:oe(()=>[b(l,{nav:""},{prepend:oe(()=>[b(r,{icon:"mdi-menu",onClick:e[0]||(e[0]=C=>s.rail=!s.rail)})]),append:oe(()=>[b(a,{variant:"text",icon:"mdi-chevron-left",onClick:e[1]||(e[1]=DC(C=>s.rail=!s.rail,["stop"]))})]),_:1}),b(c),b(h,{density:"compact",nav:""},{default:oe(()=>[b(u,{to:"/dashboard",style:{"text-decoration":"none",color:"inherit"}},{default:oe(()=>[b(l,{"prepend-icon":"mdi-monitor-dashboard",title:n.t("Dashboard")},null,8,["title"])]),_:1}),b(u,{to:"/herde",style:{"text-decoration":"none",color:"inherit"}},{default:oe(()=>[b(l,{"prepend-icon":"mdi-cow",title:n.t("Herde")},null,8,["title"])]),_:1}),b(u,{to:"/account",style:{"text-decoration":"none",color:"inherit"}},{default:oe(()=>[b(l,{"prepend-icon":"mdi-cash-multiple",title:n.t("Account")},null,8,["title"])]),_:1}),b(f,{location:i.location},{activator:oe(({props:C})=>[b(l,Ie({"prepend-icon":"mdi-database"},C,{title:n.t("Config")}),null,16,["title"])]),default:oe(()=>[b(h,null,{default:oe(()=>[(me(!0),kt(He,null,Wo(s.links,C=>(me(),we(l,{key:C.route,onClick:m=>o.route(C.route)},{default:oe(()=>[b(d,null,{default:oe(()=>[De(Me(C.text),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["location"]),b(u,{to:"/help",style:{"text-decoration":"none",color:"inherit"}},{default:oe(()=>[b(l,{"prepend-icon":"mdi-help",title:n.t("Help")},null,8,["title"])]),_:1})]),_:1})]),_:1},8,["modelValue","rail"]),b(p,{style:{height:"95vh"}})]),_:1})]),_:1})}const Z4=nt(X4,[["render",Q4],["__scopeId","data-v-13614570"]]),J4={data(){return{price:"",lang:"",buyerId:0}},computed:{address(){return av(this.$store.state.address)},currentLanguage(){return this.$store.state.config.language}},watch:{currentLanguage(){this.lang=this.$store.state.config.language}},setup(){var i=["DE","PY","BR","EN","TW"];return{t:Oe,available:i}},methods:{closeModal(){this.$store.state.showSearch=!1},go(){this.$store.state.price=this.price,this.$store.state.buyer=this.$store.state.address.find(i=>i.id===this.buyerId),this.$store.state.reportLanguage=this.lang,this.$store.state.showOffer=!1,A4(this)}}};function e6(i,e,t,n,s,o){const r=de("v-card-title"),a=de("v-text-field"),l=de("v-card-text"),c=de("v-select"),u=de("v-spacer"),d=de("v-btn"),h=de("v-card-actions"),f=de("v-card"),g=de("v-dialog"),p=de("v-row");return me(),we(p,{justify:"center"},{default:oe(()=>[b(g,{modelValue:i.$store.state.showOffer,"onUpdate:modelValue":e[7]||(e[7]=v=>i.$store.state.showOffer=v),"max-width":"290"},{default:oe(()=>[b(f,null,{default:oe(()=>[b(r,{class:"text-h5"},{default:oe(()=>[De(Me(n.t("Offer Details")),1)]),_:1}),b(l,null,{default:oe(()=>[(me(),we(a,{modelValue:s.price,"onUpdate:modelValue":e[0]||(e[0]=v=>s.price=v),label:n.t("Price"),required:"",autofocus:"",onKeyup:[e[1]||(e[1]=Md(v=>o.go(),["enter"])),e[2]||(e[2]=Md(v=>o.closeModal(),["escape"]))],key:i.$store.state.key},null,8,["modelValue","label"]))]),_:1}),(me(),we(c,{modelValue:s.buyerId,"onUpdate:modelValue":e[3]||(e[3]=v=>s.buyerId=v),items:o.address,label:n.t("Buyer"),density:"compact","hide-details":"",key:i.$store.state.key},null,8,["modelValue","items","label"])),b(c,{modelValue:s.lang,"onUpdate:modelValue":e[4]||(e[4]=v=>s.lang=v),items:n.available},null,8,["modelValue","items"]),b(h,null,{default:oe(()=>[b(u),(me(),we(d,{key:i.$store.state.key,onClick:e[5]||(e[5]=v=>i.$store.state.showOffer=!1),color:"grey"},{default:oe(()=>[De(Me(n.t("Cancel")),1)]),_:1})),(me(),we(d,{key:i.$store.state.key,onClick:e[6]||(e[6]=v=>o.go()),color:"success"},{default:oe(()=>[De(Me(n.t("Create")),1)]),_:1}))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const t6=nt(J4,[["render",e6]]);const i6=Aa(),n6={name:"App",components:{topBar:q4,languageSelect:P4,modifyDialog:RI,offerDialog:t6,sideMenu:Z4},setup(){return f4(),m4(),y4(),C4(),E4(),R4(),v4(),b4(),w4(),S4(),g4(),h4(),p4(),Pi(()=>{u4()}),{store:i6,t:Oe,showMenuBar:d4,getBaseURL:Os}},methods:{logout(){localStorage.token="",location.reload()},upload(){const i=Os()+"api/system/upload";try{si(i)}catch{}}},data(){return{}}},TI=i=>(xT("data-v-af3adf20"),i=i(),AT(),i),s6=TI(()=>pt("br",null,null,-1)),o6=TI(()=>pt("br",null,null,-1));function r6(i,e,t,n,s,o){const r=de("topBar"),a=de("sideMenu"),l=de("v-sheet"),c=de("router-view"),u=de("offerDialog"),d=de("modifyDialog"),h=de("v-main"),f=de("v-app");return me(),we(f,null,{default:oe(()=>[b(h,null,{default:oe(()=>[n.showMenuBar()?(me(),we(r,{key:0,menu:"herde"})):Yt("",!0),b(l,{class:"d-flex bg-surface-variant"},{default:oe(()=>[b(l,{class:"ma-0 pa-0"},{default:oe(()=>[n.showMenuBar()?(me(),we(a,{key:0})):Yt("",!0)]),_:1}),b(l,{class:"ma-0 pa-0",width:"100%"},{default:oe(()=>[b(c)]),_:1})]),_:1}),b(u),b(d),s6,o6]),_:1})]),_:1})}const a6=nt(n6,[["render",r6],["__scopeId","data-v-af3adf20"]]),By={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function l6(i,e){const t=[];let n=[];const s=xI(i),o=AI(i),r=s.getDay()-By[e.slice(-2).toUpperCase()],a=o.getDay()-By[e.slice(-2).toUpperCase()];for(let l=0;l<r;l++){const c=new Date(s);c.setDate(c.getDate()-(r-l)),n.push(c)}for(let l=1;l<=o.getDate();l++){const c=new Date(i.getFullYear(),i.getMonth(),l);n.push(c),n.length===7&&(t.push(n),n=[])}for(let l=1;l<7-a;l++){const c=new Date(o);c.setDate(c.getDate()+l),n.push(c)}return t.push(n),t}function xI(i){return new Date(i.getFullYear(),i.getMonth(),1)}function AI(i){return new Date(i.getFullYear(),i.getMonth()+1,0)}function c6(i){const e=i.split("-").map(o=>o.padStart(2,"0")).join("-"),t=new Date().getTimezoneOffset()/-60,n=t<0?"-":"+",s=Math.abs(t).toString().padStart(2,"0");return`${e}T00:00:00.000${n}${s}:00`}const u6=/([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))/;function d6(i){if(i==null)return new Date;if(i instanceof Date)return i;if(typeof i=="string"){let e;if(u6.test(i)?e=Date.parse(c6(i)):e=Date.parse(i),!isNaN(e))return new Date(e)}return null}const U0=new Date(2e3,0,2);function h6(i){const e=By[i.slice(-2).toUpperCase()];return qs(7).map(t=>{const n=new Date(U0);return n.setDate(U0.getDate()+e+t),new Intl.DateTimeFormat(i,{weekday:"short"}).format(n)})}function f6(i,e,t){const n=new Date(i);let s={};switch(e){case"fullDateWithWeekday":s={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"normalDateWithWeekday":s={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":s={};break;case"monthAndDate":s={month:"long",day:"numeric"};break;case"monthAndYear":s={month:"long",year:"numeric"};break;case"dayOfMonth":s={day:"numeric"};break;default:s={timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(t,s).format(n)}function p6(i,e){const t=new Date(i);return t.setDate(t.getDate()+e),t}function g6(i,e){const t=new Date(i);return t.setMonth(t.getMonth()+e),t}function m6(i){return i.getFullYear()}function v6(i){return i.getMonth()}function C6(i){return new Date(i.getFullYear(),0,1)}function y6(i){return new Date(i.getFullYear(),11,31)}function b6(i,e){return Wy(i,e[0])&&S6(i,e[1])}function w6(i){const e=new Date(i);return e instanceof Date&&!isNaN(e.getTime())}function Wy(i,e){return i.getTime()>e.getTime()}function S6(i,e){return i.getTime()<e.getTime()}function j0(i,e){return i.getTime()===e.getTime()}function E6(i,e){return i.getDate()===e.getDate()&&i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear()}function _6(i,e){return i.getMonth()===e.getMonth()&&i.getFullYear()===e.getFullYear()}function R6(i,e,t){const n=new Date(i),s=new Date(e);return t==="month"?n.getMonth()-s.getMonth()+(n.getFullYear()-s.getFullYear())*12:Math.floor((n.getTime()-s.getTime())/(1e3*60*60*24))}function T6(i,e){const t=new Date(i);return t.setFullYear(e),t}class x6{constructor(e){this.locale=e.locale}date(e){return d6(e)}toJsDate(e){return e}addDays(e,t){return p6(e,t)}addMonths(e,t){return g6(e,t)}getWeekArray(e){return l6(e,this.locale)}startOfMonth(e){return xI(e)}endOfMonth(e){return AI(e)}format(e,t){return f6(e,t,this.locale)}isEqual(e,t){return j0(e,t)}isValid(e){return w6(e)}isWithinRange(e,t){return b6(e,t)}isAfter(e,t){return Wy(e,t)}isBefore(e,t){return!Wy(e,t)&&!j0(e,t)}isSameDay(e,t){return E6(e,t)}isSameMonth(e,t){return _6(e,t)}setYear(e,t){return T6(e,t)}getDiff(e,t,n){return R6(e,t,n)}getWeekdays(){return h6(this.locale)}getYear(e){return m6(e)}getMonth(e){return v6(e)}startOfYear(e){return C6(e)}endOfYear(e){return y6(e)}}const $0=Symbol.for("vuetify:date-adapter");function A6(i){return ys({adapter:x6,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"nn-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},i)}function DI(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:e,...t}=i,n=ys(e,t),{aliases:s={},components:o={},directives:r={}}=n,a=RB(n.defaults),l=FU(n.display,n.ssr),c=jB(n.theme),u=tW(n.icons),d=uW(n.locale),h=A6(n.date);return{install:g=>{for(const p in r)g.directive(p,r[p]);for(const p in o)g.component(p,o[p]);for(const p in s)g.component(p,cs({...s[p],name:p,aliasName:s[p].name}));if(c.install(g),g.provide(rh,a),g.provide(_y,l),g.provide(lh,c),g.provide(fy,u),g.provide(qc,d),g.provide($0,h),yi&&n.ssr)if(g.$nuxt)g.$nuxt.hook("app:suspense:resolve",()=>{l.update()});else{const{mount:p}=g;g.mount=function(){const v=p(...arguments);return Wt(()=>l.update()),g.mount=p,v}}hn.reset(),g.mixin({computed:{$vuetify(){return xi({defaults:sc.call(this,rh),display:sc.call(this,_y),theme:sc.call(this,lh),icons:sc.call(this,fy),locale:sc.call(this,qc),date:sc.call(this,$0)})}}})},defaults:a,display:l,theme:c,icons:u,locale:d,date:h}}const D6="3.3.9";DI.version=D6;function sc(i){var n,s;const e=this.$,t=((n=e.parent)==null?void 0:n.provides)??((s=e.vnode.appContext)==null?void 0:s.provides);if(t&&i in t)return t[i]}const O6=fe({...Ve(),...tP({fullHeight:!0}),...St()},"VApp"),P6=Ee()({name:"VApp",props:O6(),setup(i,e){let{slots:t}=e;const n=Pt(i),{layoutClasses:s,layoutStyles:o,getLayoutItem:r,items:a,layoutRef:l}=iP(i),{rtlClasses:c}=Bi();return _e(()=>{var u;return b("div",{ref:l,class:["v-application",n.themeClasses.value,s.value,c.value,i.class],style:[o.value,i.style]},[b("div",{class:"v-application__wrap"},[(u=t.default)==null?void 0:u.call(t)])])}),{getLayoutItem:r,items:a,theme:n}}});const OI=fe({text:String,...Ve(),...lt()},"VToolbarTitle"),YS=Ee()({name:"VToolbarTitle",props:OI(),setup(i,e){let{slots:t}=e;return _e(()=>{const n=!!(t.default||t.text||i.text);return b(i.tag,{class:["v-toolbar-title",i.class],style:i.style},{default:()=>{var s;return[n&&b("div",{class:"v-toolbar-title__placeholder"},[t.text?t.text():i.text,(s=t.default)==null?void 0:s.call(t)])]}})}),{}}}),I6=[null,"prominent","default","comfortable","compact"],PI=fe({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:i=>I6.includes(i)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...us(),...Ve(),...Li(),...Zt(),...lt({tag:"header"}),...St()},"VToolbar"),Uy=Ee()({name:"VToolbar",props:PI(),setup(i,e){var f;let{slots:t}=e;const{backgroundColorClasses:n,backgroundColorStyles:s}=di(Se(i,"color")),{borderClasses:o}=Ns(i),{elevationClasses:r}=Yi(i),{roundedClasses:a}=ni(i),{themeClasses:l}=Pt(i),{rtlClasses:c}=Bi(),u=Fe(!!(i.extended||(f=t.extension)!=null&&f.call(t))),d=z(()=>parseInt(Number(i.height)+(i.density==="prominent"?Number(i.height):0)-(i.density==="comfortable"?8:0)-(i.density==="compact"?16:0),10)),h=z(()=>u.value?parseInt(Number(i.extensionHeight)+(i.density==="prominent"?Number(i.extensionHeight):0)-(i.density==="comfortable"?4:0)-(i.density==="compact"?8:0),10):0);return Ci({VBtn:{variant:"text"}}),_e(()=>{var y;const g=!!(i.title||t.title),p=!!(t.image||i.image),v=(y=t.extension)==null?void 0:y.call(t);return u.value=!!(i.extended||v),b(i.tag,{class:["v-toolbar",{"v-toolbar--absolute":i.absolute,"v-toolbar--collapse":i.collapse,"v-toolbar--flat":i.flat,"v-toolbar--floating":i.floating,[`v-toolbar--density-${i.density}`]:!0},n.value,o.value,r.value,a.value,l.value,c.value,i.class],style:[s.value,i.style]},{default:()=>[p&&b("div",{key:"image",class:"v-toolbar__image"},[t.image?b(Nt,{key:"image-defaults",disabled:!i.image,defaults:{VImg:{cover:!0,src:i.image}}},t.image):b(Sl,{key:"image-img",cover:!0,src:i.image},null)]),b(Nt,{defaults:{VTabs:{height:ke(d.value)}}},{default:()=>{var C,m,w;return[b("div",{class:"v-toolbar__content",style:{height:ke(d.value)}},[t.prepend&&b("div",{class:"v-toolbar__prepend"},[(C=t.prepend)==null?void 0:C.call(t)]),g&&b(YS,{key:"title",text:i.title},{text:t.title}),(m=t.default)==null?void 0:m.call(t),t.append&&b("div",{class:"v-toolbar__append"},[(w=t.append)==null?void 0:w.call(t)])])]}}),b(Nt,{defaults:{VTabs:{height:ke(h.value)}}},{default:()=>[b(Vm,null,{default:()=>[u.value&&b("div",{class:"v-toolbar__extension",style:{height:ke(h.value)}},[v])]})]})]})}),{contentHeight:d,extensionHeight:h}}}),M6=fe({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function L6(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:t}=e;let n=0;const s=Te(null),o=Fe(0),r=Fe(0),a=Fe(0),l=Fe(!1),c=Fe(!1),u=z(()=>Number(i.scrollThreshold)),d=z(()=>Ai((u.value-o.value)/u.value||0)),h=()=>{const f=s.value;!f||t&&!t.value||(n=o.value,o.value="window"in f?f.pageYOffset:f.scrollTop,c.value=o.value<n,a.value=Math.abs(o.value-u.value))};return Le(c,()=>{r.value=r.value||o.value}),Le(l,()=>{r.value=0}),Pi(()=>{Le(()=>i.scrollTarget,f=>{var p;const g=f?document.querySelector(f):window;g&&g!==s.value&&((p=s.value)==null||p.removeEventListener("scroll",h),s.value=g,s.value.addEventListener("scroll",h,{passive:!0}))},{immediate:!0})}),dn(()=>{var f;(f=s.value)==null||f.removeEventListener("scroll",h)}),t&&Le(t,h,{immediate:!0}),{scrollThreshold:u,currentScroll:o,currentThreshold:a,isScrollActive:l,scrollRatio:d,isScrollingUp:c,savedScroll:r}}const F6=fe({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:i=>["top","bottom"].includes(i)},...PI(),...Du(),...M6(),height:{type:[Number,String],default:64}},"VAppBar"),N6=Ee()({name:"VAppBar",props:F6(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Te(),s=Ke(i,"modelValue"),o=z(()=>{var C;const y=new Set(((C=i.scrollBehavior)==null?void 0:C.split(" "))??[]);return{hide:y.has("hide"),inverted:y.has("inverted"),collapse:y.has("collapse"),elevate:y.has("elevate"),fadeImage:y.has("fade-image")}}),r=z(()=>{const y=o.value;return y.hide||y.inverted||y.collapse||y.elevate||y.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:c,scrollRatio:u}=L6(i,{canScroll:r}),d=z(()=>i.collapse||o.value.collapse&&(o.value.inverted?u.value>0:u.value===0)),h=z(()=>i.flat||o.value.elevate&&(o.value.inverted?a.value>0:a.value===0)),f=z(()=>o.value.fadeImage?o.value.inverted?1-u.value:u.value:void 0),g=z(()=>{var m,w;if(o.value.hide&&o.value.inverted)return 0;const y=((m=n.value)==null?void 0:m.contentHeight)??0,C=((w=n.value)==null?void 0:w.extensionHeight)??0;return y+C});mr(z(()=>!!i.scrollBehavior),()=>{_n(()=>{o.value.hide?o.value.inverted?s.value=a.value>l.value:s.value=c.value||a.value<l.value:s.value=!0})});const{ssrBootStyles:p}=jl(),{layoutItemStyles:v}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:Se(i,"location"),layoutSize:g,elementSize:Fe(void 0),active:s,absolute:Se(i,"absolute")});return _e(()=>{const[y]=Uy.filterProps(i);return b(Uy,Ie({ref:n,class:["v-app-bar",{"v-app-bar--bottom":i.location==="bottom"},i.class],style:[{...v.value,"--v-toolbar-image-opacity":f.value,height:void 0,...p.value},i.style]},y,{collapse:d.value,flat:h.value}),t)}),{}}}),k6=fe({...pS({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),V6=Ee()({name:"VAppBarNavIcon",props:k6(),setup(i,e){let{slots:t}=e;return _e(()=>b(pi,Ie(i,{class:["v-app-bar-nav-icon"]}),t)),{}}}),G6=Ee()({name:"VAppBarTitle",props:OI(),setup(i,e){let{slots:t}=e;return _e(()=>b(YS,Ie(i,{class:"v-app-bar-title"}),t)),{}}});const II=fo("v-alert-title"),H6=["success","info","warning","error"],B6=fe({border:{type:[Boolean,String],validator:i=>typeof i=="boolean"||["top","end","bottom","start"].includes(i)},borderColor:String,closable:Boolean,closeIcon:{type:tt,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:i=>H6.includes(i)},...Ve(),...Mi(),...Vs(),...Li(),...Oa(),...Ru(),...Zt(),...lt(),...St(),...ks({variant:"flat"})},"VAlert"),W6=Ee()({name:"VAlert",props:B6(),emits:{"click:close":i=>!0,"update:modelValue":i=>!0},setup(i,e){let{emit:t,slots:n}=e;const s=Ke(i,"modelValue"),o=z(()=>{if(i.icon!==!1)return i.type?i.icon??`$${i.type}`:i.icon}),r=z(()=>({color:i.color??i.type,variant:i.variant})),{themeClasses:a}=Pt(i),{colorClasses:l,colorStyles:c,variantClasses:u}=Wl(r),{densityClasses:d}=fn(i),{dimensionStyles:h}=Gs(i),{elevationClasses:f}=Yi(i),{locationStyles:g}=Pa(i),{positionClasses:p}=Tu(i),{roundedClasses:v}=ni(i),{textColorClasses:y,textColorStyles:C}=cn(Se(i,"borderColor")),{t:m}=Rn(),w=z(()=>({"aria-label":m(i.closeLabel),onClick(E){s.value=!1,t("click:close",E)}}));return()=>{const E=!!(n.prepend||o.value),R=!!(n.title||i.title),O=!!(n.close||i.closable);return s.value&&b(i.tag,{class:["v-alert",i.border&&{"v-alert--border":!!i.border,[`v-alert--border-${i.border===!0?"start":i.border}`]:!0},{"v-alert--prominent":i.prominent},a.value,l.value,d.value,f.value,p.value,v.value,u.value,i.class],style:[c.value,h.value,g.value,i.style],role:"alert"},{default:()=>{var A,D;return[Bl(!1,"v-alert"),i.border&&b("div",{key:"border",class:["v-alert__border",y.value],style:C.value},null),E&&b("div",{key:"prepend",class:"v-alert__prepend"},[n.prepend?b(Nt,{key:"prepend-defaults",disabled:!o.value,defaults:{VIcon:{density:i.density,icon:o.value,size:i.prominent?44:28}}},n.prepend):b(Gt,{key:"prepend-icon",density:i.density,icon:o.value,size:i.prominent?44:28},null)]),b("div",{class:"v-alert__content"},[R&&b(II,{key:"title"},{default:()=>{var L;return[((L=n.title)==null?void 0:L.call(n))??i.title]}}),((A=n.text)==null?void 0:A.call(n))??i.text,(D=n.default)==null?void 0:D.call(n)]),n.append&&b("div",{key:"append",class:"v-alert__append"},[n.append()]),O&&b("div",{key:"close",class:"v-alert__close"},[n.close?b(Nt,{key:"close-defaults",defaults:{VBtn:{icon:i.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var L;return[(L=n.close)==null?void 0:L.call(n,{props:w.value})]}}):b(pi,Ie({key:"close-btn",icon:i.closeIcon,size:"x-small",variant:"text"},w.value),null)])]}})}}});function U6(i,e,t){if(e==null)return i;if(Array.isArray(e))throw new Error("Multiple matches is not implemented");return typeof e=="number"&&~e?b(He,null,[b("span",{class:"v-autocomplete__unmask"},[i.substr(0,e)]),b("span",{class:"v-autocomplete__mask"},[i.substr(e,t)]),b("span",{class:"v-autocomplete__unmask"},[i.substr(e+t)])]):i}const j6=fe({autoSelectFirst:{type:[Boolean,String]},search:String,...RS({filterKeys:["title"]}),...ES(),...qo(Ym({modelValue:null}),["validationValue","dirty","appendInnerIcon"]),...Or({transition:!1})},"VAutocomplete"),$6=Ee()({name:"VAutocomplete",props:j6(),emits:{"update:focused":i=>!0,"update:search":i=>!0,"update:modelValue":i=>!0,"update:menu":i=>!0},setup(i,e){let{slots:t}=e;const{t:n}=Rn(),s=Te(),o=Fe(!1),r=Fe(!0),a=Te(!1),l=Te(),c=Ke(i,"menu"),u=z({get:()=>c.value,set:K=>{var he;c.value&&!K&&((he=l.value)!=null&&he.ΨopenChildren)||(c.value=K)}}),d=Fe(-1),h=z(()=>{var K;return(K=s.value)==null?void 0:K.color}),{items:f,transformIn:g,transformOut:p}=yS(i),{textColorClasses:v,textColorStyles:y}=cn(h),C=Ke(i,"search",""),m=Ke(i,"modelValue",[],K=>g(K===null?[null]:In(K)),K=>{const he=p(K);return i.multiple?he:he[0]??null}),w=Bm(),{filteredItems:E,getMatches:R}=TS(i,f,()=>r.value?"":C.value),O=z(()=>m.value.map(K=>f.value.find(he=>i.valueComparator(he.value,K.value))||K)),A=z(()=>i.hideSelected?E.value.filter(K=>!O.value.some(he=>he.value===K.value)):E.value),D=z(()=>O.value.map(K=>K.props.value)),L=z(()=>O.value[d.value]),S=z(()=>{var he;return(i.autoSelectFirst===!0||i.autoSelectFirst==="exact"&&C.value===((he=A.value[0])==null?void 0:he.title))&&A.value.length>0&&!r.value&&!a.value}),x=z(()=>i.hideNoData&&!f.value.length||i.readonly||(w==null?void 0:w.isReadonly.value)),T=Te(),{onListScroll:H,onListKeydown:Y}=SS(T,s);function Q(K){i.openOnClear&&(u.value=!0),C.value=""}function te(){x.value||(u.value=!0)}function F(K){x.value||(o.value&&(K.preventDefault(),K.stopPropagation()),u.value=!u.value)}function k(K){var ie,ee,j;if(i.readonly||w!=null&&w.isReadonly.value)return;const he=s.value.selectionStart,ne=D.value.length;if((d.value>-1||["Enter","ArrowDown","ArrowUp"].includes(K.key))&&K.preventDefault(),["Enter","ArrowDown"].includes(K.key)&&(u.value=!0),["Escape"].includes(K.key)&&(u.value=!1),["Enter","Escape","Tab"].includes(K.key)&&(S.value&&["Enter","Tab"].includes(K.key)&&re(E.value[0]),r.value=!0),K.key==="ArrowDown"&&S.value&&((ie=T.value)==null||ie.focus("next")),!!i.multiple){if(["Backspace","Delete"].includes(K.key)){if(d.value<0){K.key==="Backspace"&&!C.value&&(d.value=ne-1);return}const M=d.value;L.value&&re(L.value),d.value=M>=ne-1?ne-2:M}if(K.key==="ArrowLeft"){if(d.value<0&&he>0)return;const M=d.value>-1?d.value-1:ne-1;O.value[M]?d.value=M:(d.value=-1,s.value.setSelectionRange((ee=C.value)==null?void 0:ee.length,(j=C.value)==null?void 0:j.length))}if(K.key==="ArrowRight"){if(d.value<0)return;const M=d.value+1;O.value[M]?d.value=M:(d.value=-1,s.value.setSelectionRange(0,0))}}}function q(K){C.value=K.target.value}function V(){var K;o.value&&(r.value=!0,(K=s.value)==null||K.focus())}function J(K){o.value=!0,setTimeout(()=>{a.value=!0})}function ae(K){a.value=!1}function se(K){(K==null||K===""&&!i.multiple)&&(m.value=[])}const ce=Fe(!1);function re(K){if(i.multiple){const he=D.value.findIndex(ne=>i.valueComparator(ne,K.value));if(he===-1)m.value=[...m.value,K];else{const ne=[...m.value];ne.splice(he,1),m.value=ne}}else m.value=[K],ce.value=!0,C.value=K.title,u.value=!1,r.value=!0,Wt(()=>ce.value=!1)}return Le(o,(K,he)=>{var ne;K!==he&&(K?(ce.value=!0,C.value=i.multiple?"":String(((ne=O.value.at(-1))==null?void 0:ne.props.title)??""),r.value=!0,Wt(()=>ce.value=!1)):(!i.multiple&&!C.value?m.value=[]:S.value&&!a.value&&!O.value.some(ie=>{let{value:ee}=ie;return ee===A.value[0].value})&&re(A.value[0]),u.value=!1,C.value="",d.value=-1))}),Le(C,K=>{!o.value||ce.value||(K&&(u.value=!0),r.value=!K)}),_e(()=>{const K=!!(i.chips||t.chip),he=!!(!i.hideNoData||A.value.length||t["prepend-item"]||t["append-item"]||t["no-data"]),ne=m.value.length>0,[ie]=El.filterProps(i);return b(El,Ie({ref:s},ie,{modelValue:C.value,"onUpdate:modelValue":se,focused:o.value,"onUpdate:focused":ee=>o.value=ee,validationValue:m.externalValue,dirty:ne,onInput:q,class:["v-autocomplete",`v-autocomplete--${i.multiple?"multiple":"single"}`,{"v-autocomplete--active-menu":u.value,"v-autocomplete--chips":!!i.chips,"v-autocomplete--selection-slot":!!t.selection,"v-autocomplete--selecting-index":d.value>-1},i.class],style:i.style,readonly:i.readonly,placeholder:ne?void 0:i.placeholder,"onClick:clear":Q,"onMousedown:control":te,onKeydown:k}),{...t,default:()=>b(He,null,[b($m,Ie({ref:l,modelValue:u.value,"onUpdate:modelValue":ee=>u.value=ee,activator:"parent",contentClass:"v-autocomplete__content",disabled:x.value,eager:i.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:i.transition,onAfterLeave:V},i.menuProps),{default:()=>[he&&b(Wm,{ref:T,selected:D.value,selectStrategy:i.multiple?"independent":"single-independent",onMousedown:ee=>ee.preventDefault(),onKeydown:Y,onFocusin:J,onFocusout:ae,onScrollPassive:H,tabindex:"-1"},{default:()=>{var ee,j,M;return[(ee=t["prepend-item"])==null?void 0:ee.call(t),!A.value.length&&!i.hideNoData&&(((j=t["no-data"])==null?void 0:j.call(t))??b(Cr,{title:n(i.noDataText)},null)),b(qm,{renderless:!0,items:A.value},{default:B=>{var U;let{item:X,index:Z,itemRef:ue}=B;const G=Ie(X.props,{ref:ue,key:Z,active:S.value&&Z===0?!0:void 0,onClick:()=>re(X)});return((U=t.item)==null?void 0:U.call(t,{item:X,index:Z,props:G}))??b(Cr,G,{prepend:I=>{let{isSelected:_}=I;return b(He,null,[i.multiple&&!i.hideSelected?b(vr,{key:X.value,modelValue:_,ripple:!1,tabindex:"-1"},null):void 0,X.props.prependIcon&&b(Gt,{icon:X.props.prependIcon},null)])},title:()=>{var I,_;return r.value?X.title:U6(X.title,(I=R(X))==null?void 0:I.title,((_=C.value)==null?void 0:_.length)??0)}})}}),(M=t["append-item"])==null?void 0:M.call(t)]}})]}),O.value.map((ee,j)=>{var X;function M(Z){Z.stopPropagation(),Z.preventDefault(),re(ee)}const B={"onClick:close":M,onMousedown(Z){Z.preventDefault(),Z.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return b("div",{key:ee.value,class:["v-autocomplete__selection",j===d.value&&["v-autocomplete__selection--selected",v.value]],style:j===d.value?y.value:{}},[K?t.chip?b(Nt,{key:"chip-defaults",defaults:{VChip:{closable:i.closableChips,size:"small",text:ee.title}}},{default:()=>{var Z;return[(Z=t.chip)==null?void 0:Z.call(t,{item:ee,index:j,props:B})]}}):b(pf,Ie({key:"chip",closable:i.closableChips,size:"small",text:ee.title},B),null):((X=t.selection)==null?void 0:X.call(t,{item:ee,index:j}))??b("span",{class:"v-autocomplete__selection-text"},[ee.title,i.multiple&&j<O.value.length-1&&b("span",{class:"v-autocomplete__selection-comma"},[De(",")])])])})]),"append-inner":function(){var B;for(var ee=arguments.length,j=new Array(ee),M=0;M<ee;M++)j[M]=arguments[M];return b(He,null,[(B=t["append-inner"])==null?void 0:B.call(t,...j),i.menuIcon?b(Gt,{class:"v-autocomplete__menu-icon",icon:i.menuIcon,onMousedown:F,onClick:ND},null):void 0])}})}),po({isFocused:o,isPristine:r,menu:u,search:C,filteredItems:E,select:re},s)}});const z6=fe({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:tt,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ve(),...Oa({location:"top end"}),...Zt(),...lt(),...St(),...Or({transition:"scale-rotate-transition"})},"VBadge"),K6=Ee()({name:"VBadge",inheritAttrs:!1,props:z6(),setup(i,e){const{backgroundColorClasses:t,backgroundColorStyles:n}=di(Se(i,"color")),{roundedClasses:s}=ni(i),{t:o}=Rn(),{textColorClasses:r,textColorStyles:a}=cn(Se(i,"textColor")),{themeClasses:l}=qD(),{locationStyles:c}=Pa(i,!0,u=>(i.floating?i.dot?2:4:i.dot?8:12)+(["top","bottom"].includes(u)?+(i.offsetY??0):["left","right"].includes(u)?+(i.offsetX??0):0));return _e(()=>{const u=Number(i.content),d=!i.max||isNaN(u)?i.content:u<=+i.max?u:`${i.max}+`,[h,f]=bu(e.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return b(i.tag,Ie({class:["v-badge",{"v-badge--bordered":i.bordered,"v-badge--dot":i.dot,"v-badge--floating":i.floating,"v-badge--inline":i.inline},i.class]},f,{style:i.style}),{default:()=>{var g,p;return[b("div",{class:"v-badge__wrapper"},[(p=(g=e.slots).default)==null?void 0:p.call(g),b(Xs,{transition:i.transition},{default:()=>{var v,y;return[Mt(b("span",Ie({class:["v-badge__badge",l.value,t.value,s.value,r.value],style:[n.value,a.value,i.inline?{}:c.value],"aria-atomic":"true","aria-label":o(i.label,u),"aria-live":"polite",role:"status"},h),[i.dot?void 0:e.slots.badge?(y=(v=e.slots).badge)==null?void 0:y.call(v):i.icon?b(Gt,{icon:i.icon},null):d]),[[Ps,i.modelValue]])]}})])]}})}),{}}});const Y6=fe({color:String,density:String,...Ve()},"VBannerActions"),MI=Ee()({name:"VBannerActions",props:Y6(),setup(i,e){let{slots:t}=e;return Ci({VBtn:{color:i.color,density:i.density,variant:"text"}}),_e(()=>{var n;return b("div",{class:["v-banner-actions",i.class],style:i.style},[(n=t.default)==null?void 0:n.call(t)])}),{}}}),LI=fo("v-banner-text"),q6=fe({avatar:String,color:String,icon:tt,lines:String,stacked:Boolean,sticky:Boolean,text:String,...us(),...Ve(),...Mi(),...Vs(),...Li(),...Oa(),...Ru(),...Zt(),...lt(),...St()},"VBanner"),X6=Ee()({name:"VBanner",props:q6(),setup(i,e){let{slots:t}=e;const{borderClasses:n}=Ns(i),{densityClasses:s}=fn(i),{mobile:o}=$l(),{dimensionStyles:r}=Gs(i),{elevationClasses:a}=Yi(i),{locationStyles:l}=Pa(i),{positionClasses:c}=Tu(i),{roundedClasses:u}=ni(i),{themeClasses:d}=Pt(i),h=Se(i,"color"),f=Se(i,"density");Ci({VBannerActions:{color:h,density:f}}),_e(()=>{const g=!!(i.text||t.text),p=!!(i.avatar||i.icon),v=!!(p||t.prepend);return b(i.tag,{class:["v-banner",{"v-banner--stacked":i.stacked||o.value,"v-banner--sticky":i.sticky,[`v-banner--${i.lines}-line`]:!!i.lines},n.value,s.value,a.value,c.value,u.value,d.value,i.class],style:[r.value,l.value,i.style],role:"banner"},{default:()=>{var y;return[v&&b("div",{key:"prepend",class:"v-banner__prepend"},[t.prepend?b(Nt,{key:"prepend-defaults",disabled:!p,defaults:{VAvatar:{color:h.value,density:f.value,icon:i.icon,image:i.avatar}}},t.prepend):b(ua,{key:"prepend-avatar",color:h.value,density:f.value,icon:i.icon,image:i.avatar},null)]),b("div",{class:"v-banner__content"},[g&&b(LI,{key:"text"},{default:()=>{var C;return[((C=t.text)==null?void 0:C.call(t))??i.text]}}),(y=t.default)==null?void 0:y.call(t)]),t.actions&&b(MI,{key:"actions"},t.actions)]}})})}});const Q6=fe({bgColor:String,color:String,grow:Boolean,mode:{type:String,validator:i=>!i||["horizontal","shift"].includes(i)},height:{type:[Number,String],default:56},active:{type:Boolean,default:!0},...us(),...Ve(),...Mi(),...Li(),...Zt(),...Du({name:"bottom-navigation"}),...lt({tag:"header"}),...wu({modelValue:!0,selectedClass:"v-btn--selected"}),...St()},"VBottomNavigation"),Z6=Ee()({name:"VBottomNavigation",props:Q6(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{themeClasses:n}=qD(),{borderClasses:s}=Ns(i),{backgroundColorClasses:o,backgroundColorStyles:r}=di(Se(i,"bgColor")),{densityClasses:a}=fn(i),{elevationClasses:l}=Yi(i),{roundedClasses:c}=ni(i),{ssrBootStyles:u}=jl(),d=z(()=>Number(i.height)-(i.density==="comfortable"?8:0)-(i.density==="compact"?16:0)),h=Se(i,"active"),{layoutItemStyles:f}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:z(()=>"bottom"),layoutSize:z(()=>h.value?d.value:0),elementSize:d,active:h,absolute:Se(i,"absolute")});return Ul(i,lS),Ci({VBtn:{color:Se(i,"color"),density:Se(i,"density"),stacked:z(()=>i.mode!=="horizontal"),variant:"text"}},{scoped:!0}),_e(()=>b(i.tag,{class:["v-bottom-navigation",{"v-bottom-navigation--active":h.value,"v-bottom-navigation--grow":i.grow,"v-bottom-navigation--shift":i.mode==="shift"},n.value,o.value,s.value,a.value,l.value,c.value,i.class],style:[r.value,f.value,{height:ke(d.value),transform:`translateY(${ke(h.value?0:100,"%")})`},u.value,i.style]},{default:()=>[t.default&&b("div",{class:"v-bottom-navigation__content"},[t.default()])]})),{}}});const J6=fe({divider:[Number,String],...Ve()},"VBreadcrumbsDivider"),FI=Ee()({name:"VBreadcrumbsDivider",props:J6(),setup(i,e){let{slots:t}=e;return _e(()=>{var n;return b("li",{class:["v-breadcrumbs-divider",i.class],style:i.style},[((n=t==null?void 0:t.default)==null?void 0:n.call(t))??i.divider])}),{}}}),eY=fe({active:Boolean,activeClass:String,activeColor:String,color:String,disabled:Boolean,title:String,...Ve(),...hf(),...lt({tag:"li"})},"VBreadcrumbsItem"),NI=Ee()({name:"VBreadcrumbsItem",props:eY(),setup(i,e){let{slots:t,attrs:n}=e;const s=df(i,n),o=z(()=>{var c;return i.active||((c=s.isActive)==null?void 0:c.value)}),r=z(()=>o.value?i.activeColor:i.color),{textColorClasses:a,textColorStyles:l}=cn(r);return _e(()=>b(i.tag,{class:["v-breadcrumbs-item",{"v-breadcrumbs-item--active":o.value,"v-breadcrumbs-item--disabled":i.disabled,[`${i.activeClass}`]:o.value&&i.activeClass},a.value,i.class],style:[l.value,i.style],"aria-current":o.value?"page":void 0},{default:()=>{var c,u;return[s.isLink.value?b("a",{class:"v-breadcrumbs-item--link",href:s.href.value,"aria-current":o.value?"page":void 0,onClick:s.navigate},[((u=t.default)==null?void 0:u.call(t))??i.title]):((c=t.default)==null?void 0:c.call(t))??i.title]}})),{}}}),tY=fe({activeClass:String,activeColor:String,bgColor:String,color:String,disabled:Boolean,divider:{type:String,default:"/"},icon:tt,items:{type:Array,default:()=>[]},...Ve(),...Mi(),...Zt(),...lt({tag:"ul"})},"VBreadcrumbs"),iY=Ee()({name:"VBreadcrumbs",props:tY(),setup(i,e){let{slots:t}=e;const{backgroundColorClasses:n,backgroundColorStyles:s}=di(Se(i,"bgColor")),{densityClasses:o}=fn(i),{roundedClasses:r}=ni(i);Ci({VBreadcrumbsDivider:{divider:Se(i,"divider")},VBreadcrumbsItem:{activeClass:Se(i,"activeClass"),activeColor:Se(i,"activeColor"),color:Se(i,"color"),disabled:Se(i,"disabled")}});const a=z(()=>i.items.map(l=>typeof l=="string"?{item:{title:l},raw:l}:{item:l,raw:l}));return _e(()=>{const l=!!(t.prepend||i.icon);return b(i.tag,{class:["v-breadcrumbs",n.value,o.value,r.value,i.class],style:[s.value,i.style]},{default:()=>{var c;return[l&&b("li",{key:"prepend",class:"v-breadcrumbs__prepend"},[t.prepend?b(Nt,{key:"prepend-defaults",disabled:!i.icon,defaults:{VIcon:{icon:i.icon,start:!0}}},t.prepend):b(Gt,{key:"prepend-icon",start:!0,icon:i.icon},null)]),a.value.map((u,d,h)=>{let{item:f,raw:g}=u;return b(He,null,[b(NI,Ie({key:f.title,disabled:d>=h.length-1},f),{default:t.title?()=>{var p;return(p=t.title)==null?void 0:p.call(t,{item:g,index:d})}:void 0}),d<h.length-1&&b(FI,null,{default:t.divider?()=>{var p;return(p=t.divider)==null?void 0:p.call(t,{item:g,index:d})}:void 0})])}),(c=t.default)==null?void 0:c.call(t)]}})}),{}}});const kI=Ee()({name:"VCardActions",props:Ve(),setup(i,e){let{slots:t}=e;return Ci({VBtn:{variant:"text"}}),_e(()=>{var n;return b("div",{class:["v-card-actions",i.class],style:i.style},[(n=t.default)==null?void 0:n.call(t)])}),{}}}),VI=fo("v-card-subtitle"),GI=fo("v-card-title"),nY=fe({appendAvatar:String,appendIcon:tt,prependAvatar:String,prependIcon:tt,subtitle:String,title:String,...Ve(),...Mi()},"VCardItem"),HI=Ee()({name:"VCardItem",props:nY(),setup(i,e){let{slots:t}=e;return _e(()=>{var c;const n=!!(i.prependAvatar||i.prependIcon),s=!!(n||t.prepend),o=!!(i.appendAvatar||i.appendIcon),r=!!(o||t.append),a=!!(i.title||t.title),l=!!(i.subtitle||t.subtitle);return b("div",{class:["v-card-item",i.class],style:i.style},[s&&b("div",{key:"prepend",class:"v-card-item__prepend"},[t.prepend?b(Nt,{key:"prepend-defaults",disabled:!n,defaults:{VAvatar:{density:i.density,icon:i.prependIcon,image:i.prependAvatar}}},t.prepend):n&&b(ua,{key:"prepend-avatar",density:i.density,icon:i.prependIcon,image:i.prependAvatar},null)]),b("div",{class:"v-card-item__content"},[a&&b(GI,{key:"title"},{default:()=>{var u;return[((u=t.title)==null?void 0:u.call(t))??i.title]}}),l&&b(VI,{key:"subtitle"},{default:()=>{var u;return[((u=t.subtitle)==null?void 0:u.call(t))??i.subtitle]}}),(c=t.default)==null?void 0:c.call(t)]),r&&b("div",{key:"append",class:"v-card-item__append"},[t.append?b(Nt,{key:"append-defaults",disabled:!o,defaults:{VAvatar:{density:i.density,icon:i.appendIcon,image:i.appendAvatar}}},t.append):o&&b(ua,{key:"append-avatar",density:i.density,icon:i.appendIcon,image:i.appendAvatar},null)])])}),{}}}),BI=fo("v-card-text"),sY=fe({appendAvatar:String,appendIcon:tt,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:tt,ripple:{type:[Boolean,Object],default:!0},subtitle:String,text:String,title:String,...us(),...Ve(),...Mi(),...Vs(),...Li(),...Fm(),...Oa(),...Ru(),...Zt(),...hf(),...lt(),...St(),...ks({variant:"elevated"})},"VCard"),oY=Ee()({name:"VCard",directives:{Ripple:Ia},props:sY(),setup(i,e){let{attrs:t,slots:n}=e;const{themeClasses:s}=Pt(i),{borderClasses:o}=Ns(i),{colorClasses:r,colorStyles:a,variantClasses:l}=Wl(i),{densityClasses:c}=fn(i),{dimensionStyles:u}=Gs(i),{elevationClasses:d}=Yi(i),{loaderClasses:h}=uf(i),{locationStyles:f}=Pa(i),{positionClasses:g}=Tu(i),{roundedClasses:p}=ni(i),v=df(i,t),y=z(()=>i.link!==!1&&v.isLink.value),C=z(()=>!i.disabled&&i.link!==!1&&(i.link||v.isClickable.value));return _e(()=>{const m=y.value?"a":i.tag,w=!!(n.title||i.title),E=!!(n.subtitle||i.subtitle),R=w||E,O=!!(n.append||i.appendAvatar||i.appendIcon),A=!!(n.prepend||i.prependAvatar||i.prependIcon),D=!!(n.image||i.image),L=R||A||O,S=!!(n.text||i.text);return Mt(b(m,{class:["v-card",{"v-card--disabled":i.disabled,"v-card--flat":i.flat,"v-card--hover":i.hover&&!(i.disabled||i.flat),"v-card--link":C.value},s.value,o.value,r.value,c.value,d.value,h.value,g.value,p.value,l.value,i.class],style:[a.value,u.value,f.value,i.style],href:v.href.value,onClick:C.value&&v.navigate,tabindex:i.disabled?-1:void 0},{default:()=>{var x;return[D&&b("div",{key:"image",class:"v-card__image"},[n.image?b(Nt,{key:"image-defaults",disabled:!i.image,defaults:{VImg:{cover:!0,src:i.image}}},n.image):b(Sl,{key:"image-img",cover:!0,src:i.image},null)]),b(Nm,{name:"v-card",active:!!i.loading,color:typeof i.loading=="boolean"?void 0:i.loading},{default:n.loader}),L&&b(HI,{key:"item",prependAvatar:i.prependAvatar,prependIcon:i.prependIcon,title:i.title,subtitle:i.subtitle,appendAvatar:i.appendAvatar,appendIcon:i.appendIcon},{default:n.item,prepend:n.prepend,title:n.title,subtitle:n.subtitle,append:n.append}),S&&b(BI,{key:"text"},{default:()=>{var T;return[((T=n.text)==null?void 0:T.call(n))??i.text]}}),(x=n.default)==null?void 0:x.call(n),n.actions&&b(kI,null,{default:n.actions}),Bl(C.value,"v-card")]}}),[[Vi("ripple"),C.value&&i.ripple]])}),{}}});const rY=i=>{const{touchstartX:e,touchendX:t,touchstartY:n,touchendY:s}=i,o=.5,r=16;i.offsetX=t-e,i.offsetY=s-n,Math.abs(i.offsetY)<o*Math.abs(i.offsetX)&&(i.left&&t<e-r&&i.left(i),i.right&&t>e+r&&i.right(i)),Math.abs(i.offsetX)<o*Math.abs(i.offsetY)&&(i.up&&s<n-r&&i.up(i),i.down&&s>n+r&&i.down(i))};function aY(i,e){var n;const t=i.changedTouches[0];e.touchstartX=t.clientX,e.touchstartY=t.clientY,(n=e.start)==null||n.call(e,{originalEvent:i,...e})}function lY(i,e){var n;const t=i.changedTouches[0];e.touchendX=t.clientX,e.touchendY=t.clientY,(n=e.end)==null||n.call(e,{originalEvent:i,...e}),rY(e)}function cY(i,e){var n;const t=i.changedTouches[0];e.touchmoveX=t.clientX,e.touchmoveY=t.clientY,(n=e.move)==null||n.call(e,{originalEvent:i,...e})}function uY(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:i.left,right:i.right,up:i.up,down:i.down,start:i.start,move:i.move,end:i.end};return{touchstart:t=>aY(t,e),touchend:t=>lY(t,e),touchmove:t=>cY(t,e)}}function dY(i,e){var a;const t=e.value,n=t!=null&&t.parent?i.parentElement:i,s=(t==null?void 0:t.options)??{passive:!0},o=(a=e.instance)==null?void 0:a.$.uid;if(!n||!o)return;const r=uY(e.value);n._touchHandlers=n._touchHandlers??Object.create(null),n._touchHandlers[o]=r,MD(r).forEach(l=>{n.addEventListener(l,r[l],s)})}function hY(i,e){var o,r;const t=(o=e.value)!=null&&o.parent?i.parentElement:i,n=(r=e.instance)==null?void 0:r.$.uid;if(!(t!=null&&t._touchHandlers)||!n)return;const s=t._touchHandlers[n];MD(s).forEach(a=>{t.removeEventListener(a,s[a])}),delete t._touchHandlers[n]}const qS={mounted:dY,unmounted:hY},WI=Symbol.for("vuetify:v-window"),UI=Symbol.for("vuetify:v-window-group"),jI=fe({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:i=>typeof i=="boolean"||i==="hover"},touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{default:"force"},...Ve(),...lt(),...St()},"VWindow"),jy=Ee()({name:"VWindow",directives:{Touch:qS},props:jI(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{isRtl:s}=Bi(),{t:o}=Rn(),r=Ul(i,UI),a=Te(),l=z(()=>s.value?!i.reverse:i.reverse),c=Fe(!1),u=z(()=>{const w=i.direction==="vertical"?"y":"x",R=(l.value?!c.value:c.value)?"-reverse":"";return`v-window-${w}${R}-transition`}),d=Fe(0),h=Te(void 0),f=z(()=>r.items.value.findIndex(w=>r.selected.value.includes(w.id)));Le(f,(w,E)=>{const R=r.items.value.length,O=R-1;R<=2?c.value=w<E:w===O&&E===0?c.value=!0:w===0&&E===O?c.value=!1:c.value=w<E}),Ht(WI,{transition:u,isReversed:c,transitionCount:d,transitionHeight:h,rootRef:a});const g=z(()=>i.continuous||f.value!==0),p=z(()=>i.continuous||f.value!==r.items.value.length-1);function v(){g.value&&r.prev()}function y(){p.value&&r.next()}const C=z(()=>{const w=[],E={icon:s.value?i.nextIcon:i.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:r.prev,ariaLabel:o("$vuetify.carousel.prev")};w.push(g.value?t.prev?t.prev({props:E}):b(pi,E,null):b("div",null,null));const R={icon:s.value?i.prevIcon:i.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:r.next,ariaLabel:o("$vuetify.carousel.next")};return w.push(p.value?t.next?t.next({props:R}):b(pi,R,null):b("div",null,null)),w}),m=z(()=>i.touch===!1?i.touch:{...{left:()=>{l.value?v():y()},right:()=>{l.value?y():v()},start:E=>{let{originalEvent:R}=E;R.stopPropagation()}},...i.touch===!0?{}:i.touch});return _e(()=>Mt(b(i.tag,{ref:a,class:["v-window",{"v-window--show-arrows-on-hover":i.showArrows==="hover"},n.value,i.class],style:i.style},{default:()=>{var w,E;return[b("div",{class:"v-window__container",style:{height:h.value}},[(w=t.default)==null?void 0:w.call(t,{group:r}),i.showArrows!==!1&&b("div",{class:"v-window__controls"},[C.value])]),(E=t.additional)==null?void 0:E.call(t,{group:r})]}}),[[Vi("touch"),m.value]])),{group:r}}}),fY=fe({color:String,cycle:Boolean,delimiterIcon:{type:tt,default:"$delimiter"},height:{type:[Number,String],default:500},hideDelimiters:Boolean,hideDelimiterBackground:Boolean,interval:{type:[Number,String],default:6e3,validator:i=>Number(i)>0},progress:[Boolean,String],verticalDelimiters:[Boolean,String],...jI({continuous:!0,mandatory:"force",showArrows:!0})},"VCarousel"),pY=Ee()({name:"VCarousel",props:fY(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{t:s}=Rn(),o=Te();let r=-1;Le(n,l),Le(()=>i.interval,l),Le(()=>i.cycle,c=>{c?l():window.clearTimeout(r)}),Pi(a);function a(){!i.cycle||!o.value||(r=window.setTimeout(o.value.group.next,+i.interval>0?+i.interval:6e3))}function l(){window.clearTimeout(r),window.requestAnimationFrame(a)}return _e(()=>{const[c]=jy.filterProps(i);return b(jy,Ie({ref:o},c,{modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,class:["v-carousel",{"v-carousel--hide-delimiter-background":i.hideDelimiterBackground,"v-carousel--vertical-delimiters":i.verticalDelimiters},i.class],style:[{height:ke(i.height)},i.style]}),{default:t.default,additional:u=>{let{group:d}=u;return b(He,null,[!i.hideDelimiters&&b("div",{class:"v-carousel__controls",style:{left:i.verticalDelimiters==="left"&&i.verticalDelimiters?0:"auto",right:i.verticalDelimiters==="right"?0:"auto"}},[d.items.value.length>0&&b(Nt,{defaults:{VBtn:{color:i.color,icon:i.delimiterIcon,size:"x-small",variant:"text"}},scoped:!0},{default:()=>[d.items.value.map((h,f)=>{const g={id:`carousel-item-${h.id}`,"aria-label":s("$vuetify.carousel.ariaLabel.delimiter",f+1,d.items.value.length),class:[d.isSelected(h.id)&&"v-btn--active"],onClick:()=>d.select(h.id,!0)};return t.item?t.item({props:g,item:h}):b(pi,Ie(h,g),null)})]})]),i.progress&&b(fS,{class:"v-carousel__progress",color:typeof i.progress=="string"?i.progress:void 0,modelValue:(d.getItemIndex(n.value)+1)/d.items.value.length*100},null)])},prev:t.prev,next:t.next})}),{}}}),$I=fe({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ve(),...Su(),...jm()},"VWindowItem"),$y=Ee()({name:"VWindowItem",directives:{Touch:qS},props:$I(),emits:{"group:selected":i=>!0},setup(i,e){let{slots:t}=e;const n=ct(WI),s=Eu(i,UI),{isBooted:o}=jl();if(!n||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const r=Fe(!1),a=z(()=>o.value&&(n.isReversed.value?i.reverseTransition!==!1:i.transition!==!1));function l(){!r.value||!n||(r.value=!1,n.transitionCount.value>0&&(n.transitionCount.value-=1,n.transitionCount.value===0&&(n.transitionHeight.value=void 0)))}function c(){var g;r.value||!n||(r.value=!0,n.transitionCount.value===0&&(n.transitionHeight.value=ke((g=n.rootRef.value)==null?void 0:g.clientHeight)),n.transitionCount.value+=1)}function u(){l()}function d(g){r.value&&Wt(()=>{!a.value||!r.value||!n||(n.transitionHeight.value=ke(g.clientHeight))})}const h=z(()=>{const g=n.isReversed.value?i.reverseTransition:i.transition;return a.value?{name:typeof g!="string"?n.transition.value:g,onBeforeEnter:c,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onAfterLeave:l,onLeaveCancelled:u,onEnter:d}:!1}),{hasContent:f}=bS(i,s.isSelected);return _e(()=>b(Xs,{transition:h.value,disabled:!o.value},{default:()=>{var g;return[Mt(b("div",{class:["v-window-item",s.selectedClass.value,i.class],style:i.style},[f.value&&((g=t.default)==null?void 0:g.call(t))]),[[Ps,s.isSelected.value]])]}})),{}}}),gY=fe({...EO(),...$I()},"VCarouselItem"),mY=Ee()({name:"VCarouselItem",inheritAttrs:!1,props:gY(),setup(i,e){let{slots:t,attrs:n}=e;_e(()=>{const[s]=Sl.filterProps(i),[o]=$y.filterProps(i);return b($y,Ie({class:"v-carousel-item"},o),{default:()=>[b(Sl,Ie(n,s),t)]})})}});const vY=fo("v-code");const CY=fe({color:{type:Object},disabled:Boolean,dotSize:{type:[Number,String],default:10},height:{type:[Number,String],default:150},width:{type:[Number,String],default:300},...Ve()},"VColorPickerCanvas"),yY=cs({name:"VColorPickerCanvas",props:CY(),emits:{"update:color":i=>!0,"update:position":i=>!0},setup(i,e){let{emit:t}=e;const n=Fe(!1),s=Fe(!1),o=Te({x:0,y:0}),r=z(()=>{const{x:y,y:C}=o.value,m=parseInt(i.dotSize,10)/2;return{width:ke(i.dotSize),height:ke(i.dotSize),transform:`translate(${ke(y-m)}, ${ke(C-m)})`}}),a=Te(),l=Fe(parseFloat(i.width)),c=Fe(parseFloat(i.height)),{resizeRef:u}=Bo(y=>{var w;if(!((w=u.value)!=null&&w.offsetParent))return;const{width:C,height:m}=y[0].contentRect;l.value=C,c.value=m});function d(y,C,m){const{left:w,top:E,width:R,height:O}=m;o.value={x:Ai(y-w,0,R),y:Ai(C-E,0,O)}}function h(y){i.disabled||!a.value||d(y.clientX,y.clientY,a.value.getBoundingClientRect())}function f(y){y.preventDefault(),!i.disabled&&(n.value=!0,window.addEventListener("mousemove",g),window.addEventListener("mouseup",p),window.addEventListener("touchmove",g),window.addEventListener("touchend",p))}function g(y){if(i.disabled||!a.value)return;n.value=!0;const C=aB(y);d(C.clientX,C.clientY,a.value.getBoundingClientRect())}function p(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",p),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",p)}Le(o,()=>{var m,w;if(s.value){s.value=!1;return}if(!a.value)return;const{x:y,y:C}=o.value;t("update:color",{h:((m=i.color)==null?void 0:m.h)??0,s:Ai(y,0,l.value)/l.value,v:1-Ai(C,0,c.value)/c.value,a:((w=i.color)==null?void 0:w.a)??1})});function v(){var E;if(!a.value)return;const y=a.value,C=y.getContext("2d");if(!C)return;const m=C.createLinearGradient(0,0,y.width,0);m.addColorStop(0,"hsla(0, 0%, 100%, 1)"),m.addColorStop(1,`hsla(${((E=i.color)==null?void 0:E.h)??0}, 100%, 50%, 1)`),C.fillStyle=m,C.fillRect(0,0,y.width,y.height);const w=C.createLinearGradient(0,0,0,y.height);w.addColorStop(0,"hsla(0, 0%, 100%, 0)"),w.addColorStop(1,"hsla(0, 0%, 0%, 1)"),C.fillStyle=w,C.fillRect(0,0,y.width,y.height)}return Le(()=>{var y;return(y=i.color)==null?void 0:y.h},v,{immediate:!0}),Le(()=>[l.value,c.value],(y,C)=>{v(),o.value={x:o.value.x*y[0]/C[0],y:o.value.y*y[1]/C[1]}},{flush:"post"}),Le(()=>i.color,()=>{if(n.value){n.value=!1;return}s.value=!0,o.value=i.color?{x:i.color.s*l.value,y:(1-i.color.v)*c.value}:{x:0,y:0}},{deep:!0,immediate:!0}),Pi(()=>v()),_e(()=>b("div",{ref:u,class:["v-color-picker-canvas",i.class],style:i.style,onClick:h,onMousedown:f,onTouchstart:f},[b("canvas",{ref:a,width:l.value,height:c.value},null),i.color&&b("div",{class:["v-color-picker-canvas__dot",{"v-color-picker-canvas__dot--disabled":i.disabled}],style:r.value},null)])),{}}});function bY(i,e){if(e){const{a:t,...n}=i;return n}return i}function wY(i,e){if(e==null||typeof e=="string"){const t=zD(i);return i.a===1?t.slice(0,7):t}if(typeof e=="object"){let t;return Ja(e,["r","g","b"])?t=gr(i):Ja(e,["h","s","l"])?t=BD(i):Ja(e,["h","s","v"])&&(t=i),bY(t,!Ja(e,["a"])&&i.a===1)}return i}const _d={h:0,s:0,v:1,a:1},zy={inputProps:{type:"number",min:0},inputs:[{label:"R",max:255,step:1,getValue:i=>Math.round(i.r),getColor:(i,e)=>({...i,r:Number(e)})},{label:"G",max:255,step:1,getValue:i=>Math.round(i.g),getColor:(i,e)=>({...i,g:Number(e)})},{label:"B",max:255,step:1,getValue:i=>Math.round(i.b),getColor:(i,e)=>({...i,b:Number(e)})},{label:"A",max:1,step:.01,getValue:i=>{let{a:e}=i;return e!=null?Math.round(e*100)/100:1},getColor:(i,e)=>({...i,a:Number(e)})}],to:gr,from:Mm};var Z0;const SY={...zy,inputs:(Z0=zy.inputs)==null?void 0:Z0.slice(0,3)},Ky={inputProps:{type:"number",min:0},inputs:[{label:"H",max:360,step:1,getValue:i=>Math.round(i.h),getColor:(i,e)=>({...i,h:Number(e)})},{label:"S",max:1,step:.01,getValue:i=>Math.round(i.s*100)/100,getColor:(i,e)=>({...i,s:Number(e)})},{label:"L",max:1,step:.01,getValue:i=>Math.round(i.l*100)/100,getColor:(i,e)=>({...i,l:Number(e)})},{label:"A",max:1,step:.01,getValue:i=>{let{a:e}=i;return e!=null?Math.round(e*100)/100:1},getColor:(i,e)=>({...i,a:Number(e)})}],to:BD,from:iS},EY={...Ky,inputs:Ky.inputs.slice(0,3)},zI={inputProps:{type:"text"},inputs:[{label:"HEXA",getValue:i=>i,getColor:(i,e)=>e}],to:zD,from:bB},_Y={...zI,inputs:[{label:"HEX",getValue:i=>i.slice(0,7),getColor:(i,e)=>e}]},pl={rgb:SY,rgba:zy,hsl:EY,hsla:Ky,hex:_Y,hexa:zI},RY=i=>{let{label:e,...t}=i;return b("div",{class:"v-color-picker-edit__input"},[b("input",t,null),b("span",null,[e])])},TY=fe({color:Object,disabled:Boolean,mode:{type:String,default:"rgba",validator:i=>Object.keys(pl).includes(i)},modes:{type:Array,default:()=>Object.keys(pl),validator:i=>Array.isArray(i)&&i.every(e=>Object.keys(pl).includes(e))},...Ve()},"VColorPickerEdit"),xY=cs({name:"VColorPickerEdit",props:TY(),emits:{"update:color":i=>!0,"update:mode":i=>!0},setup(i,e){let{emit:t}=e;const n=z(()=>i.modes.map(o=>({...pl[o],name:o}))),s=z(()=>{var a;const o=n.value.find(l=>l.name===i.mode);if(!o)return[];const r=i.color?o.to(i.color):null;return(a=o.inputs)==null?void 0:a.map(l=>{let{getValue:c,getColor:u,...d}=l;return{...o.inputProps,...d,disabled:i.disabled,value:r&&c(r),onChange:h=>{const f=h.target;f&&t("update:color",o.from(u(r??_d,f.value)))}}})});return _e(()=>{var o;return b("div",{class:["v-color-picker-edit",i.class],style:i.style},[(o=s.value)==null?void 0:o.map(r=>b(RY,r,null)),n.value.length>1&&b(pi,{icon:"$unfold",size:"x-small",variant:"plain",onClick:()=>{const r=n.value.findIndex(a=>a.name===i.mode);t("update:mode",n.value[(r+1)%n.value.length].name)}},null)])}),{}}});const XS=Symbol.for("vuetify:v-slider");function Yy(i,e,t){const n=t==="vertical",s=e.getBoundingClientRect(),o="touches"in i?i.touches[0]:i;return n?o.clientY-(s.top+s.height/2):o.clientX-(s.left+s.width/2)}function AY(i,e){return"touches"in i&&i.touches.length?i.touches[0][e]:"changedTouches"in i&&i.changedTouches.length?i.changedTouches[0][e]:i[e]}const KI=fe({disabled:{type:Boolean,default:null},error:Boolean,readonly:{type:Boolean,default:null},max:{type:[Number,String],default:100},min:{type:[Number,String],default:0},step:{type:[Number,String],default:0},thumbColor:String,thumbLabel:{type:[Boolean,String],default:void 0,validator:i=>typeof i=="boolean"||i==="always"},thumbSize:{type:[Number,String],default:20},showTicks:{type:[Boolean,String],default:!1,validator:i=>typeof i=="boolean"||i==="always"},ticks:{type:[Array,Object]},tickSize:{type:[Number,String],default:2},color:String,trackColor:String,trackFillColor:String,trackSize:{type:[Number,String],default:4},direction:{type:String,default:"horizontal",validator:i=>["vertical","horizontal"].includes(i)},reverse:Boolean,...Zt(),...Li({elevation:2})},"Slider"),YI=i=>{const e=z(()=>parseFloat(i.min)),t=z(()=>parseFloat(i.max)),n=z(()=>+i.step>0?parseFloat(i.step):0),s=z(()=>Math.max(__(n.value),__(e.value)));function o(r){if(n.value<=0)return r;const a=Ai(r,e.value,t.value),l=e.value%n.value,c=Math.round((a-l)/n.value)*n.value+l;return parseFloat(Math.min(c,t.value).toFixed(s.value))}return{min:e,max:t,step:n,decimals:s,roundValue:o}},qI=i=>{let{props:e,steps:t,onSliderStart:n,onSliderMove:s,onSliderEnd:o,getActiveThumb:r}=i;const{isRtl:a}=Bi(),l=Se(e,"reverse"),c=z(()=>{let re=a.value?"rtl":"ltr";return e.reverse&&(re=re==="rtl"?"ltr":"rtl"),re}),{min:u,max:d,step:h,decimals:f,roundValue:g}=t,p=z(()=>parseInt(e.thumbSize,10)),v=z(()=>parseInt(e.tickSize,10)),y=z(()=>parseInt(e.trackSize,10)),C=z(()=>(d.value-u.value)/h.value),m=Se(e,"disabled"),w=z(()=>e.direction==="vertical"),E=z(()=>e.error||e.disabled?void 0:e.thumbColor??e.color),R=z(()=>e.error||e.disabled?void 0:e.trackColor??e.color),O=z(()=>e.error||e.disabled?void 0:e.trackFillColor??e.color),A=Fe(!1),D=Fe(0),L=Te(),S=Te();function x(re){var X;const K=e.direction==="vertical",he=K?"top":"left",ne=K?"height":"width",ie=K?"clientY":"clientX",{[he]:ee,[ne]:j}=(X=L.value)==null?void 0:X.$el.getBoundingClientRect(),M=AY(re,ie);let B=Math.min(Math.max((M-ee-D.value)/j,0),1)||0;return(K||c.value==="rtl")&&(B=1-B),g(u.value+B*(d.value-u.value))}const T=re=>{o({value:x(re)}),A.value=!1,D.value=0},H=re=>{S.value=r(re),S.value&&(S.value.focus(),A.value=!0,S.value.contains(re.target)?D.value=Yy(re,S.value,e.direction):(D.value=0,s({value:x(re)})),n({value:x(re)}))},Y={passive:!0,capture:!0};function Q(re){s({value:x(re)})}function te(re){re.stopPropagation(),re.preventDefault(),T(re),window.removeEventListener("mousemove",Q,Y),window.removeEventListener("mouseup",te)}function F(re){var K;T(re),window.removeEventListener("touchmove",Q,Y),(K=re.target)==null||K.removeEventListener("touchend",F)}function k(re){var K;H(re),window.addEventListener("touchmove",Q,Y),(K=re.target)==null||K.addEventListener("touchend",F,{passive:!1})}function q(re){re.preventDefault(),H(re),window.addEventListener("mousemove",Q,Y),window.addEventListener("mouseup",te,{passive:!1})}const V=re=>{const K=(re-u.value)/(d.value-u.value)*100;return Ai(isNaN(K)?0:K,0,100)},J=Se(e,"showTicks"),ae=z(()=>J.value?e.ticks?Array.isArray(e.ticks)?e.ticks.map(re=>({value:re,position:V(re),label:re.toString()})):Object.keys(e.ticks).map(re=>({value:parseFloat(re),position:V(parseFloat(re)),label:e.ticks[re]})):C.value!==1/0?qs(C.value+1).map(re=>{const K=u.value+re*h.value;return{value:K,position:V(K)}}):[]:[]),se=z(()=>ae.value.some(re=>{let{label:K}=re;return!!K})),ce={activeThumbRef:S,color:Se(e,"color"),decimals:f,disabled:m,direction:Se(e,"direction"),elevation:Se(e,"elevation"),hasLabels:se,horizontalDirection:c,isReversed:l,min:u,max:d,mousePressed:A,numTicks:C,onSliderMousedown:q,onSliderTouchstart:k,parsedTicks:ae,parseMouseMove:x,position:V,readonly:Se(e,"readonly"),rounded:Se(e,"rounded"),roundValue:g,showTicks:J,startOffset:D,step:h,thumbSize:p,thumbColor:E,thumbLabel:Se(e,"thumbLabel"),ticks:Se(e,"ticks"),tickSize:v,trackColor:R,trackContainerRef:L,trackFillColor:O,trackSize:y,vertical:w};return Ht(XS,ce),ce},DY=fe({focused:Boolean,max:{type:Number,required:!0},min:{type:Number,required:!0},modelValue:{type:Number,required:!0},position:{type:Number,required:!0},ripple:{type:[Boolean,Object],default:!0},...Ve()},"VSliderThumb"),qy=Ee()({name:"VSliderThumb",directives:{Ripple:Ia},props:DY(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t,emit:n}=e;const s=ct(XS),{rtlClasses:o}=Bi();if(!s)throw new Error("[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider");const{thumbColor:r,step:a,vertical:l,disabled:c,thumbSize:u,thumbLabel:d,direction:h,readonly:f,elevation:g,isReversed:p,horizontalDirection:v,mousePressed:y,decimals:C}=s,{textColorClasses:m,textColorStyles:w}=cn(r),{pageup:E,pagedown:R,end:O,home:A,left:D,right:L,down:S,up:x}=ay,T=[E,R,O,A,D,L,S,x],H=z(()=>a.value?[1,2,3]:[1,5,10]);function Y(te,F){if(!T.includes(te.key))return;te.preventDefault();const k=a.value||.1,q=(i.max-i.min)/k;if([D,L,S,x].includes(te.key)){const J=(v.value==="rtl"?[D,x]:[L,x]).includes(te.key)?1:-1,ae=te.shiftKey?2:te.ctrlKey?1:0;F=F+J*k*H.value[ae]}else if(te.key===A)F=i.min;else if(te.key===O)F=i.max;else{const V=te.key===R?1:-1;F=F-V*k*(q>100?q/10:10)}return Math.max(i.min,Math.min(i.max,F))}function Q(te){const F=Y(te,i.modelValue);F!=null&&n("update:modelValue",F)}return _e(()=>{const te=ke(l.value||p.value?100-i.position:i.position,"%"),{elevationClasses:F}=Yi(z(()=>c.value?void 0:g.value));return b("div",{class:["v-slider-thumb",{"v-slider-thumb--focused":i.focused,"v-slider-thumb--pressed":i.focused&&y.value},i.class,o.value],style:[{"--v-slider-thumb-position":te,"--v-slider-thumb-size":ke(u.value)},i.style],role:"slider",tabindex:c.value?-1:0,"aria-valuemin":i.min,"aria-valuemax":i.max,"aria-valuenow":i.modelValue,"aria-readonly":!!f.value,"aria-orientation":h.value,onKeydown:f.value?void 0:Q},[b("div",{class:["v-slider-thumb__surface",m.value,F.value],style:{...w.value}},null),Mt(b("div",{class:["v-slider-thumb__ripple",m.value],style:w.value},null),[[Vi("ripple"),i.ripple,null,{circle:!0,center:!0}]]),b(hO,{origin:"bottom center"},{default:()=>{var k;return[Mt(b("div",{class:"v-slider-thumb__label-container"},[b("div",{class:["v-slider-thumb__label"]},[b("div",null,[((k=t["thumb-label"])==null?void 0:k.call(t,{modelValue:i.modelValue}))??i.modelValue.toFixed(a.value?C.value:1)])])]),[[Ps,d.value&&i.focused||d.value==="always"]])]}})])}),{}}});const OY=fe({start:{type:Number,required:!0},stop:{type:Number,required:!0},...Ve()},"VSliderTrack"),XI=Ee()({name:"VSliderTrack",props:OY(),emits:{},setup(i,e){let{slots:t}=e;const n=ct(XS);if(!n)throw new Error("[Vuetify] v-slider-track must be inside v-slider or v-range-slider");const{color:s,horizontalDirection:o,parsedTicks:r,rounded:a,showTicks:l,tickSize:c,trackColor:u,trackFillColor:d,trackSize:h,vertical:f,min:g,max:p}=n,{roundedClasses:v}=ni(a),{backgroundColorClasses:y,backgroundColorStyles:C}=di(d),{backgroundColorClasses:m,backgroundColorStyles:w}=di(u),E=z(()=>`inset-${f.value?"block-end":"inline-start"}`),R=z(()=>f.value?"height":"width"),O=z(()=>({[E.value]:"0%",[R.value]:"100%"})),A=z(()=>i.stop-i.start),D=z(()=>({[E.value]:ke(i.start,"%"),[R.value]:ke(A.value,"%")})),L=z(()=>l.value?(f.value?r.value.slice().reverse():r.value).map((x,T)=>{var Q;const H=f.value?"bottom":"margin-inline-start",Y=x.value!==g.value&&x.value!==p.value?ke(x.position,"%"):void 0;return b("div",{key:x.value,class:["v-slider-track__tick",{"v-slider-track__tick--filled":x.position>=i.start&&x.position<=i.stop,"v-slider-track__tick--first":x.value===g.value,"v-slider-track__tick--last":x.value===p.value}],style:{[H]:Y}},[(x.label||t["tick-label"])&&b("div",{class:"v-slider-track__tick-label"},[((Q=t["tick-label"])==null?void 0:Q.call(t,{tick:x,index:T}))??x.label])])}):[]);return _e(()=>b("div",{class:["v-slider-track",v.value,i.class],style:[{"--v-slider-track-size":ke(h.value),"--v-slider-tick-size":ke(c.value),direction:f.value?void 0:o.value},i.style]},[b("div",{class:["v-slider-track__background",m.value,{"v-slider-track__background--opacity":!!s.value||!d.value}],style:{...O.value,...w.value}},null),b("div",{class:["v-slider-track__fill",y.value],style:{...D.value,...C.value}},null),l.value&&b("div",{class:["v-slider-track__ticks",{"v-slider-track__ticks--always-show":l.value==="always"}]},[L.value])])),{}}}),PY=fe({...Hm(),...KI(),...Pr(),modelValue:{type:[Number,String],default:0}},"VSlider"),Xy=Ee()({name:"VSlider",props:PY(),emits:{"update:focused":i=>!0,"update:modelValue":i=>!0,start:i=>!0,end:i=>!0},setup(i,e){let{slots:t,emit:n}=e;const s=Te(),{rtlClasses:o}=Bi(),r=YI(i),a=Ke(i,"modelValue",void 0,R=>{const O=typeof R=="string"?parseFloat(R):R??r.min.value;return r.roundValue(O)}),{min:l,max:c,mousePressed:u,roundValue:d,onSliderMousedown:h,onSliderTouchstart:f,trackContainerRef:g,position:p,hasLabels:v,readonly:y}=qI({props:i,steps:r,onSliderStart:()=>{n("start",a.value)},onSliderEnd:R=>{let{value:O}=R;const A=d(O);a.value=A,n("end",A)},onSliderMove:R=>{let{value:O}=R;return a.value=d(O)},getActiveThumb:()=>{var R;return(R=s.value)==null?void 0:R.$el}}),{isFocused:C,focus:m,blur:w}=Ma(i),E=z(()=>p(a.value));return _e(()=>{const[R,O]=$i.filterProps(i),A=!!(i.label||t.label||t.prepend);return b($i,Ie({class:["v-slider",{"v-slider--has-labels":!!t["tick-label"]||v.value,"v-slider--focused":C.value,"v-slider--pressed":u.value,"v-slider--disabled":i.disabled},o.value,i.class],style:i.style},R,{focused:C.value}),{...t,prepend:A?D=>{var L,S;return b(He,null,[((L=t.label)==null?void 0:L.call(t,D))??i.label?b(xu,{id:D.id.value,class:"v-slider__label",text:i.label},null):void 0,(S=t.prepend)==null?void 0:S.call(t,D)])}:void 0,default:D=>{let{id:L,messagesId:S}=D;return b("div",{class:"v-slider__container",onMousedown:y.value?void 0:h,onTouchstartPassive:y.value?void 0:f},[b("input",{id:L.value,name:i.name||L.value,disabled:!!i.disabled,readonly:!!i.readonly,tabindex:"-1",value:a.value},null),b(XI,{ref:g,start:0,stop:E.value},{"tick-label":t["tick-label"]}),b(qy,{ref:s,"aria-describedby":S.value,focused:C.value,min:l.value,max:c.value,modelValue:a.value,"onUpdate:modelValue":x=>a.value=x,position:E.value,elevation:i.elevation,onFocus:m,onBlur:w},{"thumb-label":t["thumb-label"]})])}})}),{}}}),IY=fe({color:{type:Object},disabled:Boolean,hideAlpha:Boolean,...Ve()},"VColorPickerPreview"),MY=cs({name:"VColorPickerPreview",props:IY(),emits:{"update:color":i=>!0},setup(i,e){let{emit:t}=e;return _e(()=>{var n,s;return b("div",{class:["v-color-picker-preview",{"v-color-picker-preview--hide-alpha":i.hideAlpha},i.class],style:i.style},[b("div",{class:"v-color-picker-preview__dot"},[b("div",{style:{background:UD(i.color??_d)}},null)]),b("div",{class:"v-color-picker-preview__sliders"},[b(Xy,{class:"v-color-picker-preview__track v-color-picker-preview__hue",modelValue:(n=i.color)==null?void 0:n.h,"onUpdate:modelValue":o=>t("update:color",{...i.color??_d,h:o}),step:0,min:0,max:360,disabled:i.disabled,thumbSize:14,trackSize:8,trackFillColor:"white",hideDetails:!0},null),!i.hideAlpha&&b(Xy,{class:"v-color-picker-preview__track v-color-picker-preview__alpha",modelValue:((s=i.color)==null?void 0:s.a)??1,"onUpdate:modelValue":o=>t("update:color",{...i.color??_d,a:o}),step:1/256,min:0,max:1,disabled:i.disabled,thumbSize:14,trackSize:8,trackFillColor:"white",hideDetails:!0},null)])])}),{}}});const LY=Object.freeze({base:"#f44336",lighten5:"#ffebee",lighten4:"#ffcdd2",lighten3:"#ef9a9a",lighten2:"#e57373",lighten1:"#ef5350",darken1:"#e53935",darken2:"#d32f2f",darken3:"#c62828",darken4:"#b71c1c",accent1:"#ff8a80",accent2:"#ff5252",accent3:"#ff1744",accent4:"#d50000"}),FY=Object.freeze({base:"#e91e63",lighten5:"#fce4ec",lighten4:"#f8bbd0",lighten3:"#f48fb1",lighten2:"#f06292",lighten1:"#ec407a",darken1:"#d81b60",darken2:"#c2185b",darken3:"#ad1457",darken4:"#880e4f",accent1:"#ff80ab",accent2:"#ff4081",accent3:"#f50057",accent4:"#c51162"}),NY=Object.freeze({base:"#9c27b0",lighten5:"#f3e5f5",lighten4:"#e1bee7",lighten3:"#ce93d8",lighten2:"#ba68c8",lighten1:"#ab47bc",darken1:"#8e24aa",darken2:"#7b1fa2",darken3:"#6a1b9a",darken4:"#4a148c",accent1:"#ea80fc",accent2:"#e040fb",accent3:"#d500f9",accent4:"#aa00ff"}),kY=Object.freeze({base:"#673ab7",lighten5:"#ede7f6",lighten4:"#d1c4e9",lighten3:"#b39ddb",lighten2:"#9575cd",lighten1:"#7e57c2",darken1:"#5e35b1",darken2:"#512da8",darken3:"#4527a0",darken4:"#311b92",accent1:"#b388ff",accent2:"#7c4dff",accent3:"#651fff",accent4:"#6200ea"}),VY=Object.freeze({base:"#3f51b5",lighten5:"#e8eaf6",lighten4:"#c5cae9",lighten3:"#9fa8da",lighten2:"#7986cb",lighten1:"#5c6bc0",darken1:"#3949ab",darken2:"#303f9f",darken3:"#283593",darken4:"#1a237e",accent1:"#8c9eff",accent2:"#536dfe",accent3:"#3d5afe",accent4:"#304ffe"}),GY=Object.freeze({base:"#2196f3",lighten5:"#e3f2fd",lighten4:"#bbdefb",lighten3:"#90caf9",lighten2:"#64b5f6",lighten1:"#42a5f5",darken1:"#1e88e5",darken2:"#1976d2",darken3:"#1565c0",darken4:"#0d47a1",accent1:"#82b1ff",accent2:"#448aff",accent3:"#2979ff",accent4:"#2962ff"}),HY=Object.freeze({base:"#03a9f4",lighten5:"#e1f5fe",lighten4:"#b3e5fc",lighten3:"#81d4fa",lighten2:"#4fc3f7",lighten1:"#29b6f6",darken1:"#039be5",darken2:"#0288d1",darken3:"#0277bd",darken4:"#01579b",accent1:"#80d8ff",accent2:"#40c4ff",accent3:"#00b0ff",accent4:"#0091ea"}),BY=Object.freeze({base:"#00bcd4",lighten5:"#e0f7fa",lighten4:"#b2ebf2",lighten3:"#80deea",lighten2:"#4dd0e1",lighten1:"#26c6da",darken1:"#00acc1",darken2:"#0097a7",darken3:"#00838f",darken4:"#006064",accent1:"#84ffff",accent2:"#18ffff",accent3:"#00e5ff",accent4:"#00b8d4"}),WY=Object.freeze({base:"#009688",lighten5:"#e0f2f1",lighten4:"#b2dfdb",lighten3:"#80cbc4",lighten2:"#4db6ac",lighten1:"#26a69a",darken1:"#00897b",darken2:"#00796b",darken3:"#00695c",darken4:"#004d40",accent1:"#a7ffeb",accent2:"#64ffda",accent3:"#1de9b6",accent4:"#00bfa5"}),UY=Object.freeze({base:"#4caf50",lighten5:"#e8f5e9",lighten4:"#c8e6c9",lighten3:"#a5d6a7",lighten2:"#81c784",lighten1:"#66bb6a",darken1:"#43a047",darken2:"#388e3c",darken3:"#2e7d32",darken4:"#1b5e20",accent1:"#b9f6ca",accent2:"#69f0ae",accent3:"#00e676",accent4:"#00c853"}),jY=Object.freeze({base:"#8bc34a",lighten5:"#f1f8e9",lighten4:"#dcedc8",lighten3:"#c5e1a5",lighten2:"#aed581",lighten1:"#9ccc65",darken1:"#7cb342",darken2:"#689f38",darken3:"#558b2f",darken4:"#33691e",accent1:"#ccff90",accent2:"#b2ff59",accent3:"#76ff03",accent4:"#64dd17"}),$Y=Object.freeze({base:"#cddc39",lighten5:"#f9fbe7",lighten4:"#f0f4c3",lighten3:"#e6ee9c",lighten2:"#dce775",lighten1:"#d4e157",darken1:"#c0ca33",darken2:"#afb42b",darken3:"#9e9d24",darken4:"#827717",accent1:"#f4ff81",accent2:"#eeff41",accent3:"#c6ff00",accent4:"#aeea00"}),zY=Object.freeze({base:"#ffeb3b",lighten5:"#fffde7",lighten4:"#fff9c4",lighten3:"#fff59d",lighten2:"#fff176",lighten1:"#ffee58",darken1:"#fdd835",darken2:"#fbc02d",darken3:"#f9a825",darken4:"#f57f17",accent1:"#ffff8d",accent2:"#ffff00",accent3:"#ffea00",accent4:"#ffd600"}),KY=Object.freeze({base:"#ffc107",lighten5:"#fff8e1",lighten4:"#ffecb3",lighten3:"#ffe082",lighten2:"#ffd54f",lighten1:"#ffca28",darken1:"#ffb300",darken2:"#ffa000",darken3:"#ff8f00",darken4:"#ff6f00",accent1:"#ffe57f",accent2:"#ffd740",accent3:"#ffc400",accent4:"#ffab00"}),YY=Object.freeze({base:"#ff9800",lighten5:"#fff3e0",lighten4:"#ffe0b2",lighten3:"#ffcc80",lighten2:"#ffb74d",lighten1:"#ffa726",darken1:"#fb8c00",darken2:"#f57c00",darken3:"#ef6c00",darken4:"#e65100",accent1:"#ffd180",accent2:"#ffab40",accent3:"#ff9100",accent4:"#ff6d00"}),qY=Object.freeze({base:"#ff5722",lighten5:"#fbe9e7",lighten4:"#ffccbc",lighten3:"#ffab91",lighten2:"#ff8a65",lighten1:"#ff7043",darken1:"#f4511e",darken2:"#e64a19",darken3:"#d84315",darken4:"#bf360c",accent1:"#ff9e80",accent2:"#ff6e40",accent3:"#ff3d00",accent4:"#dd2c00"}),XY=Object.freeze({base:"#795548",lighten5:"#efebe9",lighten4:"#d7ccc8",lighten3:"#bcaaa4",lighten2:"#a1887f",lighten1:"#8d6e63",darken1:"#6d4c41",darken2:"#5d4037",darken3:"#4e342e",darken4:"#3e2723"}),QY=Object.freeze({base:"#607d8b",lighten5:"#eceff1",lighten4:"#cfd8dc",lighten3:"#b0bec5",lighten2:"#90a4ae",lighten1:"#78909c",darken1:"#546e7a",darken2:"#455a64",darken3:"#37474f",darken4:"#263238"}),ZY=Object.freeze({base:"#9e9e9e",lighten5:"#fafafa",lighten4:"#f5f5f5",lighten3:"#eeeeee",lighten2:"#e0e0e0",lighten1:"#bdbdbd",darken1:"#757575",darken2:"#616161",darken3:"#424242",darken4:"#212121"}),JY=Object.freeze({black:"#000000",white:"#ffffff",transparent:"#ffffff00"}),eq=Object.freeze({red:LY,pink:FY,purple:NY,deepPurple:kY,indigo:VY,blue:GY,lightBlue:HY,cyan:BY,teal:WY,green:UY,lightGreen:jY,lime:$Y,yellow:zY,amber:KY,orange:YY,deepOrange:qY,brown:XY,blueGrey:QY,grey:ZY,shades:JY}),tq=fe({swatches:{type:Array,default:()=>iq(eq)},disabled:Boolean,color:Object,maxHeight:[Number,String],...Ve()},"VColorPickerSwatches");function iq(i){return Object.keys(i).map(e=>{const t=i[e];return t.base?[t.base,t.darken4,t.darken3,t.darken2,t.darken1,t.lighten1,t.lighten2,t.lighten3,t.lighten4,t.lighten5]:[t.black,t.white,t.transparent]})}const nq=cs({name:"VColorPickerSwatches",props:tq(),emits:{"update:color":i=>!0},setup(i,e){let{emit:t}=e;return _e(()=>b("div",{class:["v-color-picker-swatches",i.class],style:[{maxHeight:ke(i.maxHeight)},i.style]},[b("div",null,[i.swatches.map(n=>b("div",{class:"v-color-picker-swatches__swatch"},[n.map(s=>{const o=rr(s),r=Mm(o),a=WD(o);return b("div",{class:"v-color-picker-swatches__color",onClick:()=>r&&t("update:color",r)},[b("div",{style:{background:a}},[i.color&&Da(i.color,r)?b(Gt,{size:"x-small",icon:"$success",color:_B(s,"#FFFFFF")>2?"white":"black"},null):void 0])])})]))])])),{}}});const QI=fe({color:String,...us(),...Ve(),...Vs(),...Li(),...Oa(),...Ru(),...Zt(),...lt(),...St()},"VSheet"),Qy=Ee()({name:"VSheet",props:QI(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{backgroundColorClasses:s,backgroundColorStyles:o}=di(Se(i,"color")),{borderClasses:r}=Ns(i),{dimensionStyles:a}=Gs(i),{elevationClasses:l}=Yi(i),{locationStyles:c}=Pa(i),{positionClasses:u}=Tu(i),{roundedClasses:d}=ni(i);return _e(()=>b(i.tag,{class:["v-sheet",n.value,s.value,r.value,l.value,u.value,d.value,i.class],style:[o.value,a.value,c.value,i.style]},t)),{}}}),sq=fe({canvasHeight:{type:[String,Number],default:150},disabled:Boolean,dotSize:{type:[Number,String],default:10},hideCanvas:Boolean,hideSliders:Boolean,hideInputs:Boolean,mode:{type:String,default:"rgba",validator:i=>Object.keys(pl).includes(i)},modes:{type:Array,default:()=>Object.keys(pl),validator:i=>Array.isArray(i)&&i.every(e=>Object.keys(pl).includes(e))},showSwatches:Boolean,swatches:Array,swatchesMaxHeight:{type:[Number,String],default:150},modelValue:{type:[Object,String]},...qo(QI({width:300}),["height","location","minHeight","maxHeight","minWidth","maxWidth"])},"VColorPicker"),oq=cs({name:"VColorPicker",props:sq(),emits:{"update:modelValue":i=>!0,"update:mode":i=>!0},setup(i){const e=Ke(i,"mode"),t=Te(null),n=Ke(i,"modelValue",void 0,r=>{if(r==null||r==="")return null;let a;try{a=Mm(rr(r))}catch{return null}return t.value&&(a={...a,h:t.value.h},t.value=null),a},r=>r?wY(r,i.modelValue):null),{rtlClasses:s}=Bi(),o=r=>{n.value=r,t.value=r};return Pi(()=>{i.modes.includes(e.value)||(e.value=i.modes[0])}),Ci({VSlider:{color:void 0,trackColor:void 0,trackFillColor:void 0}}),_e(()=>{const[r]=Qy.filterProps(i);return b(Qy,Ie({rounded:i.rounded,elevation:i.elevation,theme:i.theme,class:["v-color-picker",s.value,i.class],style:[{"--v-color-picker-color-hsv":UD({...n.value??_d,a:1})},i.style]},r,{maxWidth:i.width}),{default:()=>[!i.hideCanvas&&b(yY,{key:"canvas",color:n.value,"onUpdate:color":o,disabled:i.disabled,dotSize:i.dotSize,width:i.width,height:i.canvasHeight},null),(!i.hideSliders||!i.hideInputs)&&b("div",{key:"controls",class:"v-color-picker__controls"},[!i.hideSliders&&b(MY,{key:"preview",color:n.value,"onUpdate:color":o,hideAlpha:!e.value.endsWith("a"),disabled:i.disabled},null),!i.hideInputs&&b(xY,{key:"edit",modes:i.modes,mode:e.value,"onUpdate:mode":a=>e.value=a,color:n.value,"onUpdate:color":o,disabled:i.disabled},null)]),i.showSwatches&&b(nq,{key:"swatches",color:n.value,"onUpdate:color":o,maxHeight:i.swatchesMaxHeight,swatches:i.swatches,disabled:i.disabled},null)]})}),{}}});function rq(i,e,t){if(e==null)return i;if(Array.isArray(e))throw new Error("Multiple matches is not implemented");return typeof e=="number"&&~e?b(He,null,[b("span",{class:"v-combobox__unmask"},[i.substr(0,e)]),b("span",{class:"v-combobox__mask"},[i.substr(e,t)]),b("span",{class:"v-combobox__unmask"},[i.substr(e+t)])]):i}const aq=fe({autoSelectFirst:{type:[Boolean,String]},delimiters:Array,...RS({filterKeys:["title"]}),...ES({hideNoData:!0,returnObject:!0}),...qo(Ym({modelValue:null}),["validationValue","dirty","appendInnerIcon"]),...Or({transition:!1})},"VCombobox"),lq=Ee()({name:"VCombobox",props:aq(),emits:{"update:focused":i=>!0,"update:modelValue":i=>!0,"update:search":i=>!0,"update:menu":i=>!0},setup(i,e){var he;let{emit:t,slots:n}=e;const{t:s}=Rn(),o=Te(),r=Fe(!1),a=Fe(!0),l=Te(!1),c=Te(),u=Ke(i,"menu"),d=z({get:()=>u.value,set:ne=>{var ie;u.value&&!ne&&((ie=c.value)!=null&&ie.ΨopenChildren)||(u.value=ne)}}),h=Fe(-1);let f=!1;const g=z(()=>{var ne;return(ne=o.value)==null?void 0:ne.color}),{items:p,transformIn:v,transformOut:y}=yS(i),{textColorClasses:C,textColorStyles:m}=cn(g),w=Ke(i,"modelValue",[],ne=>v(In(ne)),ne=>{const ie=y(ne);return i.multiple?ie:ie[0]??null}),E=Bm(),R=Fe(i.multiple?"":((he=w.value[0])==null?void 0:he.title)??""),O=z({get:()=>R.value,set:ne=>{var ie;if(R.value=ne,i.multiple||(w.value=[hc(i,ne)]),ne&&i.multiple&&((ie=i.delimiters)!=null&&ie.length)){const ee=ne.split(new RegExp(`(?:${i.delimiters.join("|")})+`));ee.length>1&&(ee.forEach(j=>{j=j.trim(),j&&se(hc(i,j))}),R.value="")}ne||(h.value=-1),a.value=!ne}});Le(R,ne=>{f?Wt(()=>f=!1):r.value&&!d.value&&(d.value=!0),t("update:search",ne)}),Le(w,ne=>{var ie;i.multiple||(R.value=((ie=ne[0])==null?void 0:ie.title)??"")});const{filteredItems:A,getMatches:D}=TS(i,p,()=>a.value?"":O.value),L=z(()=>w.value.map(ne=>p.value.find(ie=>i.valueComparator(ie.value,ne.value))||ne)),S=z(()=>i.hideSelected?A.value.filter(ne=>!L.value.some(ie=>ie.value===ne.value)):A.value),x=z(()=>L.value.map(ne=>ne.props.value)),T=z(()=>L.value[h.value]),H=z(()=>{var ie;return(i.autoSelectFirst===!0||i.autoSelectFirst==="exact"&&O.value===((ie=S.value[0])==null?void 0:ie.title))&&S.value.length>0&&!a.value&&!l.value}),Y=z(()=>i.hideNoData&&!p.value.length||i.readonly||(E==null?void 0:E.isReadonly.value)),Q=Te(),{onListScroll:te,onListKeydown:F}=SS(Q,o);function k(ne){f=!0,i.openOnClear&&(d.value=!0)}function q(){Y.value||(d.value=!0)}function V(ne){Y.value||(r.value&&(ne.preventDefault(),ne.stopPropagation()),d.value=!d.value)}function J(ne){var j;if(i.readonly||E!=null&&E.isReadonly.value)return;const ie=o.value.selectionStart,ee=x.value.length;if((h.value>-1||["Enter","ArrowDown","ArrowUp"].includes(ne.key))&&ne.preventDefault(),["Enter","ArrowDown"].includes(ne.key)&&(d.value=!0),["Escape"].includes(ne.key)&&(d.value=!1),["Enter","Escape","Tab"].includes(ne.key)&&(H.value&&["Enter","Tab"].includes(ne.key)&&se(A.value[0]),a.value=!0),ne.key==="ArrowDown"&&H.value&&((j=Q.value)==null||j.focus("next")),!!i.multiple){if(["Backspace","Delete"].includes(ne.key)){if(h.value<0){ne.key==="Backspace"&&!O.value&&(h.value=ee-1);return}const M=h.value;T.value&&se(T.value),h.value=M>=ee-1?ee-2:M}if(ne.key==="ArrowLeft"){if(h.value<0&&ie>0)return;const M=h.value>-1?h.value-1:ee-1;L.value[M]?h.value=M:(h.value=-1,o.value.setSelectionRange(O.value.length,O.value.length))}if(ne.key==="ArrowRight"){if(h.value<0)return;const M=h.value+1;L.value[M]?h.value=M:(h.value=-1,o.value.setSelectionRange(0,0))}ne.key==="Enter"&&O.value&&(se(hc(i,O.value)),O.value="")}}function ae(){var ne;r.value&&(a.value=!0,(ne=o.value)==null||ne.focus())}function se(ne){if(i.multiple){const ie=x.value.findIndex(ee=>i.valueComparator(ee,ne.value));if(ie===-1)w.value=[...w.value,ne];else{const ee=[...w.value];ee.splice(ie,1),w.value=ee}O.value=""}else w.value=[ne],R.value=ne.title,Wt(()=>{d.value=!1,a.value=!0})}function ce(ne){r.value=!0,setTimeout(()=>{l.value=!0})}function re(ne){l.value=!1}function K(ne){(ne==null||ne===""&&!i.multiple)&&(w.value=[])}return Le(A,ne=>{!ne.length&&i.hideNoData&&(d.value=!1)}),Le(r,(ne,ie)=>{ne||ne===ie||(h.value=-1,d.value=!1,H.value&&!l.value&&!L.value.some(ee=>{let{value:j}=ee;return j===S.value[0].value})?se(S.value[0]):i.multiple&&O.value&&(w.value=[...w.value,hc(i,O.value)],O.value=""))}),_e(()=>{const ne=!!(i.chips||n.chip),ie=!!(!i.hideNoData||S.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),ee=w.value.length>0,[j]=El.filterProps(i);return b(El,Ie({ref:o},j,{modelValue:O.value,"onUpdate:modelValue":[M=>O.value=M,K],focused:r.value,"onUpdate:focused":M=>r.value=M,validationValue:w.externalValue,dirty:ee,class:["v-combobox",{"v-combobox--active-menu":d.value,"v-combobox--chips":!!i.chips,"v-combobox--selection-slot":!!n.selection,"v-combobox--selecting-index":h.value>-1,[`v-combobox--${i.multiple?"multiple":"single"}`]:!0},i.class],style:i.style,readonly:i.readonly,placeholder:ee?void 0:i.placeholder,"onClick:clear":k,"onMousedown:control":q,onKeydown:J}),{...n,default:()=>b(He,null,[b($m,Ie({ref:c,modelValue:d.value,"onUpdate:modelValue":M=>d.value=M,activator:"parent",contentClass:"v-combobox__content",disabled:Y.value,eager:i.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:i.transition,onAfterLeave:ae},i.menuProps),{default:()=>[ie&&b(Wm,{ref:Q,selected:x.value,selectStrategy:i.multiple?"independent":"single-independent",onMousedown:M=>M.preventDefault(),onKeydown:F,onFocusin:ce,onFocusout:re,onScrollPassive:te,tabindex:"-1"},{default:()=>{var M,B,X;return[(M=n["prepend-item"])==null?void 0:M.call(n),!S.value.length&&!i.hideNoData&&(((B=n["no-data"])==null?void 0:B.call(n))??b(Cr,{title:s(i.noDataText)},null)),b(qm,{renderless:!0,items:S.value},{default:Z=>{var _;let{item:ue,index:G,itemRef:U}=Z;const I=Ie(ue.props,{ref:U,key:G,active:H.value&&G===0?!0:void 0,onClick:()=>se(ue)});return((_=n.item)==null?void 0:_.call(n,{item:ue,index:G,props:I}))??b(Cr,I,{prepend:P=>{let{isSelected:$}=P;return b(He,null,[i.multiple&&!i.hideSelected?b(vr,{key:ue.value,modelValue:$,ripple:!1,tabindex:"-1"},null):void 0,ue.props.prependIcon&&b(Gt,{icon:ue.props.prependIcon},null)])},title:()=>{var P,$;return a.value?ue.title:rq(ue.title,(P=D(ue))==null?void 0:P.title,(($=O.value)==null?void 0:$.length)??0)}})}}),(X=n["append-item"])==null?void 0:X.call(n)]}})]}),L.value.map((M,B)=>{var ue;function X(G){G.stopPropagation(),G.preventDefault(),se(M)}const Z={"onClick:close":X,onMousedown(G){G.preventDefault(),G.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0};return b("div",{key:M.value,class:["v-combobox__selection",B===h.value&&["v-combobox__selection--selected",C.value]],style:B===h.value?m.value:{}},[ne?n.chip?b(Nt,{key:"chip-defaults",defaults:{VChip:{closable:i.closableChips,size:"small",text:M.title}}},{default:()=>{var G;return[(G=n.chip)==null?void 0:G.call(n,{item:M,index:B,props:Z})]}}):b(pf,Ie({key:"chip",closable:i.closableChips,size:"small",text:M.title},Z),null):((ue=n.selection)==null?void 0:ue.call(n,{item:M,index:B}))??b("span",{class:"v-combobox__selection-text"},[M.title,i.multiple&&B<L.value.length-1&&b("span",{class:"v-combobox__selection-comma"},[De(",")])])])})]),"append-inner":function(){var Z;for(var M=arguments.length,B=new Array(M),X=0;X<M;X++)B[X]=arguments[X];return b(He,null,[(Z=n["append-inner"])==null?void 0:Z.call(n,...B),(!i.hideNoData||i.items.length)&&i.menuIcon?b(Gt,{class:"v-combobox__menu-icon",icon:i.menuIcon,onMousedown:V,onClick:ND},null):void 0])}})}),po({isFocused:r,isPristine:a,menu:d,search:O,selectionIndex:h,filteredItems:A,select:se},o)}});const cq=fe({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...gf({origin:"center center",scrollStrategy:"block",transition:{component:km},zIndex:2400})},"VDialog"),uq=Ee()({name:"VDialog",props:cq(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{scopeId:s}=Au(),o=Te();function r(l){var d,h;const c=l.relatedTarget,u=l.target;if(c!==u&&((d=o.value)!=null&&d.contentEl)&&((h=o.value)!=null&&h.globalTop)&&![document,o.value.contentEl].includes(u)&&!o.value.contentEl.contains(u)){const f=Jw(o.value.contentEl);if(!f.length)return;const g=f[0],p=f[f.length-1];c===g?p.focus():g.focus()}}yi&&Le(()=>n.value&&i.retainFocus,l=>{l?document.addEventListener("focusin",r):document.removeEventListener("focusin",r)},{immediate:!0}),Le(n,async l=>{var c,u;await Wt(),l?(c=o.value.contentEl)==null||c.focus({preventScroll:!0}):(u=o.value.activatorEl)==null||u.focus({preventScroll:!0})});const a=z(()=>Ie({"aria-haspopup":"dialog","aria-expanded":String(n.value)},i.activatorProps));return _e(()=>{const[l]=yr.filterProps(i);return b(yr,Ie({ref:o,class:["v-dialog",{"v-dialog--fullscreen":i.fullscreen,"v-dialog--scrollable":i.scrollable},i.class],style:i.style},l,{modelValue:n.value,"onUpdate:modelValue":c=>n.value=c,"aria-modal":"true",activatorProps:a.value,role:"dialog"},s),{activator:t.activator,default:function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return b(Nt,{root:"VDialog"},{default:()=>{var h;return[(h=t.default)==null?void 0:h.call(t,...u)]}})}})}),po({},o)}});const Ch=Symbol.for("vuetify:v-expansion-panel"),dq=["default","accordion","inset","popout"],hq=fe({color:String,variant:{type:String,default:"default",validator:i=>dq.includes(i)},readonly:Boolean,...Ve(),...wu(),...lt(),...St()},"VExpansionPanels"),fq=Ee()({name:"VExpansionPanels",props:hq(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;Ul(i,Ch);const{themeClasses:n}=Pt(i),s=z(()=>i.variant&&`v-expansion-panels--variant-${i.variant}`);return Ci({VExpansionPanel:{color:Se(i,"color")},VExpansionPanelTitle:{readonly:Se(i,"readonly")}}),_e(()=>b(i.tag,{class:["v-expansion-panels",n.value,s.value,i.class],style:i.style},t)),{}}}),pq=fe({...Ve(),...jm()},"VExpansionPanelText"),ZI=Ee()({name:"VExpansionPanelText",props:pq(),setup(i,e){let{slots:t}=e;const n=ct(Ch);if(!n)throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");const{hasContent:s,onAfterLeave:o}=bS(i,n.isSelected);return _e(()=>b(Vm,{onAfterLeave:o},{default:()=>{var r;return[Mt(b("div",{class:["v-expansion-panel-text",i.class],style:i.style},[t.default&&s.value&&b("div",{class:"v-expansion-panel-text__wrapper"},[(r=t.default)==null?void 0:r.call(t)])]),[[Ps,n.isSelected.value]])]}})),{}}}),JI=fe({color:String,expandIcon:{type:tt,default:"$expand"},collapseIcon:{type:tt,default:"$collapse"},hideActions:Boolean,ripple:{type:[Boolean,Object],default:!1},readonly:Boolean,...Ve()},"VExpansionPanelTitle"),eM=Ee()({name:"VExpansionPanelTitle",directives:{Ripple:Ia},props:JI(),setup(i,e){let{slots:t}=e;const n=ct(Ch);if(!n)throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");const{backgroundColorClasses:s,backgroundColorStyles:o}=di(i,"color"),r=z(()=>({collapseIcon:i.collapseIcon,disabled:n.disabled.value,expanded:n.isSelected.value,expandIcon:i.expandIcon,readonly:i.readonly}));return _e(()=>{var a;return Mt(b("button",{class:["v-expansion-panel-title",{"v-expansion-panel-title--active":n.isSelected.value},s.value,i.class],style:[o.value,i.style],type:"button",tabindex:n.disabled.value?-1:void 0,disabled:n.disabled.value,"aria-expanded":n.isSelected.value,onClick:i.readonly?void 0:n.toggle},[b("span",{class:"v-expansion-panel-title__overlay"},null),(a=t.default)==null?void 0:a.call(t,r.value),!i.hideActions&&b("span",{class:"v-expansion-panel-title__icon"},[t.actions?t.actions(r.value):b(Gt,{icon:n.isSelected.value?i.collapseIcon:i.expandIcon},null)])]),[[Vi("ripple"),i.ripple]])}),{}}}),gq=fe({title:String,text:String,bgColor:String,...Ve(),...Li(),...Su(),...jm(),...Zt(),...lt(),...JI()},"VExpansionPanel"),mq=Ee()({name:"VExpansionPanel",props:gq(),emits:{"group:selected":i=>!0},setup(i,e){let{slots:t}=e;const n=Eu(i,Ch),{backgroundColorClasses:s,backgroundColorStyles:o}=di(i,"bgColor"),{elevationClasses:r}=Yi(i),{roundedClasses:a}=ni(i),l=z(()=>(n==null?void 0:n.disabled.value)||i.disabled),c=z(()=>n.group.items.value.reduce((h,f,g)=>(n.group.selected.value.includes(f.id)&&h.push(g),h),[])),u=z(()=>{const h=n.group.items.value.findIndex(f=>f.id===n.id);return!n.isSelected.value&&c.value.some(f=>f-h===1)}),d=z(()=>{const h=n.group.items.value.findIndex(f=>f.id===n.id);return!n.isSelected.value&&c.value.some(f=>f-h===-1)});return Ht(Ch,n),_e(()=>{const h=!!(t.text||i.text),f=!!(t.title||i.title);return b(i.tag,{class:["v-expansion-panel",{"v-expansion-panel--active":n.isSelected.value,"v-expansion-panel--before-active":u.value,"v-expansion-panel--after-active":d.value,"v-expansion-panel--disabled":l.value},a.value,s.value,i.class],style:[o.value,i.style]},{default:()=>{var g;return[b("div",{class:["v-expansion-panel__shadow",...r.value]},null),f&&b(eM,{key:"title",collapseIcon:i.collapseIcon,color:i.color,expandIcon:i.expandIcon,hideActions:i.hideActions,ripple:i.ripple},{default:()=>[t.title?t.title():i.title]}),h&&b(ZI,{key:"text",eager:i.eager},{default:()=>[t.text?t.text():i.text]}),(g=t.default)==null?void 0:g.call(t)]}})}),{}}});const vq=fe({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},multiple:Boolean,showSize:{type:[Boolean,Number],default:!1,validator:i=>typeof i=="boolean"||[1e3,1024].includes(i)},...Pr({prependIcon:"$file"}),modelValue:{type:Array,default:()=>[],validator:i=>In(i).every(e=>e!=null&&typeof e=="object")},...Km({clearable:!0})},"VFileInput"),Cq=Ee()({name:"VFileInput",inheritAttrs:!1,props:vq(),emits:{"click:control":i=>!0,"mousedown:control":i=>!0,"update:focused":i=>!0,"update:modelValue":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const{t:o}=Rn(),r=Ke(i,"modelValue"),{isFocused:a,focus:l,blur:c}=Ma(i),u=z(()=>typeof i.showSize!="boolean"?i.showSize:void 0),d=z(()=>(r.value??[]).reduce((D,L)=>{let{size:S=0}=L;return D+S},0)),h=z(()=>T_(d.value,u.value)),f=z(()=>(r.value??[]).map(D=>{const{name:L="",size:S=0}=D;return i.showSize?`${L} (${T_(S,u.value)})`:L})),g=z(()=>{var L;const D=((L=r.value)==null?void 0:L.length)??0;return i.showSize?o(i.counterSizeString,D,h.value):o(i.counterString,D)}),p=Te(),v=Te(),y=Te(),C=z(()=>a.value||i.active),m=z(()=>["plain","underlined"].includes(i.variant));function w(){var D;y.value!==document.activeElement&&((D=y.value)==null||D.focus()),a.value||l()}function E(D){O(D)}function R(D){n("mousedown:control",D)}function O(D){var L;(L=y.value)==null||L.click(),n("click:control",D)}function A(D){D.stopPropagation(),w(),Wt(()=>{r.value=[],Zw(i["onClick:clear"],D)})}return Le(r,D=>{(!Array.isArray(D)||!D.length)&&y.value&&(y.value.value="")}),_e(()=>{const D=!!(s.counter||i.counter),L=!!(D||s.details),[S,x]=Hl(t),[{modelValue:T,...H}]=$i.filterProps(i),[Y]=wS(i);return b($i,Ie({ref:p,modelValue:r.value,"onUpdate:modelValue":Q=>r.value=Q,class:["v-file-input",{"v-text-field--plain-underlined":m.value},i.class],style:i.style,"onClick:prepend":E},S,H,{centerAffix:!m.value,focused:a.value}),{...s,default:Q=>{let{id:te,isDisabled:F,isDirty:k,isReadonly:q,isValid:V}=Q;return b(mf,Ie({ref:v,"prepend-icon":i.prependIcon,onMousedown:R,onClick:O,"onClick:clear":A,"onClick:prependInner":i["onClick:prependInner"],"onClick:appendInner":i["onClick:appendInner"]},Y,{id:te.value,active:C.value||k.value,dirty:k.value,disabled:F.value,focused:a.value,error:V.value===!1}),{...s,default:J=>{var ce;let{props:{class:ae,...se}}=J;return b(He,null,[b("input",Ie({ref:y,type:"file",readonly:q.value,disabled:F.value,multiple:i.multiple,name:i.name,onClick:re=>{re.stopPropagation(),w()},onChange:re=>{if(!re.target)return;const K=re.target;r.value=[...K.files??[]]},onFocus:w,onBlur:c},se,x),null),b("div",{class:ae},[!!((ce=r.value)!=null&&ce.length)&&(s.selection?s.selection({fileNames:f.value,totalBytes:d.value,totalBytesReadable:h.value}):i.chips?f.value.map(re=>b(pf,{key:re,size:"small",color:i.color},{default:()=>[re]})):f.value.join(", "))])])}})},details:L?Q=>{var te,F;return b(He,null,[(te=s.details)==null?void 0:te.call(s,Q),D&&b(He,null,[b("span",null,null),b(zm,{active:!!((F=r.value)!=null&&F.length),value:g.value},s.counter)])])}:void 0})}),po({},p,v,y)}});const yq=fe({app:Boolean,color:String,height:{type:[Number,String],default:"auto"},...us(),...Ve(),...Li(),...Du(),...Zt(),...lt({tag:"footer"}),...St()},"VFooter"),bq=Ee()({name:"VFooter",props:yq(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{backgroundColorClasses:s,backgroundColorStyles:o}=di(Se(i,"color")),{borderClasses:r}=Ns(i),{elevationClasses:a}=Yi(i),{roundedClasses:l}=ni(i),c=Fe(32),{resizeRef:u}=Bo(f=>{f.length&&(c.value=f[0].target.clientHeight)}),d=z(()=>i.height==="auto"?c.value:parseInt(i.height,10)),{layoutItemStyles:h}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:z(()=>"bottom"),layoutSize:d,elementSize:z(()=>i.height==="auto"?void 0:d.value),active:z(()=>i.app),absolute:Se(i,"absolute")});return _e(()=>b(i.tag,{ref:u,class:["v-footer",n.value,s.value,r.value,a.value,l.value,i.class],style:[o.value,i.app?h.value:{height:ke(i.height)},i.style]},t)),{}}}),wq=fe({...Ve(),...GW()},"VForm"),Sq=Ee()({name:"VForm",props:wq(),emits:{"update:modelValue":i=>!0,submit:i=>!0},setup(i,e){let{slots:t,emit:n}=e;const s=HW(i),o=Te();function r(l){l.preventDefault(),s.reset()}function a(l){const c=l,u=s.validate();c.then=u.then.bind(u),c.catch=u.catch.bind(u),c.finally=u.finally.bind(u),n("submit",c),c.defaultPrevented||u.then(d=>{var f;let{valid:h}=d;h&&((f=o.value)==null||f.submit())}),c.preventDefault()}return _e(()=>{var l;return b("form",{ref:o,class:["v-form",i.class],style:i.style,novalidate:!0,onReset:r,onSubmit:a},[(l=t.default)==null?void 0:l.call(t,s)])}),po(s,o)}});const Eq=fe({fluid:{type:Boolean,default:!1},...Ve(),...lt()},"VContainer"),_q=Ee()({name:"VContainer",props:Eq(),setup(i,e){let{slots:t}=e;const{rtlClasses:n}=Bi();return _e(()=>b(i.tag,{class:["v-container",{"v-container--fluid":i.fluid},n.value,i.class],style:i.style},t)),{}}}),tM=(()=>Um.reduce((i,e)=>(i[e]={type:[Boolean,String,Number],default:!1},i),{}))(),iM=(()=>Um.reduce((i,e)=>{const t="offset"+wr(e);return i[t]={type:[String,Number],default:null},i},{}))(),nM=(()=>Um.reduce((i,e)=>{const t="order"+wr(e);return i[t]={type:[String,Number],default:null},i},{}))(),z0={col:Object.keys(tM),offset:Object.keys(iM),order:Object.keys(nM)};function Rq(i,e,t){let n=i;if(!(t==null||t===!1)){if(e){const s=e.replace(i,"");n+=`-${s}`}return i==="col"&&(n="v-"+n),i==="col"&&(t===""||t===!0)||(n+=`-${t}`),n.toLowerCase()}}const Tq=["auto","start","end","center","baseline","stretch"],xq=fe({cols:{type:[Boolean,String,Number],default:!1},...tM,offset:{type:[String,Number],default:null},...iM,order:{type:[String,Number],default:null},...nM,alignSelf:{type:String,default:null,validator:i=>Tq.includes(i)},...Ve(),...lt()},"VCol"),Aq=Ee()({name:"VCol",props:xq(),setup(i,e){let{slots:t}=e;const n=z(()=>{const s=[];let o;for(o in z0)z0[o].forEach(a=>{const l=i[a],c=Rq(o,a,l);c&&s.push(c)});const r=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!r||!i.cols,[`v-col-${i.cols}`]:i.cols,[`offset-${i.offset}`]:i.offset,[`order-${i.order}`]:i.order,[`align-self-${i.alignSelf}`]:i.alignSelf}),s});return()=>{var s;return ts(i.tag,{class:[n.value,i.class],style:i.style},(s=t.default)==null?void 0:s.call(t))}}}),QS=["start","end","center"],sM=["space-between","space-around","space-evenly"];function ZS(i,e){return Um.reduce((t,n)=>{const s=i+wr(n);return t[s]=e(),t},{})}const Dq=[...QS,"baseline","stretch"],oM=i=>Dq.includes(i),rM=ZS("align",()=>({type:String,default:null,validator:oM})),Oq=[...QS,...sM],aM=i=>Oq.includes(i),lM=ZS("justify",()=>({type:String,default:null,validator:aM})),Pq=[...QS,...sM,"stretch"],cM=i=>Pq.includes(i),uM=ZS("alignContent",()=>({type:String,default:null,validator:cM})),K0={align:Object.keys(rM),justify:Object.keys(lM),alignContent:Object.keys(uM)},Iq={align:"align",justify:"justify",alignContent:"align-content"};function Mq(i,e,t){let n=Iq[i];if(t!=null){if(e){const s=e.replace(i,"");n+=`-${s}`}return n+=`-${t}`,n.toLowerCase()}}const Lq=fe({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:oM},...rM,justify:{type:String,default:null,validator:aM},...lM,alignContent:{type:String,default:null,validator:cM},...uM,...Ve(),...lt()},"VRow"),Fq=Ee()({name:"VRow",props:Lq(),setup(i,e){let{slots:t}=e;const n=z(()=>{const s=[];let o;for(o in K0)K0[o].forEach(r=>{const a=i[r],l=Mq(o,r,a);l&&s.push(l)});return s.push({"v-row--no-gutters":i.noGutters,"v-row--dense":i.dense,[`align-${i.align}`]:i.align,[`justify-${i.justify}`]:i.justify,[`align-content-${i.alignContent}`]:i.alignContent}),s});return()=>{var s;return ts(i.tag,{class:["v-row",n.value,i.class],style:i.style},(s=t.default)==null?void 0:s.call(t))}}}),Nq=fo("flex-grow-1","div","VSpacer"),kq=fe({disabled:Boolean,modelValue:{type:Boolean,default:void 0},...BO()},"VHover"),Vq=Ee()({name:"VHover",props:kq(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{runOpenDelay:s,runCloseDelay:o}=WO(i,r=>!i.disabled&&(n.value=r));return()=>{var r;return(r=t.default)==null?void 0:r.call(t,{isHovering:n.value,props:{onMouseenter:s,onMouseleave:o}})}}});const dM=Symbol.for("vuetify:v-item-group"),Gq=fe({...Ve(),...wu({selectedClass:"v-item--selected"}),...lt(),...St()},"VItemGroup"),Hq=Ee()({name:"VItemGroup",props:Gq(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{isSelected:s,select:o,next:r,prev:a,selected:l}=Ul(i,dM);return()=>b(i.tag,{class:["v-item-group",n.value,i.class],style:i.style},{default:()=>{var c;return[(c=t.default)==null?void 0:c.call(t,{isSelected:s,select:o,next:r,prev:a,selected:l.value})]}})}}),Bq=Ee()({name:"VItem",props:Su(),emits:{"group:selected":i=>!0},setup(i,e){let{slots:t}=e;const{isSelected:n,select:s,toggle:o,selectedClass:r,value:a,disabled:l}=Eu(i,dM);return()=>{var c;return(c=t.default)==null?void 0:c.call(t,{isSelected:n.value,selectedClass:r.value,select:s,toggle:o,value:a.value,disabled:l.value})}}});const Wq=fo("v-kbd");const Uq=fe({...Ve(),...tP()},"VLayout"),jq=Ee()({name:"VLayout",props:Uq(),setup(i,e){let{slots:t}=e;const{layoutClasses:n,layoutStyles:s,getLayoutItem:o,items:r,layoutRef:a}=iP(i);return _e(()=>{var l;return b("div",{ref:a,class:[n.value,i.class],style:[s.value,i.style]},[(l=t.default)==null?void 0:l.call(t)])}),{getLayoutItem:o,items:r}}});const $q=fe({position:{type:String,required:!0},size:{type:[Number,String],default:300},modelValue:Boolean,...Ve(),...Du()},"VLayoutItem"),zq=Ee()({name:"VLayoutItem",props:$q(),setup(i,e){let{slots:t}=e;const{layoutItemStyles:n}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:Se(i,"position"),elementSize:Se(i,"size"),layoutSize:Se(i,"size"),active:Se(i,"modelValue"),absolute:Se(i,"absolute")});return()=>{var s;return b("div",{class:["v-layout-item",i.class],style:[n.value,i.style]},[(s=t.default)==null?void 0:s.call(t)])}}}),Kq=fe({modelValue:Boolean,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},...Ve(),...Vs(),...lt(),...Or({transition:"fade-transition"})},"VLazy"),Yq=Ee()({name:"VLazy",directives:{intersect:ff},props:Kq(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{dimensionStyles:n}=Gs(i),s=Ke(i,"modelValue");function o(r){s.value||(s.value=r)}return _e(()=>Mt(b(i.tag,{class:["v-lazy",i.class],style:[n.value,i.style]},{default:()=>[s.value&&b(Xs,{transition:i.transition,appear:!0},{default:()=>{var r;return[(r=t.default)==null?void 0:r.call(t)]}})]}),[[Vi("intersect"),{handler:o,options:i.options},null]])),{}}});const qq=fe({locale:String,fallbackLocale:String,messages:Object,rtl:{type:Boolean,default:void 0},...Ve()},"VLocaleProvider"),Xq=Ee()({name:"VLocaleProvider",props:qq(),setup(i,e){let{slots:t}=e;const{rtlClasses:n}=dW(i);return _e(()=>{var s;return b("div",{class:["v-locale-provider",n.value,i.class],style:i.style},[(s=t.default)==null?void 0:s.call(t)])}),{}}});const Qq=fe({scrollable:Boolean,...Ve(),...lt({tag:"main"})},"VMain"),Zq=Ee()({name:"VMain",props:Qq(),setup(i,e){let{slots:t}=e;const{mainStyles:n}=l2(),{ssrBootStyles:s}=jl();return _e(()=>b(i.tag,{class:["v-main",{"v-main--scrollable":i.scrollable},i.class],style:[n.value,s.value,i.style]},{default:()=>{var o,r;return[i.scrollable?b("div",{class:"v-main__scroller"},[(o=t.default)==null?void 0:o.call(t)]):(r=t.default)==null?void 0:r.call(t)]}})),{}}});function Jq(i){let{rootEl:e,isSticky:t,layoutItemStyles:n}=i;const s=Fe(!1),o=Fe(0),r=z(()=>{const c=typeof s.value=="boolean"?"top":s.value;return[t.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[c]:ke(o.value)}:{top:n.value.top}]});Pi(()=>{Le(t,c=>{c?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),dn(()=>{document.removeEventListener("scroll",l)});let a=0;function l(){const c=a>window.scrollY?"up":"down",u=e.value.getBoundingClientRect(),d=parseFloat(n.value.top??0),h=window.scrollY-Math.max(0,o.value-d),f=u.height+Math.max(o.value,d)-window.scrollY-window.innerHeight,g=parseFloat(getComputedStyle(e.value).getPropertyValue("--v-body-scroll-y"))||0;u.height<window.innerHeight-d?(s.value="top",o.value=d):c==="up"&&s.value==="bottom"||c==="down"&&s.value==="top"?(o.value=window.scrollY+u.top-g,s.value=!0):c==="down"&&f<=0?(o.value=0,s.value="bottom"):c==="up"&&h<=0&&(g?s.value!=="top"&&(o.value=-h+g+d,s.value="top"):(o.value=u.top+h,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:r}}const e7=100,t7=20;function Y0(i){const e=1.41421356237;return(i<0?-1:1)*Math.sqrt(Math.abs(i))*e}function q0(i){if(i.length<2)return 0;if(i.length===2)return i[1].t===i[0].t?0:(i[1].d-i[0].d)/(i[1].t-i[0].t);let e=0;for(let t=i.length-1;t>0;t--){if(i[t].t===i[t-1].t)continue;const n=Y0(e),s=(i[t].d-i[t-1].d)/(i[t].t-i[t-1].t);e+=(s-n)*Math.abs(s),t===i.length-1&&(e*=.5)}return Y0(e)*1e3}function i7(){const i={};function e(s){Array.from(s.changedTouches).forEach(o=>{(i[o.identifier]??(i[o.identifier]=new rB(t7))).push([s.timeStamp,o])})}function t(s){Array.from(s.changedTouches).forEach(o=>{delete i[o.identifier]})}function n(s){var c;const o=(c=i[s])==null?void 0:c.values().reverse();if(!o)throw new Error(`No samples for touch id ${s}`);const r=o[0],a=[],l=[];for(const u of o){if(r[0]-u[0]>e7)break;a.push({t:u[0],d:u[1].clientX}),l.push({t:u[0],d:u[1].clientY})}return{x:q0(a),y:q0(l),get direction(){const{x:u,y:d}=this,[h,f]=[Math.abs(u),Math.abs(d)];return h>f&&u>=0?"right":h>f&&u<=0?"left":f>h&&d>=0?"down":f>h&&d<=0?"up":n7()}}}return{addMovement:e,endTouch:t,getVelocity:n}}function n7(){throw new Error}function s7(i){let{isActive:e,isTemporary:t,width:n,touchless:s,position:o}=i;Pi(()=>{window.addEventListener("touchstart",y,{passive:!0}),window.addEventListener("touchmove",C,{passive:!1}),window.addEventListener("touchend",m,{passive:!0})}),dn(()=>{window.removeEventListener("touchstart",y),window.removeEventListener("touchmove",C),window.removeEventListener("touchend",m)});const r=z(()=>["left","right"].includes(o.value)),{addMovement:a,endTouch:l,getVelocity:c}=i7();let u=!1;const d=Fe(!1),h=Fe(0),f=Fe(0);let g;function p(E,R){return(o.value==="left"?E:o.value==="right"?document.documentElement.clientWidth-E:o.value==="top"?E:o.value==="bottom"?document.documentElement.clientHeight-E:oc())-(R?n.value:0)}function v(E){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const O=o.value==="left"?(E-f.value)/n.value:o.value==="right"?(document.documentElement.clientWidth-E-f.value)/n.value:o.value==="top"?(E-f.value)/n.value:o.value==="bottom"?(document.documentElement.clientHeight-E-f.value)/n.value:oc();return R?Math.max(0,Math.min(1,O)):O}function y(E){if(s.value)return;const R=E.changedTouches[0].clientX,O=E.changedTouches[0].clientY,A=25,D=o.value==="left"?R<A:o.value==="right"?R>document.documentElement.clientWidth-A:o.value==="top"?O<A:o.value==="bottom"?O>document.documentElement.clientHeight-A:oc(),L=e.value&&(o.value==="left"?R<n.value:o.value==="right"?R>document.documentElement.clientWidth-n.value:o.value==="top"?O<n.value:o.value==="bottom"?O>document.documentElement.clientHeight-n.value:oc());(D||L||e.value&&t.value)&&(u=!0,g=[R,O],f.value=p(r.value?R:O,e.value),h.value=v(r.value?R:O),l(E),a(E))}function C(E){const R=E.changedTouches[0].clientX,O=E.changedTouches[0].clientY;if(u){if(!E.cancelable){u=!1;return}const D=Math.abs(R-g[0]),L=Math.abs(O-g[1]);(r.value?D>L&&D>3:L>D&&L>3)?(d.value=!0,u=!1):(r.value?L:D)>3&&(u=!1)}if(!d.value)return;E.preventDefault(),a(E);const A=v(r.value?R:O,!1);h.value=Math.max(0,Math.min(1,A)),A>1?f.value=p(r.value?R:O,!0):A<0&&(f.value=p(r.value?R:O,!1))}function m(E){if(u=!1,!d.value)return;a(E),d.value=!1;const R=c(E.changedTouches[0].identifier),O=Math.abs(R.x),A=Math.abs(R.y);(r.value?O>A&&O>400:A>O&&A>3)?e.value=R.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||oc()):e.value=h.value>.5}const w=z(()=>d.value?{transform:o.value==="left"?`translateX(calc(-100% + ${h.value*n.value}px))`:o.value==="right"?`translateX(calc(100% - ${h.value*n.value}px))`:o.value==="top"?`translateY(calc(-100% + ${h.value*n.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${h.value*n.value}px))`:oc(),transition:"none"}:void 0);return{isDragging:d,dragProgress:h,dragStyles:w}}function oc(){throw new Error}const o7=["start","end","left","right","top","bottom"],r7=fe({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:i=>o7.includes(i)},sticky:Boolean,...us(),...Ve(),...Li(),...Du(),...Zt(),...lt({tag:"nav"}),...St()},"VNavigationDrawer"),a7=Ee()({name:"VNavigationDrawer",props:r7(),emits:{"update:modelValue":i=>!0,"update:rail":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const{isRtl:o}=Bi(),{themeClasses:r}=Pt(i),{borderClasses:a}=Ns(i),{backgroundColorClasses:l,backgroundColorStyles:c}=di(Se(i,"color")),{elevationClasses:u}=Yi(i),{mobile:d}=$l(),{roundedClasses:h}=ni(i),f=tO(),g=Ke(i,"modelValue",null,k=>!!k),{ssrBootStyles:p}=jl(),{scopeId:v}=Au(),y=Te(),C=Fe(!1),m=z(()=>i.rail&&i.expandOnHover&&C.value?Number(i.width):Number(i.rail?i.railWidth:i.width)),w=z(()=>cy(i.location,o.value)),E=z(()=>!i.permanent&&(d.value||i.temporary)),R=z(()=>i.sticky&&!E.value&&w.value!=="bottom");i.expandOnHover&&i.rail!=null&&Le(C,k=>n("update:rail",!k)),i.disableResizeWatcher||Le(E,k=>!i.permanent&&Wt(()=>g.value=!k)),!i.disableRouteWatcher&&f&&Le(f.currentRoute,()=>E.value&&(g.value=!1)),Le(()=>i.permanent,k=>{k&&(g.value=!0)}),Vg(()=>{i.modelValue!=null||E.value||(g.value=i.permanent||!d.value)});const{isDragging:O,dragProgress:A,dragStyles:D}=s7({isActive:g,isTemporary:E,width:m,touchless:Se(i,"touchless"),position:w}),L=z(()=>{const k=E.value?0:i.rail&&i.expandOnHover?Number(i.railWidth):m.value;return O.value?k*A.value:k}),{layoutItemStyles:S,layoutItemScrimStyles:x}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:w,layoutSize:L,elementSize:m,active:z(()=>g.value||O.value),disableTransitions:z(()=>O.value),absolute:z(()=>i.absolute||R.value&&typeof T.value!="string")}),{isStuck:T,stickyStyles:H}=Jq({rootEl:y,isSticky:R,layoutItemStyles:S}),Y=di(z(()=>typeof i.scrim=="string"?i.scrim:null)),Q=z(()=>({...O.value?{opacity:A.value*.2,transition:"none"}:void 0,...x.value}));Ci({VList:{bgColor:"transparent"}});function te(){C.value=!0}function F(){C.value=!1}return _e(()=>{const k=s.image||i.image;return b(He,null,[b(i.tag,Ie({ref:y,onMouseenter:te,onMouseleave:F,class:["v-navigation-drawer",`v-navigation-drawer--${w.value}`,{"v-navigation-drawer--expand-on-hover":i.expandOnHover,"v-navigation-drawer--floating":i.floating,"v-navigation-drawer--is-hovering":C.value,"v-navigation-drawer--rail":i.rail,"v-navigation-drawer--temporary":E.value,"v-navigation-drawer--active":g.value,"v-navigation-drawer--sticky":R.value},r.value,l.value,a.value,u.value,h.value,i.class],style:[c.value,S.value,D.value,p.value,H.value,i.style]},v,t),{default:()=>{var q,V,J,ae;return[k&&b("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?(q=s.image)==null?void 0:q.call(s,{image:i.image}):b("img",{src:i.image,alt:""},null)]),s.prepend&&b("div",{class:"v-navigation-drawer__prepend"},[(V=s.prepend)==null?void 0:V.call(s)]),b("div",{class:"v-navigation-drawer__content"},[(J=s.default)==null?void 0:J.call(s)]),s.append&&b("div",{class:"v-navigation-drawer__append"},[(ae=s.append)==null?void 0:ae.call(s)])]}}),b(Po,{name:"fade-transition"},{default:()=>[E.value&&(O.value||g.value)&&!!i.scrim&&b("div",Ie({class:["v-navigation-drawer__scrim",Y.backgroundColorClasses.value],style:[Q.value,Y.backgroundColorStyles.value],onClick:()=>g.value=!1},v),null)]})])}),{isStuck:T}}}),l7=cs({name:"VNoSsr",setup(i,e){let{slots:t}=e;const n=UO();return()=>{var s;return n.value&&((s=t.default)==null?void 0:s.call(t))}}});function c7(){const i=Te([]);NT(()=>i.value=[]);function e(t,n){i.value[n]=t}return{refs:i,updateRef:e}}const u7=fe({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:i=>i.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:i=>i%1===0},totalVisible:[Number,String],firstIcon:{type:tt,default:"$first"},prevIcon:{type:tt,default:"$prev"},nextIcon:{type:tt,default:"$next"},lastIcon:{type:tt,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,...us(),...Ve(),...Mi(),...Li(),...Zt(),...Dr(),...lt({tag:"nav"}),...St(),...ks({variant:"text"})},"VPagination"),d7=Ee()({name:"VPagination",props:u7(),emits:{"update:modelValue":i=>!0,first:i=>!0,prev:i=>!0,next:i=>!0,last:i=>!0},setup(i,e){let{slots:t,emit:n}=e;const s=Ke(i,"modelValue"),{t:o,n:r}=Rn(),{isRtl:a}=Bi(),{themeClasses:l}=Pt(i),{width:c}=$l(),u=Fe(-1);Ci(void 0,{scoped:!0});const{resizeRef:d}=Bo(A=>{if(!A.length)return;const{target:D,contentRect:L}=A[0],S=D.querySelector(".v-pagination__list > *");if(!S)return;const x=L.width,T=S.offsetWidth+parseFloat(getComputedStyle(S).marginRight)*2;u.value=p(x,T)}),h=z(()=>parseInt(i.length,10)),f=z(()=>parseInt(i.start,10)),g=z(()=>i.totalVisible?parseInt(i.totalVisible,10):u.value>=0?u.value:p(c.value,58));function p(A,D){const L=i.showFirstLastPage?5:3;return Math.max(0,Math.floor(+((A-D*L)/D).toFixed(2)))}const v=z(()=>{if(h.value<=0||isNaN(h.value)||h.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=1)return[s.value];if(h.value<=g.value)return qs(h.value,f.value);const A=g.value%2===0,D=A?g.value/2:Math.floor(g.value/2),L=A?D:D+1,S=h.value-D;if(L-s.value>=0)return[...qs(Math.max(1,g.value-1),f.value),i.ellipsis,h.value];if(s.value-S>=(A?1:0)){const x=g.value-1,T=h.value-x+f.value;return[f.value,i.ellipsis,...qs(x,T)]}else{const x=Math.max(1,g.value-3),T=x===1?s.value:s.value-Math.ceil(x/2)+f.value;return[f.value,i.ellipsis,...qs(x,T),i.ellipsis,h.value]}});function y(A,D,L){A.preventDefault(),s.value=D,L&&n(L,D)}const{refs:C,updateRef:m}=c7();Ci({VPaginationBtn:{color:Se(i,"color"),border:Se(i,"border"),density:Se(i,"density"),size:Se(i,"size"),variant:Se(i,"variant"),rounded:Se(i,"rounded"),elevation:Se(i,"elevation")}});const w=z(()=>v.value.map((A,D)=>{const L=S=>m(S,D);if(typeof A=="string")return{isActive:!1,key:`ellipsis-${D}`,page:A,props:{ref:L,ellipsis:!0,icon:!0,disabled:!0}};{const S=A===s.value;return{isActive:S,key:A,page:r(A),props:{ref:L,ellipsis:!1,icon:!0,disabled:!!i.disabled||+i.length<2,color:S?i.activeColor:i.color,ariaCurrent:S,ariaLabel:o(S?i.currentPageAriaLabel:i.pageAriaLabel,A),onClick:x=>y(x,A)}}}})),E=z(()=>{const A=!!i.disabled||s.value<=f.value,D=!!i.disabled||s.value>=f.value+h.value-1;return{first:i.showFirstLastPage?{icon:a.value?i.lastIcon:i.firstIcon,onClick:L=>y(L,f.value,"first"),disabled:A,ariaLabel:o(i.firstAriaLabel),ariaDisabled:A}:void 0,prev:{icon:a.value?i.nextIcon:i.prevIcon,onClick:L=>y(L,s.value-1,"prev"),disabled:A,ariaLabel:o(i.previousAriaLabel),ariaDisabled:A},next:{icon:a.value?i.prevIcon:i.nextIcon,onClick:L=>y(L,s.value+1,"next"),disabled:D,ariaLabel:o(i.nextAriaLabel),ariaDisabled:D},last:i.showFirstLastPage?{icon:a.value?i.firstIcon:i.lastIcon,onClick:L=>y(L,f.value+h.value-1,"last"),disabled:D,ariaLabel:o(i.lastAriaLabel),ariaDisabled:D}:void 0}});function R(){var D;const A=s.value-f.value;(D=C.value[A])==null||D.$el.focus()}function O(A){A.key===ay.left&&!i.disabled&&s.value>+i.start?(s.value=s.value-1,Wt(R)):A.key===ay.right&&!i.disabled&&s.value<f.value+h.value-1&&(s.value=s.value+1,Wt(R))}return _e(()=>b(i.tag,{ref:d,class:["v-pagination",l.value,i.class],style:i.style,role:"navigation","aria-label":o(i.ariaLabel),onKeydown:O,"data-test":"v-pagination-root"},{default:()=>[b("ul",{class:"v-pagination__list"},[i.showFirstLastPage&&b("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[t.first?t.first(E.value.first):b(pi,Ie({_as:"VPaginationBtn"},E.value.first),null)]),b("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[t.prev?t.prev(E.value.prev):b(pi,Ie({_as:"VPaginationBtn"},E.value.prev),null)]),w.value.map((A,D)=>b("li",{key:A.key,class:["v-pagination__item",{"v-pagination__item--is-active":A.isActive}],"data-test":"v-pagination-item"},[t.item?t.item(A):b(pi,Ie({_as:"VPaginationBtn"},A.props),{default:()=>[A.page]})])),b("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[t.next?t.next(E.value.next):b(pi,Ie({_as:"VPaginationBtn"},E.value.next),null)]),i.showFirstLastPage&&b("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[t.last?t.last(E.value.last):b(pi,Ie({_as:"VPaginationBtn"},E.value.last),null)])])]})),{}}});function h7(i){return Math.floor(Math.abs(i))*Math.sign(i)}const f7=fe({scale:{type:[Number,String],default:.5},...Ve()},"VParallax"),p7=Ee()({name:"VParallax",props:f7(),setup(i,e){let{slots:t}=e;const{intersectionRef:n,isIntersecting:s}=dS(),{resizeRef:o,contentRect:r}=Bo(),{height:a}=$l(),l=Te();_n(()=>{var f;n.value=o.value=(f=l.value)==null?void 0:f.$el});let c;Le(s,f=>{f?(c=sS(n.value),c=c===document.scrollingElement?document:c,c.addEventListener("scroll",h,{passive:!0}),h()):c.removeEventListener("scroll",h)}),dn(()=>{c==null||c.removeEventListener("scroll",h)}),Le(a,h),Le(()=>{var f;return(f=r.value)==null?void 0:f.height},h);const u=z(()=>1-Ai(+i.scale));let d=-1;function h(){s.value&&(cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var E;const f=((E=l.value)==null?void 0:E.$el).querySelector(".v-img__img");if(!f)return;const g=c instanceof Document?document.documentElement.clientHeight:c.clientHeight,p=c instanceof Document?window.scrollY:c.scrollTop,v=n.value.getBoundingClientRect().top+p,y=r.value.height,C=v+(y-g)/2,m=h7((p-C)*u.value),w=Math.max(1,(u.value*(g-y)+y)/y);f.style.setProperty("transform",`translateY(${m}px) scale(${w})`)}))}return _e(()=>b(Sl,{class:["v-parallax",{"v-parallax--active":s.value},i.class],style:i.style,ref:l,cover:!0,onLoadstart:h,onLoad:h},t)),{}}}),g7=fe({...Gm({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),m7=Ee()({name:"VRadio",props:g7(),setup(i,e){let{slots:t}=e;return _e(()=>b(Xc,Ie(i,{class:["v-radio",i.class],style:i.style,type:"radio"}),t)),{}}});const v7=fe({height:{type:[Number,String],default:"auto"},...Pr(),...qo(vS(),["multiple"]),trueIcon:{type:tt,default:"$radioOn"},falseIcon:{type:tt,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),C7=Ee()({name:"VRadioGroup",inheritAttrs:!1,props:v7(),emits:{"update:modelValue":i=>!0},setup(i,e){let{attrs:t,slots:n}=e;const s=hn(),o=z(()=>i.id||`radio-group-${s}`),r=Ke(i,"modelValue");return _e(()=>{const[a,l]=Hl(t),[c,u]=$i.filterProps(i),[d,h]=Xc.filterProps(i),f=n.label?n.label({label:i.label,props:{for:o.value}}):i.label;return b($i,Ie({class:["v-radio-group",i.class],style:i.style},a,c,{modelValue:r.value,"onUpdate:modelValue":g=>r.value=g,id:o.value}),{...n,default:g=>{let{id:p,messagesId:v,isDisabled:y,isReadonly:C}=g;return b(He,null,[f&&b(xu,{id:p.value},{default:()=>[f]}),b(pO,Ie(d,{id:p.value,"aria-describedby":v.value,defaultsTarget:"VRadio",trueIcon:i.trueIcon,falseIcon:i.falseIcon,type:i.type,disabled:y.value,readonly:C.value,"aria-labelledby":f?p.value:void 0,multiple:!1},l,{modelValue:r.value,"onUpdate:modelValue":m=>r.value=m}),n)])}})}),{}}}),y7=fe({...Hm(),...Pr(),...KI(),strict:Boolean,modelValue:{type:Array,default:()=>[0,0]}},"VRangeSlider"),b7=Ee()({name:"VRangeSlider",props:y7(),emits:{"update:focused":i=>!0,"update:modelValue":i=>!0,end:i=>!0,start:i=>!0},setup(i,e){let{slots:t,emit:n}=e;const s=Te(),o=Te(),r=Te(),{rtlClasses:a}=Bi();function l(D){if(!s.value||!o.value)return;const L=Yy(D,s.value.$el,i.direction),S=Yy(D,o.value.$el,i.direction),x=Math.abs(L),T=Math.abs(S);return x<T||x===T&&L<0?s.value.$el:o.value.$el}const c=YI(i),u=Ke(i,"modelValue",void 0,D=>D!=null&&D.length?D.map(L=>c.roundValue(L)):[0,0]),{activeThumbRef:d,hasLabels:h,max:f,min:g,mousePressed:p,onSliderMousedown:v,onSliderTouchstart:y,position:C,trackContainerRef:m}=qI({props:i,steps:c,onSliderStart:()=>{n("start",u.value)},onSliderEnd:D=>{var x;let{value:L}=D;const S=d.value===((x=s.value)==null?void 0:x.$el)?[L,u.value[1]]:[u.value[0],L];!i.strict&&S[0]<S[1]&&(u.value=S),n("end",u.value)},onSliderMove:D=>{var T,H,Y,Q;let{value:L}=D;const[S,x]=u.value;!i.strict&&S===x&&S!==g.value&&(d.value=L>S?(T=o.value)==null?void 0:T.$el:(H=s.value)==null?void 0:H.$el,(Y=d.value)==null||Y.focus()),d.value===((Q=s.value)==null?void 0:Q.$el)?u.value=[Math.min(L,x),x]:u.value=[S,Math.max(S,L)]},getActiveThumb:l}),{isFocused:w,focus:E,blur:R}=Ma(i),O=z(()=>C(u.value[0])),A=z(()=>C(u.value[1]));return _e(()=>{const[D,L]=$i.filterProps(i),S=!!(i.label||t.label||t.prepend);return b($i,Ie({class:["v-slider","v-range-slider",{"v-slider--has-labels":!!t["tick-label"]||h.value,"v-slider--focused":w.value,"v-slider--pressed":p.value,"v-slider--disabled":i.disabled},a.value,i.class],style:i.style,ref:r},D,{focused:w.value}),{...t,prepend:S?x=>{var T,H;return b(He,null,[((T=t.label)==null?void 0:T.call(t,x))??i.label?b(xu,{class:"v-slider__label",text:i.label},null):void 0,(H=t.prepend)==null?void 0:H.call(t,x)])}:void 0,default:x=>{var Y,Q;let{id:T,messagesId:H}=x;return b("div",{class:"v-slider__container",onMousedown:v,onTouchstartPassive:y},[b("input",{id:`${T.value}_start`,name:i.name||T.value,disabled:!!i.disabled,readonly:!!i.readonly,tabindex:"-1",value:u.value[0]},null),b("input",{id:`${T.value}_stop`,name:i.name||T.value,disabled:!!i.disabled,readonly:!!i.readonly,tabindex:"-1",value:u.value[1]},null),b(XI,{ref:m,start:O.value,stop:A.value},{"tick-label":t["tick-label"]}),b(qy,{ref:s,"aria-describedby":H.value,focused:w&&d.value===((Y=s.value)==null?void 0:Y.$el),modelValue:u.value[0],"onUpdate:modelValue":te=>u.value=[te,u.value[1]],onFocus:te=>{var F,k,q,V;E(),d.value=(F=s.value)==null?void 0:F.$el,u.value[0]===u.value[1]&&u.value[1]===g.value&&te.relatedTarget!==((k=o.value)==null?void 0:k.$el)&&((q=s.value)==null||q.$el.blur(),(V=o.value)==null||V.$el.focus())},onBlur:()=>{R(),d.value=void 0},min:g.value,max:u.value[1],position:O.value},{"thumb-label":t["thumb-label"]}),b(qy,{ref:o,"aria-describedby":H.value,focused:w&&d.value===((Q=o.value)==null?void 0:Q.$el),modelValue:u.value[1],"onUpdate:modelValue":te=>u.value=[u.value[0],te],onFocus:te=>{var F,k,q,V;E(),d.value=(F=o.value)==null?void 0:F.$el,u.value[0]===u.value[1]&&u.value[0]===f.value&&te.relatedTarget!==((k=s.value)==null?void 0:k.$el)&&((q=o.value)==null||q.$el.blur(),(V=s.value)==null||V.$el.focus())},onBlur:()=>{R(),d.value=void 0},min:u.value[0],max:f.value,position:A.value},{"thumb-label":t["thumb-label"]})])}})}),{}}});const w7=fe({name:String,itemAriaLabel:{type:String,default:"$vuetify.rating.ariaLabel.item"},activeColor:String,color:String,clearable:Boolean,disabled:Boolean,emptyIcon:{type:tt,default:"$ratingEmpty"},fullIcon:{type:tt,default:"$ratingFull"},halfIncrements:Boolean,hover:Boolean,length:{type:[Number,String],default:5},readonly:Boolean,modelValue:{type:[Number,String],default:0},itemLabels:Array,itemLabelPosition:{type:String,default:"top",validator:i=>["top","bottom"].includes(i)},ripple:Boolean,...Ve(),...Mi(),...Dr(),...lt(),...St()},"VRating"),S7=Ee()({name:"VRating",props:w7(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{t:n}=Rn(),{themeClasses:s}=Pt(i),o=Ke(i,"modelValue"),r=z(()=>Ai(parseFloat(o.value),0,+i.length)),a=z(()=>qs(Number(i.length),1)),l=z(()=>a.value.flatMap(p=>i.halfIncrements?[p-.5,p]:[p])),c=Fe(-1),u=z(()=>l.value.map(p=>{const v=i.hover&&c.value>-1,y=r.value>=p,C=c.value>=p,w=(v?C:y)?i.fullIcon:i.emptyIcon,E=i.activeColor??i.color,R=y||C?E:i.color;return{isFilled:y,isHovered:C,icon:w,color:R}})),d=z(()=>[0,...l.value].map(p=>{function v(){c.value=p}function y(){c.value=-1}function C(){i.disabled||i.readonly||(o.value=r.value===p&&i.clearable?0:p)}return{onMouseenter:i.hover?v:void 0,onMouseleave:i.hover?y:void 0,onClick:C}})),h=z(()=>i.name??`v-rating-${hn()}`);function f(p){var A,D;let{value:v,index:y,showStar:C=!0}=p;const{onMouseenter:m,onMouseleave:w,onClick:E}=d.value[y+1],R=`${h.value}-${String(v).replace(".","-")}`,O={color:(A=u.value[y])==null?void 0:A.color,density:i.density,disabled:i.disabled,icon:(D=u.value[y])==null?void 0:D.icon,ripple:i.ripple,size:i.size,variant:"plain"};return b(He,null,[b("label",{for:R,class:{"v-rating__item--half":i.halfIncrements&&v%1>0,"v-rating__item--full":i.halfIncrements&&v%1===0},onMouseenter:m,onMouseleave:w,onClick:E},[b("span",{class:"v-rating__hidden"},[n(i.itemAriaLabel,v,i.length)]),C?t.item?t.item({...u.value[y],props:O,value:v,index:y,rating:r.value}):b(pi,O,null):void 0]),b("input",{class:"v-rating__hidden",name:h.value,id:R,type:"radio",value:v,checked:r.value===v,tabindex:-1,readonly:i.readonly,disabled:i.disabled},null)])}function g(p){return t["item-label"]?t["item-label"](p):p.label?b("span",null,[p.label]):b("span",null,[De(" ")])}return _e(()=>{var v;const p=!!((v=i.itemLabels)!=null&&v.length)||t["item-label"];return b(i.tag,{class:["v-rating",{"v-rating--hover":i.hover,"v-rating--readonly":i.readonly},s.value,i.class],style:i.style},{default:()=>[b(f,{value:0,index:-1,showStar:!1},null),a.value.map((y,C)=>{var m,w;return b("div",{class:"v-rating__wrapper"},[p&&i.itemLabelPosition==="top"?g({value:y,index:C,label:(m=i.itemLabels)==null?void 0:m[C]}):void 0,b("div",{class:"v-rating__item"},[i.halfIncrements?b(He,null,[b(f,{value:y-.5,index:C*2},null),b(f,{value:y,index:C*2+1},null)]):b(f,{value:y,index:C},null)]),p&&i.itemLabelPosition==="bottom"?g({value:y,index:C,label:(w=i.itemLabels)==null?void 0:w[C]}):void 0])})]})}),{}}});function X0(i){const t=Math.abs(i);return Math.sign(i)*(t/((1/.501-2)*(1-t)+1))}function Q0(i){let{selectedElement:e,containerSize:t,contentSize:n,isRtl:s,currentScrollOffset:o,isHorizontal:r}=i;const a=r?e.clientWidth:e.clientHeight,l=r?e.offsetLeft:e.offsetTop,c=s&&r?n-l-a:l,u=t+o,d=a+c,h=a*.4;return c<=o?o=Math.max(c-h,0):u<=d&&(o=Math.min(o-(u-d-h),n-t)),o}function E7(i){let{selectedElement:e,containerSize:t,contentSize:n,isRtl:s,isHorizontal:o}=i;const r=o?e.clientWidth:e.clientHeight,a=o?e.offsetLeft:e.offsetTop,l=s&&o?n-a-r/2-t/2:a+r/2-t/2;return Math.min(n-t,Math.max(0,l))}const hM=Symbol.for("vuetify:v-slide-group"),fM=fe({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:hM},nextIcon:{type:tt,default:"$next"},prevIcon:{type:tt,default:"$prev"},showArrows:{type:[Boolean,String],validator:i=>typeof i=="boolean"||["always","desktop","mobile"].includes(i)},...Ve(),...lt(),...wu({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),Zy=Ee()({name:"VSlideGroup",props:fM(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const{isRtl:n}=Bi(),{mobile:s}=$l(),o=Ul(i,i.symbol),r=Fe(!1),a=Fe(0),l=Fe(0),c=Fe(0),u=z(()=>i.direction==="horizontal"),{resizeRef:d,contentRect:h}=Bo(),{resizeRef:f,contentRect:g}=Bo(),p=z(()=>o.selected.value.length?o.items.value.findIndex(q=>q.id===o.selected.value[0]):-1),v=z(()=>o.selected.value.length?o.items.value.findIndex(q=>q.id===o.selected.value[o.selected.value.length-1]):-1);if(yi){let q=-1;Le(()=>[o.selected.value,h.value,g.value,u.value],()=>{cancelAnimationFrame(q),q=requestAnimationFrame(()=>{if(h.value&&g.value){const V=u.value?"width":"height";l.value=h.value[V],c.value=g.value[V],r.value=l.value+1<c.value}if(p.value>=0&&f.value){const V=f.value.children[v.value];p.value===0||!r.value?a.value=0:i.centerActive?a.value=E7({selectedElement:V,containerSize:l.value,contentSize:c.value,isRtl:n.value,isHorizontal:u.value}):r.value&&(a.value=Q0({selectedElement:V,containerSize:l.value,contentSize:c.value,isRtl:n.value,currentScrollOffset:a.value,isHorizontal:u.value}))}})})}const y=Fe(!1);let C=0,m=0;function w(q){const V=u.value?"clientX":"clientY";m=(n.value&&u.value?-1:1)*a.value,C=q.touches[0][V],y.value=!0}function E(q){if(!r.value)return;const V=u.value?"clientX":"clientY",J=n.value&&u.value?-1:1;a.value=J*(m+C-q.touches[0][V])}function R(q){const V=c.value-l.value;a.value<0||!r.value?a.value=0:a.value>=V&&(a.value=V),y.value=!1}function O(){d.value&&(d.value[u.value?"scrollLeft":"scrollTop"]=0)}const A=Fe(!1);function D(q){if(A.value=!0,!(!r.value||!f.value)){for(const V of q.composedPath())for(const J of f.value.children)if(J===V){a.value=Q0({selectedElement:J,containerSize:l.value,contentSize:c.value,isRtl:n.value,currentScrollOffset:a.value,isHorizontal:u.value});return}}}function L(q){A.value=!1}function S(q){var V;!A.value&&!(q.relatedTarget&&((V=f.value)!=null&&V.contains(q.relatedTarget)))&&T()}function x(q){f.value&&(u.value?q.key==="ArrowRight"?T(n.value?"prev":"next"):q.key==="ArrowLeft"&&T(n.value?"next":"prev"):q.key==="ArrowDown"?T("next"):q.key==="ArrowUp"&&T("prev"),q.key==="Home"?T("first"):q.key==="End"&&T("last"))}function T(q){var V,J,ae,se,ce;if(f.value)if(!q)(V=Jw(f.value)[0])==null||V.focus();else if(q==="next"){const re=(J=f.value.querySelector(":focus"))==null?void 0:J.nextElementSibling;re?re.focus():T("first")}else if(q==="prev"){const re=(ae=f.value.querySelector(":focus"))==null?void 0:ae.previousElementSibling;re?re.focus():T("last")}else q==="first"?(se=f.value.firstElementChild)==null||se.focus():q==="last"&&((ce=f.value.lastElementChild)==null||ce.focus())}function H(q){const V=a.value+(q==="prev"?-1:1)*l.value;a.value=Ai(V,0,c.value-l.value)}const Y=z(()=>{let q=a.value>c.value-l.value?-(c.value-l.value)+X0(c.value-l.value-a.value):-a.value;a.value<=0&&(q=X0(-a.value));const V=n.value&&u.value?-1:1;return{transform:`translate${u.value?"X":"Y"}(${V*q}px)`,transition:y.value?"none":"",willChange:y.value?"transform":""}}),Q=z(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),te=z(()=>{switch(i.showArrows){case"always":return!0;case"desktop":return!s.value;case!0:return r.value||Math.abs(a.value)>0;case"mobile":return s.value||r.value||Math.abs(a.value)>0;default:return!s.value&&(r.value||Math.abs(a.value)>0)}}),F=z(()=>Math.abs(a.value)>0),k=z(()=>c.value>Math.abs(a.value)+l.value);return _e(()=>b(i.tag,{class:["v-slide-group",{"v-slide-group--vertical":!u.value,"v-slide-group--has-affixes":te.value,"v-slide-group--is-overflowing":r.value},i.class],style:i.style,tabindex:A.value||o.selected.value.length?-1:0,onFocus:S},{default:()=>{var q,V,J;return[te.value&&b("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!F.value}],onClick:()=>H("prev")},[((q=t.prev)==null?void 0:q.call(t,Q.value))??b(vy,null,{default:()=>[b(Gt,{icon:n.value?i.nextIcon:i.prevIcon},null)]})]),b("div",{key:"container",ref:d,class:"v-slide-group__container",onScroll:O},[b("div",{ref:f,class:"v-slide-group__content",style:Y.value,onTouchstartPassive:w,onTouchmovePassive:E,onTouchendPassive:R,onFocusin:D,onFocusout:L,onKeydown:x},[(V=t.default)==null?void 0:V.call(t,Q.value)])]),te.value&&b("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!k.value}],onClick:()=>H("next")},[((J=t.next)==null?void 0:J.call(t,Q.value))??b(vy,null,{default:()=>[b(Gt,{icon:n.value?i.prevIcon:i.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:H,scrollOffset:a,focus:T}}}),_7=Ee()({name:"VSlideGroupItem",props:Su(),emits:{"group:selected":i=>!0},setup(i,e){let{slots:t}=e;const n=Eu(i,hM);return()=>{var s;return(s=t.default)==null?void 0:s.call(t,{isSelected:n.isSelected.value,select:n.select,toggle:n.toggle,selectedClass:n.selectedClass.value})}}});const R7=fe({multiLine:Boolean,timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Oa({location:"bottom"}),...Ru(),...Zt(),...ks(),...St(),...qo(gf({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),T7=Ee()({name:"VSnackbar",props:R7(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{locationStyles:s}=Pa(i),{positionClasses:o}=Tu(i),{scopeId:r}=Au(),{themeClasses:a}=Pt(i),{colorClasses:l,colorStyles:c,variantClasses:u}=Wl(i),{roundedClasses:d}=ni(i),h=Te();Le(n,g),Le(()=>i.timeout,g),Pi(()=>{n.value&&g()});let f=-1;function g(){window.clearTimeout(f);const v=Number(i.timeout);!n.value||v===-1||(f=window.setTimeout(()=>{n.value=!1},v))}function p(){window.clearTimeout(f)}return _e(()=>{const[v]=yr.filterProps(i);return b(yr,Ie({ref:h,class:["v-snackbar",{"v-snackbar--active":n.value,"v-snackbar--multi-line":i.multiLine&&!i.vertical,"v-snackbar--vertical":i.vertical},o.value,i.class],style:i.style},v,{modelValue:n.value,"onUpdate:modelValue":y=>n.value=y,contentProps:Ie({class:["v-snackbar__wrapper",a.value,l.value,d.value,u.value],style:[s.value,c.value],onPointerenter:p,onPointerleave:g},v.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0},r),{default:()=>[Bl(!1,"v-snackbar"),t.default&&b("div",{class:"v-snackbar__content",role:"status","aria-live":"polite"},[t.default()]),t.actions&&b(Nt,{defaults:{VBtn:{variant:"text",ripple:!1}}},{default:()=>[b("div",{class:"v-snackbar__actions"},[t.actions()])]})],activator:t.activator})}),po({},h)}});const x7=fe({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...Pr(),...Gm()},"VSwitch"),A7=Ee()({name:"VSwitch",inheritAttrs:!1,props:x7(),emits:{"update:focused":i=>!0,"update:modelValue":()=>!0,"update:indeterminate":i=>!0},setup(i,e){let{attrs:t,slots:n}=e;const s=Ke(i,"indeterminate"),o=Ke(i,"modelValue"),{loaderClasses:r}=uf(i),{isFocused:a,focus:l,blur:c}=Ma(i),u=z(()=>typeof i.loading=="string"&&i.loading!==""?i.loading:i.color),d=hn(),h=z(()=>i.id||`switch-${d}`);function f(){s.value&&(s.value=!1)}return _e(()=>{const[g,p]=Hl(t),[v,y]=$i.filterProps(i),[C,m]=Xc.filterProps(i),w=Te();function E(R){var O,A;R.stopPropagation(),R.preventDefault(),(A=(O=w.value)==null?void 0:O.input)==null||A.click()}return b($i,Ie({class:["v-switch",{"v-switch--inset":i.inset},{"v-switch--indeterminate":s.value},r.value,i.class],style:i.style},g,v,{id:h.value,focused:a.value}),{...n,default:R=>{let{id:O,messagesId:A,isDisabled:D,isReadonly:L,isValid:S}=R;return b(Xc,Ie({ref:w},C,{modelValue:o.value,"onUpdate:modelValue":[x=>o.value=x,f],id:O.value,"aria-describedby":A.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:D.value,readonly:L.value,onFocus:l,onBlur:c},p),{...n,default:()=>b("div",{class:"v-switch__track",onClick:E},null),input:x=>{let{textColorClasses:T,textColorStyles:H}=x;return b("div",{class:["v-switch__thumb",T.value],style:H.value},[i.loading&&b(Nm,{name:"v-switch",active:!0,color:S.value===!1?void 0:u.value},{default:Y=>n.loader?n.loader(Y):b(hS,{active:Y.isActive,color:Y.color,indeterminate:!0,size:"16",width:"2"},null)})])}})}})}),{}}});const D7=fe({color:String,height:[Number,String],window:Boolean,...Ve(),...Li(),...Du(),...Zt(),...lt(),...St()},"VSystemBar"),O7=Ee()({name:"VSystemBar",props:D7(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{backgroundColorClasses:s,backgroundColorStyles:o}=di(Se(i,"color")),{elevationClasses:r}=Yi(i),{roundedClasses:a}=ni(i),{ssrBootStyles:l}=jl(),c=z(()=>i.height??(i.window?32:24)),{layoutItemStyles:u}=Ou({id:i.name,order:z(()=>parseInt(i.order,10)),position:Fe("top"),layoutSize:c,elementSize:c,active:z(()=>!0),absolute:Se(i,"absolute")});return _e(()=>b(i.tag,{class:["v-system-bar",{"v-system-bar--window":i.window},n.value,s.value,r.value,a.value,i.class],style:[o.value,u.value,l.value,i.style]},t)),{}}});const pM=Symbol.for("vuetify:v-tabs"),P7=fe({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...qo(pS({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),gM=Ee()({name:"VTab",props:P7(),setup(i,e){let{slots:t,attrs:n}=e;const{textColorClasses:s,textColorStyles:o}=cn(i,"sliderColor"),r=z(()=>i.direction==="horizontal"),a=Fe(!1),l=Te(),c=Te();function u(d){var f,g;let{value:h}=d;if(a.value=h,h){const p=(g=(f=l.value)==null?void 0:f.$el.parentElement)==null?void 0:g.querySelector(".v-tab--selected .v-tab__slider"),v=c.value;if(!p||!v)return;const y=getComputedStyle(p).color,C=p.getBoundingClientRect(),m=v.getBoundingClientRect(),w=r.value?"x":"y",E=r.value?"X":"Y",R=r.value?"right":"bottom",O=r.value?"width":"height",A=C[w],D=m[w],L=A>D?C[R]-m[R]:C[w]-m[w],S=Math.sign(L)>0?r.value?"right":"bottom":Math.sign(L)<0?r.value?"left":"top":"center",T=(Math.abs(L)+(Math.sign(L)<0?C[O]:m[O]))/Math.max(C[O],m[O]),H=C[O]/m[O],Y=1.5;el(v,{backgroundColor:[y,"currentcolor"],transform:[`translate${E}(${L}px) scale${E}(${H})`,`translate${E}(${L/Y}px) scale${E}(${(T-1)/Y+1})`,"none"],transformOrigin:Array(3).fill(S)},{duration:225,easing:ah})}}return _e(()=>{const[d]=pi.filterProps(i);return b(pi,Ie({symbol:pM,ref:l,class:["v-tab",i.class],style:i.style,tabindex:a.value?0:-1,role:"tab","aria-selected":String(a.value),active:!1,block:i.fixed,maxWidth:i.fixed?300:void 0,rounded:0},d,n,{"onGroup:selected":u}),{default:()=>{var h;return[((h=t.default)==null?void 0:h.call(t))??i.text,!i.hideSlider&&b("div",{ref:c,class:["v-tab__slider",s.value],style:o.value},null)]}})}),{}}});function I7(i){return i?i.map(e=>typeof e=="string"?{title:e,value:e}:e):[]}const M7=fe({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...fM({mandatory:"force"}),...Mi(),...lt()},"VTabs"),L7=Ee()({name:"VTabs",props:M7(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),s=z(()=>I7(i.items)),{densityClasses:o}=fn(i),{backgroundColorClasses:r,backgroundColorStyles:a}=di(Se(i,"bgColor"));return Ci({VTab:{color:Se(i,"color"),direction:Se(i,"direction"),stacked:Se(i,"stacked"),fixed:Se(i,"fixedTabs"),sliderColor:Se(i,"sliderColor"),hideSlider:Se(i,"hideSlider")}}),_e(()=>{const[l]=Zy.filterProps(i);return b(Zy,Ie(l,{modelValue:n.value,"onUpdate:modelValue":c=>n.value=c,class:["v-tabs",`v-tabs--${i.direction}`,`v-tabs--align-tabs-${i.alignTabs}`,{"v-tabs--fixed-tabs":i.fixedTabs,"v-tabs--grow":i.grow,"v-tabs--stacked":i.stacked},o.value,r.value,i.class],style:[{"--v-tabs-height":ke(i.height)},a.value,i.style],role:"tablist",symbol:pM}),{default:()=>[t.default?t.default():s.value.map(c=>b(gM,Ie(c,{key:c.title}),null))]})}),{}}});const F7=fe({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:i=>!isNaN(parseFloat(i))},maxRows:{type:[Number,String],validator:i=>!isNaN(parseFloat(i))},suffix:String,modelModifiers:Object,...Pr(),...Km()},"VTextarea"),N7=Ee()({name:"VTextarea",directives:{Intersect:ff},inheritAttrs:!1,props:F7(),emits:{"click:control":i=>!0,"mousedown:control":i=>!0,"update:focused":i=>!0,"update:modelValue":i=>!0},setup(i,e){let{attrs:t,emit:n,slots:s}=e;const o=Ke(i,"modelValue"),{isFocused:r,focus:a,blur:l}=Ma(i),c=z(()=>typeof i.counterValue=="function"?i.counterValue(o.value):(o.value||"").toString().length),u=z(()=>{if(t.maxlength)return t.maxlength;if(!(!i.counter||typeof i.counter!="number"&&typeof i.counter!="string"))return i.counter});function d(S,x){var T,H;!i.autofocus||!S||(H=(T=x[0].target)==null?void 0:T.focus)==null||H.call(T)}const h=Te(),f=Te(),g=Fe(""),p=Te(),v=z(()=>i.persistentPlaceholder||r.value||i.active);function y(){var S;p.value!==document.activeElement&&((S=p.value)==null||S.focus()),r.value||a()}function C(S){y(),n("click:control",S)}function m(S){n("mousedown:control",S)}function w(S){S.stopPropagation(),y(),Wt(()=>{o.value="",Zw(i["onClick:clear"],S)})}function E(S){var T;const x=S.target;if(o.value=x.value,(T=i.modelModifiers)!=null&&T.trim){const H=[x.selectionStart,x.selectionEnd];Wt(()=>{x.selectionStart=H[0],x.selectionEnd=H[1]})}}const R=Te(),O=Te(+i.rows),A=z(()=>["plain","underlined"].includes(i.variant));_n(()=>{i.autoGrow||(O.value=+i.rows)});function D(){i.autoGrow&&Wt(()=>{if(!R.value||!f.value)return;const S=getComputedStyle(R.value),x=getComputedStyle(f.value.$el),T=parseFloat(S.getPropertyValue("--v-field-padding-top"))+parseFloat(S.getPropertyValue("--v-input-padding-top"))+parseFloat(S.getPropertyValue("--v-field-padding-bottom")),H=R.value.scrollHeight,Y=parseFloat(S.lineHeight),Q=Math.max(parseFloat(i.rows)*Y+T,parseFloat(x.getPropertyValue("--v-input-control-height"))),te=parseFloat(i.maxRows)*Y+T||1/0,F=Ai(H??0,Q,te);O.value=Math.floor((F-T)/Y),g.value=ke(F)})}Pi(D),Le(o,D),Le(()=>i.rows,D),Le(()=>i.maxRows,D),Le(()=>i.density,D);let L;return Le(R,S=>{S?(L=new ResizeObserver(D),L.observe(R.value)):L==null||L.disconnect()}),dn(()=>{L==null||L.disconnect()}),_e(()=>{const S=!!(s.counter||i.counter||i.counterValue),x=!!(S||s.details),[T,H]=Hl(t),[{modelValue:Y,...Q}]=$i.filterProps(i),[te]=wS(i);return b($i,Ie({ref:h,modelValue:o.value,"onUpdate:modelValue":F=>o.value=F,class:["v-textarea v-text-field",{"v-textarea--prefixed":i.prefix,"v-textarea--suffixed":i.suffix,"v-text-field--prefixed":i.prefix,"v-text-field--suffixed":i.suffix,"v-textarea--auto-grow":i.autoGrow,"v-textarea--no-resize":i.noResize||i.autoGrow,"v-text-field--plain-underlined":A.value},i.class],style:i.style},T,Q,{centerAffix:O.value===1&&!A.value,focused:r.value}),{...s,default:F=>{let{isDisabled:k,isDirty:q,isReadonly:V,isValid:J}=F;return b(mf,Ie({ref:f,style:{"--v-textarea-control-height":g.value},onClick:C,onMousedown:m,"onClick:clear":w,"onClick:prependInner":i["onClick:prependInner"],"onClick:appendInner":i["onClick:appendInner"],role:"textbox"},te,{active:v.value||q.value,centerAffix:O.value===1&&!A.value,dirty:q.value||i.dirty,disabled:k.value,focused:r.value,error:J.value===!1}),{...s,default:ae=>{let{props:{class:se,...ce}}=ae;return b(He,null,[i.prefix&&b("span",{class:"v-text-field__prefix"},[i.prefix]),Mt(b("textarea",Ie({ref:p,class:se,value:o.value,onInput:E,autofocus:i.autofocus,readonly:V.value,disabled:k.value,placeholder:i.placeholder,rows:i.rows,name:i.name,onFocus:y,onBlur:l},ce,H),null),[[Vi("intersect"),{handler:d},null,{once:!0}]]),i.autoGrow&&Mt(b("textarea",{class:[se,"v-textarea__sizer"],"onUpdate:modelValue":re=>o.value=re,ref:R,readonly:!0,"aria-hidden":"true"},null),[[UF,o.value]]),i.suffix&&b("span",{class:"v-text-field__suffix"},[i.suffix])])}})},details:x?F=>{var k;return b(He,null,[(k=s.details)==null?void 0:k.call(s,F),S&&b(He,null,[b("span",null,null),b(zm,{active:i.persistentCounter||r.value,value:c.value,max:u.value},s.counter)])])}:void 0})}),po({},h,f,p)}});const k7=fe({withBackground:Boolean,...Ve(),...St(),...lt()},"VThemeProvider"),V7=Ee()({name:"VThemeProvider",props:k7(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i);return()=>{var s;return i.withBackground?b(i.tag,{class:["v-theme-provider",n.value,i.class],style:i.style},{default:()=>{var o;return[(o=t.default)==null?void 0:o.call(t)]}}):(s=t.default)==null?void 0:s.call(t)}}});const G7=fe({align:{type:String,default:"center",validator:i=>["center","start"].includes(i)},direction:{type:String,default:"vertical",validator:i=>["vertical","horizontal"].includes(i)},justify:{type:String,default:"auto",validator:i=>["auto","center"].includes(i)},side:{type:String,validator:i=>i==null||["start","end"].includes(i)},lineInset:{type:[String,Number],default:0},lineThickness:{type:[String,Number],default:2},lineColor:String,truncateLine:{type:String,validator:i=>["start","end","both"].includes(i)},...Ve(),...Mi(),...lt(),...St()},"VTimeline"),H7=Ee()({name:"VTimeline",props:G7(),setup(i,e){let{slots:t}=e;const{themeClasses:n}=Pt(i),{densityClasses:s}=fn(i),{rtlClasses:o}=Bi();Ci({VTimelineDivider:{lineColor:Se(i,"lineColor")},VTimelineItem:{density:Se(i,"density"),lineInset:Se(i,"lineInset")}});const r=z(()=>{const l=i.side?i.side:i.density!=="default"?"end":null;return l&&`v-timeline--side-${l}`}),a=z(()=>{const l=["v-timeline--truncate-line-start","v-timeline--truncate-line-end"];switch(i.truncateLine){case"both":return l;case"start":return l[0];case"end":return l[1];default:return null}});return _e(()=>b(i.tag,{class:["v-timeline",`v-timeline--${i.direction}`,`v-timeline--align-${i.align}`,`v-timeline--justify-${i.justify}`,a.value,{"v-timeline--inset-line":!!i.lineInset},n.value,s.value,r.value,o.value,i.class],style:[{"--v-timeline-line-thickness":ke(i.lineThickness)},i.style]},t)),{}}}),B7=fe({dotColor:String,fillDot:Boolean,hideDot:Boolean,icon:tt,iconColor:String,lineColor:String,...Ve(),...Zt(),...Dr(),...Li()},"VTimelineDivider"),W7=Ee()({name:"VTimelineDivider",props:B7(),setup(i,e){let{slots:t}=e;const{sizeClasses:n,sizeStyles:s}=_u(i,"v-timeline-divider__dot"),{backgroundColorStyles:o,backgroundColorClasses:r}=di(Se(i,"dotColor")),{roundedClasses:a}=ni(i,"v-timeline-divider__dot"),{elevationClasses:l}=Yi(i),{backgroundColorClasses:c,backgroundColorStyles:u}=di(Se(i,"lineColor"));return _e(()=>b("div",{class:["v-timeline-divider",{"v-timeline-divider--fill-dot":i.fillDot},i.class],style:i.style},[b("div",{class:["v-timeline-divider__before",c.value],style:u.value},null),!i.hideDot&&b("div",{key:"dot",class:["v-timeline-divider__dot",l.value,a.value,n.value],style:s.value},[b("div",{class:["v-timeline-divider__inner-dot",r.value,a.value],style:o.value},[t.default?b(Nt,{key:"icon-defaults",disabled:!i.icon,defaults:{VIcon:{color:i.iconColor,icon:i.icon,size:i.size}}},t.default):b(Gt,{key:"icon",color:i.iconColor,icon:i.icon,size:i.size},null)])]),b("div",{class:["v-timeline-divider__after",c.value],style:u.value},null)])),{}}}),U7=fe({density:String,dotColor:String,fillDot:Boolean,hideDot:Boolean,hideOpposite:{type:Boolean,default:void 0},icon:tt,iconColor:String,lineInset:[Number,String],...Ve(),...Vs(),...Li(),...Zt(),...Dr(),...lt()},"VTimelineItem"),j7=Ee()({name:"VTimelineItem",props:U7(),setup(i,e){let{slots:t}=e;const{dimensionStyles:n}=Gs(i),s=Fe(0),o=Te();return Le(o,r=>{var a;r&&(s.value=((a=r.$el.querySelector(".v-timeline-divider__dot"))==null?void 0:a.getBoundingClientRect().width)??0)},{flush:"post"}),_e(()=>{var r,a;return b("div",{class:["v-timeline-item",{"v-timeline-item--fill-dot":i.fillDot},i.class],style:[{"--v-timeline-dot-size":ke(s.value),"--v-timeline-line-inset":i.lineInset?`calc(var(--v-timeline-dot-size) / 2 + ${ke(i.lineInset)})`:ke(0)},i.style]},[b("div",{class:"v-timeline-item__body",style:n.value},[(r=t.default)==null?void 0:r.call(t)]),b(W7,{ref:o,hideDot:i.hideDot,icon:i.icon,iconColor:i.iconColor,size:i.size,elevation:i.elevation,dotColor:i.dotColor,fillDot:i.fillDot,rounded:i.rounded},{default:t.icon}),i.density!=="compact"&&b("div",{class:"v-timeline-item__opposite"},[!i.hideOpposite&&((a=t.opposite)==null?void 0:a.call(t))])])}),{}}}),$7=fe({...Ve(),...ks({variant:"text"})},"VToolbarItems"),z7=Ee()({name:"VToolbarItems",props:$7(),setup(i,e){let{slots:t}=e;return Ci({VBtn:{color:Se(i,"color"),height:"inherit",variant:Se(i,"variant")}}),_e(()=>{var n;return b("div",{class:["v-toolbar-items",i.class],style:i.style},[(n=t.default)==null?void 0:n.call(t)])}),{}}});const K7=fe({id:String,text:String,...qo(gf({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),Y7=Ee()({name:"VTooltip",props:K7(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=Ke(i,"modelValue"),{scopeId:s}=Au(),o=hn(),r=z(()=>i.id||`v-tooltip-${o}`),a=Te(),l=z(()=>i.location.split(" ").length>1?i.location:i.location+" center"),c=z(()=>i.origin==="auto"||i.origin==="overlap"||i.origin.split(" ").length>1||i.location.split(" ").length>1?i.origin:i.origin+" center"),u=z(()=>i.transition?i.transition:n.value?"scale-transition":"fade-transition"),d=z(()=>Ie({"aria-describedby":r.value},i.activatorProps));return _e(()=>{const[h]=yr.filterProps(i);return b(yr,Ie({ref:a,class:["v-tooltip",i.class],style:i.style,id:r.value},h,{modelValue:n.value,"onUpdate:modelValue":f=>n.value=f,transition:u.value,absolute:!0,location:l.value,origin:c.value,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:t.activator,default:function(){var v;for(var f=arguments.length,g=new Array(f),p=0;p<f;p++)g[p]=arguments[p];return((v=t.default)==null?void 0:v.call(t,...g))??i.text}})}),po({},a)}}),q7=Ee()({name:"VValidation",props:yO(),emits:{"update:modelValue":i=>!0},setup(i,e){let{slots:t}=e;const n=bO(i,"validation");return()=>{var s;return(s=t.default)==null?void 0:s.call(t,n)}}}),X7=Object.freeze(Object.defineProperty({__proto__:null,VAlert:W6,VAlertTitle:II,VApp:P6,VAppBar:N6,VAppBarNavIcon:V6,VAppBarTitle:G6,VAutocomplete:$6,VAvatar:ua,VBadge:K6,VBanner:X6,VBannerActions:MI,VBannerText:LI,VBottomNavigation:Z6,VBreadcrumbs:iY,VBreadcrumbsDivider:FI,VBreadcrumbsItem:NI,VBtn:pi,VBtnGroup:hy,VBtnToggle:qB,VCard:oY,VCardActions:kI,VCardItem:HI,VCardSubtitle:VI,VCardText:BI,VCardTitle:GI,VCarousel:pY,VCarouselItem:mY,VCheckbox:WW,VCheckboxBtn:vr,VChip:pf,VChipGroup:KW,VClassIcon:uS,VCode:vY,VCol:Aq,VColorPicker:oq,VCombobox:lq,VComponentIcon:py,VContainer:_q,VCounter:zm,VDefaultsProvider:Nt,VDialog:uq,VDialogBottomTransition:TW,VDialogTopTransition:xW,VDialogTransition:km,VDivider:LO,VExpandTransition:Vm,VExpandXTransition:mS,VExpansionPanel:mq,VExpansionPanelText:ZI,VExpansionPanelTitle:eM,VExpansionPanels:fq,VFabTransition:RW,VFadeTransition:vy,VField:mf,VFieldLabel:Qu,VFileInput:Cq,VFooter:bq,VForm:Sq,VHover:Vq,VIcon:Gt,VImg:Sl,VInput:$i,VItem:Bq,VItemGroup:Hq,VKbd:Wq,VLabel:xu,VLayout:jq,VLayoutItem:zq,VLazy:Yq,VLigatureIcon:JB,VList:Wm,VListGroup:by,VListImg:pU,VListItem:Cr,VListItemAction:mU,VListItemMedia:CU,VListItemSubtitle:PO,VListItemTitle:IO,VListSubheader:MO,VLocaleProvider:Xq,VMain:Zq,VMenu:$m,VMessages:vO,VNavigationDrawer:a7,VNoSsr:l7,VOverlay:yr,VPagination:d7,VParallax:p7,VProgressCircular:hS,VProgressLinear:fS,VRadio:m7,VRadioGroup:C7,VRangeSlider:b7,VRating:S7,VResponsive:Cy,VRow:Fq,VScaleTransition:hO,VScrollXReverseTransition:DW,VScrollXTransition:AW,VScrollYReverseTransition:PW,VScrollYTransition:OW,VSelect:KO,VSelectionControl:Xc,VSelectionControlGroup:pO,VSheet:Qy,VSlideGroup:Zy,VSlideGroupItem:_7,VSlideXReverseTransition:MW,VSlideXTransition:IW,VSlideYReverseTransition:LW,VSlideYTransition:gS,VSlider:Xy,VSnackbar:T7,VSpacer:Nq,VSvgIcon:cS,VSwitch:A7,VSystemBar:O7,VTab:gM,VTable:Ry,VTabs:L7,VTextField:El,VTextarea:N7,VThemeProvider:V7,VTimeline:H7,VTimelineItem:j7,VToolbar:Uy,VToolbarItems:z7,VToolbarTitle:YS,VTooltip:Y7,VValidation:q7,VVirtualScroll:qm,VWindow:jy,VWindowItem:$y},Symbol.toStringTag,{value:"Module"}));function Q7(i,e){const t=e.modifiers||{},n=e.value,{once:s,immediate:o,...r}=t,a=!Object.keys(r).length,{handler:l,options:c}=typeof n=="object"?n:{handler:n,options:{attributes:(r==null?void 0:r.attr)??a,characterData:(r==null?void 0:r.char)??a,childList:(r==null?void 0:r.child)??a,subtree:(r==null?void 0:r.sub)??a}},u=new MutationObserver(function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1?arguments[1]:void 0;l==null||l(d,h),s&&mM(i,e)});o&&(l==null||l([],u)),i._mutate=Object(i._mutate),i._mutate[e.instance.$.uid]={observer:u},u.observe(i,c)}function mM(i,e){var t;(t=i._mutate)!=null&&t[e.instance.$.uid]&&(i._mutate[e.instance.$.uid].observer.disconnect(),delete i._mutate[e.instance.$.uid])}const Z7={mounted:Q7,unmounted:mM};function J7(i,e){var s,o;const t=e.value,n={passive:!((s=e.modifiers)!=null&&s.active)};window.addEventListener("resize",t,n),i._onResize=Object(i._onResize),i._onResize[e.instance.$.uid]={handler:t,options:n},(o=e.modifiers)!=null&&o.quiet||t()}function e9(i,e){var s;if(!((s=i._onResize)!=null&&s[e.instance.$.uid]))return;const{handler:t,options:n}=i._onResize[e.instance.$.uid];window.removeEventListener("resize",t,n),delete i._onResize[e.instance.$.uid]}const t9={mounted:J7,unmounted:e9};function vM(i,e){const{self:t=!1}=e.modifiers??{},n=e.value,s=typeof n=="object"&&n.options||{passive:!0},o=typeof n=="function"||"handleEvent"in n?n:n.handler,r=t?i:e.arg?document.querySelector(e.arg):window;r&&(r.addEventListener("scroll",o,s),i._onScroll=Object(i._onScroll),i._onScroll[e.instance.$.uid]={handler:o,options:s,target:t?void 0:r})}function CM(i,e){var o;if(!((o=i._onScroll)!=null&&o[e.instance.$.uid]))return;const{handler:t,options:n,target:s=i}=i._onScroll[e.instance.$.uid];s.removeEventListener("scroll",t,n),delete i._onScroll[e.instance.$.uid]}function i9(i,e){e.value!==e.oldValue&&(CM(i,e),vM(i,e))}const n9={mounted:vM,unmounted:CM,updated:i9},s9=Object.freeze(Object.defineProperty({__proto__:null,ClickOutside:zO,Intersect:ff,Mutate:Z7,Resize:t9,Ripple:Ia,Scroll:n9,Touch:qS},Symbol.toStringTag,{value:"Module"}));const o9=DI({components:X7,directives:s9});YF(a6).use(Rs).use(ir).use(o9).mount("#app");document.addEventListener("keydown",i=>{i.key==="F2"&&(i.preventDefault(),fC("/coral")),i.key==="F3"&&(i.preventDefault(),fC("/sales")),i.key==="F4"&&(i.preventDefault(),fC("/dashboard"))});